Allow overriding of strings referenced in XML files.

Test: manual
Bug: 188414370
Change-Id: Ice45b1808530c14c4efff16795cac7b2cb81516e
This commit is contained in:
Jonathan Scott
2022-01-25 17:58:55 +00:00
parent 15a0b54d60
commit 269f97d960
23 changed files with 300 additions and 1 deletions

View File

@@ -16,6 +16,9 @@
package com.android.settings.notification;
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_LOCK_SCREEN_REDACT_NOTIFICATION_SUMMARY;
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_LOCK_SCREEN_REDACT_NOTIFICATION_TITLE;
import android.app.Activity;
import android.app.Application;
import android.app.settings.SettingsEnums;
@@ -69,6 +72,17 @@ public class ConfigureNotificationSettings extends DashboardFragment implements
return TAG;
}
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
replaceEnterpriseStringTitle("lock_screen_work_redact",
WORK_PROFILE_LOCK_SCREEN_REDACT_NOTIFICATION_TITLE,
R.string.lock_screen_notifs_redact_work);
replaceEnterpriseStringSummary("lock_screen_work_redact",
WORK_PROFILE_LOCK_SCREEN_REDACT_NOTIFICATION_SUMMARY,
R.string.lock_screen_notifs_redact_work_summary);
}
@Override
protected int getPreferenceScreenResId() {
return R.xml.configure_notification_settings;