Merge "Don\'t crash on apps only installed for other users." into nyc-dev am: 1e5d0e7 am: 7bcafc9

am: 9bcb17e

* commit '9bcb17e5589b06147052249f6c57a30137c0c1ce':
  Don't crash on apps only installed for other users.

Change-Id: If11c3cf84b34402c193df12b685c8b3f1b127564
This commit is contained in:
Julia Reynolds
2016-04-26 16:35:21 +00:00
committed by android-build-merger

View File

@@ -80,21 +80,23 @@ public class AppNotificationSettings extends NotificationSettingsBase {
mBlock = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_BLOCK);
mSilent = (RestrictedSwitchPreference) getPreferenceScreen().findPreference(KEY_SILENT);
mAppRow = mBackend.loadAppRow(mContext, mPm, mPkgInfo);
if (mPkgInfo != null) {
mAppRow = mBackend.loadAppRow(mContext, mPm, mPkgInfo);
NotificationManager.Policy policy =
NotificationManager.from(mContext).getNotificationPolicy();
mDndVisualEffectsSuppressed = policy == null ? false : policy.suppressedVisualEffects != 0;
NotificationManager.Policy policy =
NotificationManager.from(mContext).getNotificationPolicy();
mDndVisualEffectsSuppressed = policy == null ? false : policy.suppressedVisualEffects != 0;
// load settings intent
ArrayMap<String, AppRow> rows = new ArrayMap<String, AppRow>();
rows.put(mAppRow.pkg, mAppRow);
collectConfigActivities(rows);
// load settings intent
ArrayMap<String, AppRow> rows = new ArrayMap<String, AppRow>();
rows.put(mAppRow.pkg, mAppRow);
collectConfigActivities(rows);
setupImportancePrefs(mAppRow.systemApp, mAppRow.appImportance, mAppRow.banned);
setupPriorityPref(mAppRow.appBypassDnd);
setupVisOverridePref(mAppRow.appVisOverride);
updateDependents(mAppRow.appImportance);
setupImportancePrefs(mAppRow.systemApp, mAppRow.appImportance, mAppRow.banned);
setupPriorityPref(mAppRow.appBypassDnd);
setupVisOverridePref(mAppRow.appVisOverride);
updateDependents(mAppRow.appImportance);
}
}
@Override