Hide mainline module apps in settings.

- check whether an app is system hidden module and do not show them in
recent apps list and battery usage list.

Bug: 120546598
Test: make RunSettingsRoboTests
Change-Id: I9080c9d39095890f3a3ebc7fce839dcf984a92d6
This commit is contained in:
Doris Ling
2019-01-09 14:54:19 -08:00
parent e5d530348c
commit 538accf058
5 changed files with 109 additions and 1 deletions

View File

@@ -316,6 +316,9 @@ public class RecentAppsPreferenceController extends AbstractPreferenceController
Log.d(TAG, "System package, skipping " + pkgName);
return false;
}
if (AppUtils.isHiddenSystemModule(mContext, pkgName)) {
return false;
}
final Intent launchIntent = new Intent().addCategory(Intent.CATEGORY_LAUNCHER)
.setPackage(pkgName);