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,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