am 7ef58584: Merge "Fix crash in settings -> apps after adding profile" into mnc-dev

* commit '7ef58584e66e077ee7930ae100cc1a1915cd7b1a':
  Fix crash in settings -> apps after adding profile
This commit is contained in:
Jason Monk
2015-05-08 14:59:42 +00:00
committed by Android Git Automerger

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,