Merge "Fix launching of work profile notif settings" into qt-qpr1-dev

am: 0805e3d641

Change-Id: Ib221648a434d2d2d50a905971567792f23aa8b2c
This commit is contained in:
Julia Reynolds
2019-07-28 20:21:51 -07:00
committed by android-build-merger

View File

@@ -266,14 +266,17 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putString(AppInfoBase.ARG_PACKAGE_NAME, pkgName); args.putString(AppInfoBase.ARG_PACKAGE_NAME, pkgName);
args.putInt(AppInfoBase.ARG_PACKAGE_UID, appEntry.info.uid); args.putInt(AppInfoBase.ARG_PACKAGE_UID, appEntry.info.uid);
pref.setIntent(new SubSettingLauncher(mHost.getActivity()) pref.setOnPreferenceClickListener(preference -> {
.setDestination(AppNotificationSettings.class.getName()) new SubSettingLauncher(mHost.getActivity())
.setTitleRes(R.string.notifications_title) .setDestination(AppNotificationSettings.class.getName())
.setArguments(args) .setTitleRes(R.string.notifications_title)
.setUserHandle(new UserHandle(UserHandle.getUserId(appEntry.info.uid))) .setArguments(args)
.setSourceMetricsCategory( .setUserHandle(new UserHandle(UserHandle.getUserId(appEntry.info.uid)))
SettingsEnums.MANAGE_APPLICATIONS_NOTIFICATIONS) .setSourceMetricsCategory(
.toIntent()); SettingsEnums.MANAGE_APPLICATIONS_NOTIFICATIONS)
.launch();
return true;
});
pref.setSwitchEnabled(mNotificationBackend.isBlockable(mContext, appEntry.info)); pref.setSwitchEnabled(mNotificationBackend.isBlockable(mContext, appEntry.info));
pref.setOnPreferenceChangeListener((preference, newValue) -> { pref.setOnPreferenceChangeListener((preference, newValue) -> {
boolean blocked = !(Boolean) newValue; boolean blocked = !(Boolean) newValue;