Merge "Move common strings from System UI to SettingsLib" into sc-dev

This commit is contained in:
Rajeev Kumar
2021-06-25 03:15:35 +00:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 11 deletions

View File

@@ -1426,7 +1426,12 @@
<string name="guest_reset_guest">Reset guest</string> <string name="guest_reset_guest">Reset guest</string>
<!-- Name for the guest user [CHAR LIMIT=35] --> <!-- Name for the guest user [CHAR LIMIT=35] -->
<string name="guest_nickname">Guest</string> <string name="guest_nickname">Guest</string>
<!-- Title of the confirmation dialog to confirm resetting guest. [CHAR LIMIT=NONE] -->
<string name="guest_reset_guest_dialog_title">Reset guest?</string>
<!-- Label for button in confirmation dialog when resetting guest user [CHAR LIMIT=35] -->
<string name="guest_reset_guest_confirm_button">Reset</string>
<!-- Status message indicating the device is in the process of resetting the guest user. [CHAR_LIMIT=NONE] -->
<string name="guest_resetting">Resetting guest\u2026</string>
<!-- An option in a photo selection dialog to take a new photo [CHAR LIMIT=50] --> <!-- An option in a photo selection dialog to take a new photo [CHAR LIMIT=50] -->
<string name="user_image_take_photo">Take a photo</string> <string name="user_image_take_photo">Take a photo</string>
<!-- An option in a photo selection dialog to choose a pre-existing image [CHAR LIMIT=50] --> <!-- An option in a photo selection dialog to choose a pre-existing image [CHAR LIMIT=50] -->

View File

@@ -1148,18 +1148,12 @@
<!-- Title of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] --> <!-- Title of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] -->
<string name="guest_exit_guest_dialog_title">Remove guest?</string> <string name="guest_exit_guest_dialog_title">Remove guest?</string>
<!-- Title of the confirmation dialog when resetting guest session [CHAR LIMIT=NONE] -->
<string name="guest_reset_guest_dialog_title">Reset guest?</string>
<!-- Message of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] --> <!-- Message of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] -->
<string name="guest_exit_guest_dialog_message">All apps and data in this session will be deleted.</string> <string name="guest_exit_guest_dialog_message">All apps and data in this session will be deleted.</string>
<!-- Label for button in confirmation dialog when exiting guest session [CHAR LIMIT=35] --> <!-- Label for button in confirmation dialog when exiting guest session [CHAR LIMIT=35] -->
<string name="guest_exit_guest_dialog_remove">Remove</string> <string name="guest_exit_guest_dialog_remove">Remove</string>
<!-- Label for button in confirmation dialog when resetting guest session [CHAR LIMIT=35] -->
<string name="guest_reset_guest_dialog_remove">Reset</string>
<!-- Title of the notification when resuming an existing guest session [CHAR LIMIT=NONE] --> <!-- Title of the notification when resuming an existing guest session [CHAR LIMIT=NONE] -->
<string name="guest_wipe_session_title">Welcome back, guest!</string> <string name="guest_wipe_session_title">Welcome back, guest!</string>

View File

@@ -1012,15 +1012,16 @@ public class UserSwitcherController implements Dumpable {
public ExitGuestDialog(Context context, int guestId, int targetId) { public ExitGuestDialog(Context context, int guestId, int targetId) {
super(context); super(context);
setTitle(mGuestUserAutoCreated ? R.string.guest_reset_guest_dialog_title setTitle(mGuestUserAutoCreated
? com.android.settingslib.R.string.guest_reset_guest_dialog_title
: R.string.guest_exit_guest_dialog_title); : R.string.guest_exit_guest_dialog_title);
setMessage(context.getString(R.string.guest_exit_guest_dialog_message)); setMessage(context.getString(R.string.guest_exit_guest_dialog_message));
setButton(DialogInterface.BUTTON_NEGATIVE, setButton(DialogInterface.BUTTON_NEGATIVE,
context.getString(android.R.string.cancel), this); context.getString(android.R.string.cancel), this);
setButton(DialogInterface.BUTTON_POSITIVE, setButton(DialogInterface.BUTTON_POSITIVE,
context.getString( context.getString(mGuestUserAutoCreated
mGuestUserAutoCreated ? R.string.guest_reset_guest_dialog_remove ? com.android.settingslib.R.string.guest_reset_guest_confirm_button
: R.string.guest_exit_guest_dialog_remove), this); : R.string.guest_exit_guest_dialog_remove), this);
SystemUIDialog.setWindowOnTop(this); SystemUIDialog.setWindowOnTop(this);
setCanceledOnTouchOutside(false); setCanceledOnTouchOutside(false);
mGuestId = guestId; mGuestId = guestId;