Allow Device Management Role Holder to update Settings strings.

Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
This commit is contained in:
Jonathan Scott
2022-01-19 15:19:08 +00:00
parent 47d115c3ff
commit e0d439472f
55 changed files with 788 additions and 231 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings.security;
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_SET_UNLOCK_LAUNCH_PICKER_TITLE;
import static com.android.settings.security.SecuritySettings.UNIFY_LOCK_CONFIRM_PROFILE_REQUEST;
import static com.android.settings.security.SecuritySettings.UNUNIFY_LOCK_CONFIRM_DEVICE_REQUEST;
@@ -190,8 +192,8 @@ public class LockUnificationPreferenceController extends AbstractPreferenceContr
*/
public void startUnification() {
// Confirm profile lock
final String title = mContext.getString(
R.string.unlock_set_unlock_launch_picker_title_profile);
final String title = mDpm.getString(WORK_PROFILE_SET_UNLOCK_LAUNCH_PICKER_TITLE,
() -> mContext.getString(R.string.unlock_set_unlock_launch_picker_title_profile));
final ChooseLockSettingsHelper.Builder builder =
new ChooseLockSettingsHelper.Builder(mHost.getActivity(), mHost);
final boolean launched = builder.setRequestCode(UNIFY_LOCK_CONFIRM_PROFILE_REQUEST)