Fix crash in settings -> apps after adding profile

Bug: 20652411
Change-Id: I766f99ee520ab106ec2765c77057042ed14e8fed
This commit is contained in:
Jason Monk
2015-05-08 10:18:48 -04:00
parent 59de14e219
commit e4ccf87839

View File

@@ -790,6 +790,10 @@ public class ApplicationsState {
mApplications = new ArrayList<ApplicationInfo>();
for (UserHandle user : mUm.getUserProfiles()) {
try {
// If this user is new, it needs a map created.
if (mEntriesMap.indexOfKey(user.getIdentifier()) < 0) {
mEntriesMap.put(user.getIdentifier(), new HashMap<String, AppEntry>());
}
ParceledListSlice<ApplicationInfo> list =
mIpm.getInstalledApplications(
user.isOwner() ? mOwnerRetrieveFlags : mRetrieveFlags,