Allow overriding of strings referenced in XML files.
Test: manual Bug: 188414370 Change-Id: Ice45b1808530c14c4efff16795cac7b2cb81516e
This commit is contained in:
@@ -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;
|
||||
|
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.notification;
|
||||
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_SOUND_SETTINGS_SECTION_HEADER;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -97,6 +99,9 @@ public class SoundSettings extends DashboardFragment implements OnActivityResult
|
||||
.findFragmentByTag(TAG);
|
||||
mDialogFragment = dialogFragment;
|
||||
}
|
||||
replaceEnterpriseStringTitle("sound_work_settings",
|
||||
WORK_PROFILE_SOUND_SETTINGS_SECTION_HEADER,
|
||||
R.string.sound_work_settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -16,6 +16,12 @@
|
||||
|
||||
package com.android.settings.notification;
|
||||
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_ALARM_RINGTONE_TITLE;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_NOTIFICATION_RINGTONE_TITLE;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_RINGTONE_TITLE;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_USE_PERSONAL_SOUNDS_SUMMARY;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_USE_PERSONAL_SOUNDS_TITLE;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -64,6 +70,18 @@ public class SoundWorkSettings extends DashboardFragment implements OnActivityRe
|
||||
mRequestPreference = findPreference(selectedPreference);
|
||||
}
|
||||
}
|
||||
replaceEnterpriseStringTitle("work_use_personal_sounds",
|
||||
WORK_PROFILE_USE_PERSONAL_SOUNDS_TITLE, R.string.work_use_personal_sounds_title);
|
||||
replaceEnterpriseStringSummary("work_use_personal_sounds",
|
||||
WORK_PROFILE_USE_PERSONAL_SOUNDS_SUMMARY,
|
||||
R.string.work_use_personal_sounds_summary);
|
||||
replaceEnterpriseStringTitle("work_ringtone",
|
||||
WORK_PROFILE_RINGTONE_TITLE, R.string.work_ringtone_title);
|
||||
replaceEnterpriseStringTitle("work_alarm_ringtone",
|
||||
WORK_PROFILE_ALARM_RINGTONE_TITLE, R.string.work_alarm_ringtone_title);
|
||||
replaceEnterpriseStringTitle("work_notification",
|
||||
WORK_PROFILE_NOTIFICATION_RINGTONE_TITLE,
|
||||
R.string.work_notification_ringtone_title);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user