summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SettingsLib/res/values/strings.xml18
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/Utils.java2
-rw-r--r--packages/SystemUI/res/values/strings.xml24
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthCredentialView.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/user/CreateUserActivity.java4
6 files changed, 29 insertions, 44 deletions
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index b0508b1aed36..1c1e1ba32f00 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -398,9 +398,6 @@
<!-- Title for a work profile. [CHAR LIMIT=25] -->
<string name="managed_user_title">All work apps</string>
- <!-- Title for Guest user [CHAR LIMIT=35] -->
- <string name="user_guest">Guest</string>
-
<!-- Manage apps, individual app screen, substituted for the application's label when the app's label CAN NOT be determined.-->
<string name="unknown">Unknown</string>
@@ -1421,16 +1418,18 @@
<!-- Title for the preference to enter the nickname of the user to display in the user switcher [CHAR LIMIT=25]-->
<string name="user_nickname">Nickname</string>
+ <!-- Label for adding a new user in the user switcher [CHAR LIMIT=35] -->
+ <string name="user_add_user">Add user</string>
<!-- Label for adding a new guest in the user switcher [CHAR LIMIT=35] -->
<string name="guest_new_guest">Add guest</string>
<!-- Label for exiting and removing the guest session in the user switcher [CHAR LIMIT=35] -->
<string name="guest_exit_guest">Remove guest</string>
<!-- Label for resetting guest session in the user switcher, which will remove all data from the current guest session [CHAR LIMIT=35] -->
<string name="guest_reset_guest">Reset guest</string>
- <!-- Name for the guest user [CHAR LIMIT=35] -->
- <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>
+ <!-- Title of the confirmation dialog to confirm removing guest. [CHAR LIMIT=NONE] -->
+ <string name="guest_remove_guest_dialog_title">Remove 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] -->
@@ -1442,6 +1441,15 @@
<!-- Accessibility message for the photo selector which is a button/popup with the current photo [CHAR LIMIT=50] -->
<string name="user_image_photo_selector">Select photo</string>
+ <!-- Content of the dialog shown when the user has failed to provide the device lock too many times and the device is wiped. [CHAR LIMIT=NONE] -->
+ <string name="failed_attempts_now_wiping_device">Too many incorrect attempts. This device\'s data will be deleted.</string>
+ <!-- Content of the dialog shown when the user has failed to provide the user lock too many times and the user is removed. [CHAR LIMIT=NONE] -->
+ <string name="failed_attempts_now_wiping_user">Too many incorrect attempts. This user will be deleted.</string>
+ <!-- Content of the dialog shown when the user has failed to provide the work lock too many times and the work profile is removed. [CHAR LIMIT=NONE] -->
+ <string name="failed_attempts_now_wiping_profile">Too many incorrect attempts. This work profile and its data will be deleted.</string>
+ <!-- Button label to dismiss the dialog telling the user the work profile has been wiped. [CHAR LIMIT=40] -->
+ <string name="failed_attempts_now_wiping_dialog_dismiss">Dismiss</string>
+
<!-- List entry in developer settings to choose default device/system behavior for the app freezer [CHAR LIMIT=30]-->
<string name="cached_apps_freezer_device_default">Device default</string>
<!-- List entry in developer settings to disable the app freezer in developer settings [CHAR LIMIT=30]-->
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index f639022f222d..aaa011458258 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -134,7 +134,7 @@ public class Utils {
? getUpdatableManagedUserTitle(context)
: context.getString(R.string.managed_user_title);
} else if (info.isGuest()) {
- name = context.getString(R.string.user_guest);
+ name = context.getString(com.android.internal.R.string.guest_name);
}
if (name == null && info != null) {
name = Integer.toString(info.id);
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index aad0b5704a97..d3b76d90d09f 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -368,15 +368,6 @@
<!-- Content of a dialog shown when the user only has one attempt left to provide the correct password before the work profile is removed. [CHAR LIMIT=NONE] -->
<string name="biometric_dialog_last_password_attempt_before_wipe_profile">If you enter an incorrect password on the next attempt, your work profile and its data will be deleted.</string>
- <!-- Content of a dialog shown when the user has failed to provide the device lock too many times and the device is wiped. [CHAR LIMIT=NONE] -->
- <string name="biometric_dialog_failed_attempts_now_wiping_device">Too many incorrect attempts. This device\u2019s data will be deleted.</string>
- <!-- Content of a dialog shown when the user has failed to provide the user lock too many times and the user is removed. [CHAR LIMIT=NONE] -->
- <string name="biometric_dialog_failed_attempts_now_wiping_user">Too many incorrect attempts. This user will be deleted.</string>
- <!-- Content of a dialog shown when the user has failed to provide the work lock too many times and the work profile is removed. [CHAR LIMIT=NONE] -->
- <string name="biometric_dialog_failed_attempts_now_wiping_profile">Too many incorrect attempts. This work profile and its data will be deleted.</string>
- <!-- Button label to dismiss the dialog telling the user the device, user, or work profile has been wiped. [CHAR LIMIT=40] -->
- <string name="biometric_dialog_now_wiping_dialog_dismiss">Dismiss</string>
-
<!-- Message shown when the system-provided fingerprint dialog is shown, asking for authentication -->
<string name="fingerprint_dialog_touch_sensor">Touch the fingerprint sensor</string>
<!-- Content description of the fingerprint icon when the system-provided fingerprint dialog is showing, for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
@@ -831,15 +822,6 @@
<!-- Accessibility label for the button that opens the quick contact of the user. -->
- <!-- Label for the adding a new user in the user switcher [CHAR LIMIT=35] -->
- <string name="user_add_user">Add user</string>
-
- <!-- Name for a freshly added user [CHAR LIMIT=30] -->
- <string name="user_new_user_name">New user</string>
-
- <!-- Title of the confirmation dialog when exiting guest session [CHAR LIMIT=NONE] -->
- <string name="guest_exit_guest_dialog_title">Remove guest?</string>
-
<!-- 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>
@@ -858,12 +840,6 @@
<!-- Notification when resuming an existing guest session: Action that continues with the current session [CHAR LIMIT=35] -->
<string name="guest_wipe_session_dontwipe">Yes, continue</string>
- <!-- Title for add user confirmation dialog [CHAR LIMIT=30] -->
- <string name="user_add_user_title" msgid="2108112641783146007">Add new user?</string>
-
- <!-- Message for add user confirmation dialog - short version. [CHAR LIMIT=none] -->
- <string name="user_add_user_message_short" msgid="1511354412249044381">When you add a new user, that person needs to set up their space.\n\nAny user can update apps for all other users. </string>
-
<!-- Title for the dialog that lets users know that the maximum allowed number of users on the device has been reached. [CHAR LIMIT=35]-->
<string name="user_limit_reached_title">User limit reached</string>
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthCredentialView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthCredentialView.java
index 2f2ca5b51fbf..ed84a37682e4 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthCredentialView.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthCredentialView.java
@@ -390,7 +390,9 @@ public abstract class AuthCredentialView extends LinearLayout {
private void showNowWipingDialog() {
final AlertDialog alertDialog = new AlertDialog.Builder(mContext)
.setMessage(getNowWipingMessage(getUserTypeForWipe()))
- .setPositiveButton(R.string.biometric_dialog_now_wiping_dialog_dismiss, null)
+ .setPositiveButton(
+ com.android.settingslib.R.string.failed_attempts_now_wiping_dialog_dismiss,
+ null /* OnClickListener */)
.setOnDismissListener(
dialog -> mContainerView.animateAway(AuthDialogCallback.DISMISSED_ERROR))
.create();
@@ -513,13 +515,13 @@ public abstract class AuthCredentialView extends LinearLayout {
int resId;
switch (userType) {
case USER_TYPE_PRIMARY:
- resId = R.string.biometric_dialog_failed_attempts_now_wiping_device;
+ resId = com.android.settingslib.R.string.failed_attempts_now_wiping_device;
break;
case USER_TYPE_MANAGED_PROFILE:
- resId = R.string.biometric_dialog_failed_attempts_now_wiping_profile;
+ resId = com.android.settingslib.R.string.failed_attempts_now_wiping_profile;
break;
case USER_TYPE_SECONDARY:
- resId = R.string.biometric_dialog_failed_attempts_now_wiping_user;
+ resId = com.android.settingslib.R.string.failed_attempts_now_wiping_user;
break;
default:
throw new IllegalArgumentException("Unrecognized user type:" + userType);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index 4cb0a94e2585..ca5edb5c3fb1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -703,8 +703,7 @@ public class UserSwitcherController implements Dumpable {
if (mUsers.isEmpty()) return null;
UserRecord item = mUsers.stream().filter(x -> x.isCurrent).findFirst().orElse(null);
if (item == null || item.info == null) return null;
- if (item.isGuest) return mContext.getString(
- com.android.settingslib.R.string.guest_nickname);
+ if (item.isGuest) return mContext.getString(com.android.internal.R.string.guest_name);
return item.info.name;
}
@@ -941,7 +940,7 @@ public class UserSwitcherController implements Dumpable {
: com.android.settingslib.R.string.guest_exit_guest);
} else {
if (item.info != null) {
- return context.getString(com.android.settingslib.R.string.guest_nickname);
+ return context.getString(com.android.internal.R.string.guest_name);
} else {
if (mController.mGuestUserAutoCreated) {
// If mGuestIsResetting=true, we expect the guest user to be created
@@ -953,7 +952,7 @@ public class UserSwitcherController implements Dumpable {
return context.getString(
mController.mGuestIsResetting.get()
? com.android.settingslib.R.string.guest_resetting
- : com.android.settingslib.R.string.guest_nickname);
+ : com.android.internal.R.string.guest_name);
} else {
return context.getString(
com.android.settingslib.R.string.guest_new_guest);
@@ -961,7 +960,7 @@ public class UserSwitcherController implements Dumpable {
}
}
} else if (item.isAddUser) {
- return context.getString(R.string.user_add_user);
+ return context.getString(com.android.settingslib.R.string.user_add_user);
} else if (item.isAddSupervisedUser) {
return context.getString(R.string.add_user_supervised);
} else {
@@ -1128,7 +1127,7 @@ public class UserSwitcherController implements Dumpable {
super(context);
setTitle(mGuestUserAutoCreated
? com.android.settingslib.R.string.guest_reset_guest_dialog_title
- : R.string.guest_exit_guest_dialog_title);
+ : com.android.settingslib.R.string.guest_remove_guest_dialog_title);
setMessage(context.getString(R.string.guest_exit_guest_dialog_message));
setButton(DialogInterface.BUTTON_NEUTRAL,
context.getString(android.R.string.cancel), this);
@@ -1165,8 +1164,8 @@ public class UserSwitcherController implements Dumpable {
public AddUserDialog(Context context) {
super(context);
- setTitle(R.string.user_add_user_title);
- setMessage(context.getString(R.string.user_add_user_message_short));
+ setTitle(com.android.settingslib.R.string.user_add_user_title);
+ setMessage(com.android.settingslib.R.string.user_add_user_message_short);
setButton(DialogInterface.BUTTON_NEUTRAL,
context.getString(android.R.string.cancel), this);
setButton(DialogInterface.BUTTON_POSITIVE,
diff --git a/packages/SystemUI/src/com/android/systemui/user/CreateUserActivity.java b/packages/SystemUI/src/com/android/systemui/user/CreateUserActivity.java
index c9de966080c5..cc6bf6a70d4e 100644
--- a/packages/SystemUI/src/com/android/systemui/user/CreateUserActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/user/CreateUserActivity.java
@@ -110,7 +110,7 @@ public class CreateUserActivity extends Activity {
},
null,
defaultUserName,
- getString(R.string.user_add_user),
+ getString(com.android.settingslib.R.string.user_add_user),
this::addUserNow,
this::finish
);
@@ -134,7 +134,7 @@ public class CreateUserActivity extends Activity {
mSetupUserDialog.dismiss();
userName = (userName == null || userName.trim().isEmpty())
- ? getString(R.string.user_new_user_name)
+ ? getString(com.android.settingslib.R.string.user_new_user_name)
: userName;
mUserCreator.createUser(userName, userIcon,