Merge "Fix crash in settings -> apps after adding profile" into mnc-dev

This commit is contained in:
Jason Monk
2015-05-08 14:48:54 +00:00
committed by Android (Google) Code Review

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,