summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorZach Johnson <zachoverflow@google.com>2015-07-24 15:11:29 -0700
committerZach Johnson <zachoverflow@google.com>2015-07-24 15:48:52 -0700
commitb6d17ee7aeace3c2b2443c94c9ad4ff50f82e8de (patch)
treedf142316121aafb7ac86781b3fc5498e81cca241 /packages
parent68fbd6a4968eb6e5f3d74f471387c5e62981fba2 (diff)
downloadframeworks_base-b6d17ee7aeace3c2b2443c94c9ad4ff50f82e8de.zip
frameworks_base-b6d17ee7aeace3c2b2443c94c9ad4ff50f82e8de.tar.gz
frameworks_base-b6d17ee7aeace3c2b2443c94c9ad4ff50f82e8de.tar.bz2
Add filter for personal apps that are not disabled until first use
Needed for the battery settings UI. b/22667081 Change-Id: I25ed5c1866dc3027e450c7ce9031de5def4f839a
Diffstat (limited to 'packages')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
index 40d5437..9eb7d0e 100644
--- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
@@ -1239,6 +1239,21 @@ public class ApplicationsState {
}
};
+ public static final AppFilter FILTER_PERSONAL_WITHOUT_DISABLED_UNTIL_USED = new AppFilter() {
+ private int mCurrentUser;
+
+ public void init() {
+ mCurrentUser = ActivityManager.getCurrentUser();
+ }
+
+ @Override
+ public boolean filterApp(AppEntry entry) {
+ return UserHandle.getUserId(entry.info.uid) == mCurrentUser &&
+ entry.info.enabledSetting != PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED;
+ }
+ };
+
+
public static final AppFilter FILTER_WORK = new AppFilter() {
private int mCurrentUser;