Skip to content

Commit

Permalink
fixes #46
Browse files Browse the repository at this point in the history
  • Loading branch information
sanandmv7 committed Apr 8, 2021
1 parent 2f1e262 commit 868beb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ apply plugin: 'com.android.application'
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
def versionMajor = 1
def versionMinor = 3
def versionPatch = 0
def versionPatch = 1
android {
compileSdkVersion 29
defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public void onReceive(Context context, Intent intent) {
if (intent.getAction() != null) {
if (intent.getAction().equals("android.intent.action.PACKAGE_ADDED") && intent.getDataString() != null) {
packageName = intent.getDataString().replace("package:", "");
boolean withSysApps = androidx.preference.PreferenceManager.getDefaultSharedPreferences(context).getBoolean("includeSystemApps", false);
final AppScanner scanner = new AppScanner(context, packageName, withSysApps);
final AppScanner scanner = new AppScanner(context, packageName);
scanner.execute();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public class AppScanner extends AsyncTask<Void, String, Void> {

private ArrayList<String> appPermissionsList= new ArrayList<>();

public AppScanner(Context context, String pkgName, boolean withSysApps) {
public AppScanner(Context context, String pkgName) {
contextRef = new WeakReference<>(context);
this.packageName = pkgName;
this.withSysApps = withSysApps;
this.withSysApps = androidx.preference.PreferenceManager.getDefaultSharedPreferences(context).getBoolean("includeSystemApps", false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public void onReceive(Context context, Intent intent) {
if (intent.getAction() != null) {
if (intent.getAction().equals("android.intent.action.PACKAGE_ADDED") && intent.getDataString() != null) {
packageName = intent.getDataString().replace("package:", "");
boolean withSysApps = androidx.preference.PreferenceManager.getDefaultSharedPreferences(context).getBoolean("includeSystemApps", false);
final AppScanner scanner = new AppScanner(context, packageName, withSysApps);
final AppScanner scanner = new AppScanner(context, packageName);
scanner.execute();
}
}
Expand Down

0 comments on commit 868beb6

Please sign in to comment.