diff options
author | Zach Johnson <zachoverflow@google.com> | 2015-07-28 22:36:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-28 22:36:30 +0000 |
commit | 5faa033615dcb4297fcb6a81828099285364942d (patch) | |
tree | 35b7007a7c459d8e9948386024e62df942ce2ec0 /packages | |
parent | f2c616ed02aee3b9a9025caf288aadbf22cfd046 (diff) | |
parent | b6d17ee7aeace3c2b2443c94c9ad4ff50f82e8de (diff) | |
download | frameworks_base-5faa033615dcb4297fcb6a81828099285364942d.zip frameworks_base-5faa033615dcb4297fcb6a81828099285364942d.tar.gz frameworks_base-5faa033615dcb4297fcb6a81828099285364942d.tar.bz2 |
Merge "Add filter for personal apps that are not disabled until first use" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java | 15 |
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; |