Fix launching of work profile notif settings
Test: manual
Fixes: 132289017
Change-Id: I3c177aae1f4dd46556b652253d24b225d01987eb
(cherry picked from commit 142920e0c2
)
This commit is contained in:
@@ -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 -> {
|
||||||
|
new SubSettingLauncher(mHost.getActivity())
|
||||||
.setDestination(AppNotificationSettings.class.getName())
|
.setDestination(AppNotificationSettings.class.getName())
|
||||||
.setTitleRes(R.string.notifications_title)
|
.setTitleRes(R.string.notifications_title)
|
||||||
.setArguments(args)
|
.setArguments(args)
|
||||||
.setUserHandle(new UserHandle(UserHandle.getUserId(appEntry.info.uid)))
|
.setUserHandle(new UserHandle(UserHandle.getUserId(appEntry.info.uid)))
|
||||||
.setSourceMetricsCategory(
|
.setSourceMetricsCategory(
|
||||||
SettingsEnums.MANAGE_APPLICATIONS_NOTIFICATIONS)
|
SettingsEnums.MANAGE_APPLICATIONS_NOTIFICATIONS)
|
||||||
.toIntent());
|
.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;
|
||||||
|
Reference in New Issue
Block a user