Merge changes I81990d63,I053a6220
* changes: Fix settings crash if launched with null args Fix settings crash on noti listener screen
This commit is contained in:
committed by
Android (Google) Code Review
commit
698465c236
@@ -112,10 +112,12 @@ abstract public class NotificationSettingsBase extends DashboardFragment {
|
||||
|
||||
mPkgInfo = findPackageInfo(mPkg, mUid);
|
||||
|
||||
if (mPkgInfo != null) {
|
||||
mUserId = UserHandle.getUserId(mUid);
|
||||
mSuspendedAppsAdmin = RestrictedLockUtilsInternal.checkIfApplicationIsSuspended(
|
||||
mContext, mPkg, mUserId);
|
||||
|
||||
|
||||
loadChannel();
|
||||
loadAppRow();
|
||||
loadChannelGroup();
|
||||
@@ -127,6 +129,7 @@ abstract public class NotificationSettingsBase extends DashboardFragment {
|
||||
controller.onResume(mAppRow, mChannel, mChannelGroup, mSuspendedAppsAdmin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
|
@@ -117,7 +117,7 @@ public abstract class ManagedServiceSettings extends EmptyTextSettings {
|
||||
CharSequence title = null;
|
||||
try {
|
||||
title = mPm.getApplicationInfoAsUser(
|
||||
service.packageName, 0, getCurrentUser(managedProfileId)).loadLabel(mPm);
|
||||
service.packageName, 0, UserHandle.myUserId()).loadLabel(mPm);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
// unlikely, as we are iterating over live services.
|
||||
Log.e(TAG, "can't find package name", e);
|
||||
|
Reference in New Issue
Block a user