Allow Device Management Role Holder to update Settings strings.
Test: manual Bug: 188414370 Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.utils;
|
||||
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_NOTIFICATION_LISTENER_BLOCKED;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.Dialog;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
@@ -134,7 +136,9 @@ public abstract class ManagedServiceSettings extends EmptyTextSettings {
|
||||
if (managedProfileId != UserHandle.USER_NULL
|
||||
&& !mDpm.isNotificationListenerServicePermitted(
|
||||
service.packageName, managedProfileId)) {
|
||||
pref.setSummary(R.string.work_profile_notification_access_blocked_summary);
|
||||
pref.setSummary(mDpm.getString(WORK_PROFILE_NOTIFICATION_LISTENER_BLOCKED,
|
||||
() -> getString(
|
||||
R.string.work_profile_notification_access_blocked_summary)));
|
||||
}
|
||||
pref.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
final boolean enable = (boolean) newValue;
|
||||
|
Reference in New Issue
Block a user