diff options
author | Jason Monk <jmonk@google.com> | 2015-06-10 15:07:49 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-10 15:07:49 +0000 |
commit | 473da8b6185ce13a9d07e3a6590901464a27900d (patch) | |
tree | 92daa5a8a52569b278f32cbb0b4157ef4f7f6f6b /packages/SettingsLib | |
parent | 15fb34d2ea6282144a3826bbe3f3ae122b6dd755 (diff) | |
parent | b73390acdd6a71d74d6ad107520a0f22d2bc5f1e (diff) | |
download | frameworks_base-473da8b6185ce13a9d07e3a6590901464a27900d.zip frameworks_base-473da8b6185ce13a9d07e3a6590901464a27900d.tar.gz frameworks_base-473da8b6185ce13a9d07e3a6590901464a27900d.tar.bz2 |
am b73390ac: Merge "Fix work apps showing as not installed for owner" into mnc-dev
* commit 'b73390acdd6a71d74d6ad107520a0f22d2bc5f1e':
Fix work apps showing as not installed for owner
Diffstat (limited to 'packages/SettingsLib')
-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 b5e53c0..6561512 100644 --- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java +++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java @@ -784,6 +784,21 @@ public class ApplicationsState { numDone++; getEntryLocked(info); } + if (userId != 0 && mEntriesMap.indexOfKey(0) >= 0) { + // If this app is for a profile and we are on the owner, remove + // the owner entry if it isn't installed. This will prevent + // duplicates of work only apps showing up as 'not installed + // for this user'. + // Note: This depends on us traversing the users in order, which + // happens because of the way we generate the list in + // doResumeIfNeededLocked. + AppEntry entry = mEntriesMap.get(0).get(info.packageName); + if (entry != null && + (entry.info.flags & ApplicationInfo.FLAG_INSTALLED) == 0) { + mEntriesMap.get(0).remove(info.packageName); + mAppEntries.remove(entry); + } + } } if (DEBUG_LOCKING) Log.v(TAG, "MSG_LOAD_ENTRIES releasing lock"); } |