Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7249294 authored by Yasin Kilicdere's avatar Yasin Kilicdere Committed by Android (Google) Code Review
Browse files

Merge "Singularization of duplicated multi user strings." into tm-dev

parents d1c349c5 4564bce0
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -1586,15 +1586,6 @@
    <!-- Content of the dialog shown when the user only has one attempt left to provide the work lock password before the work profile is removed. [CHAR LIMIT=NONE] -->
    <string name="lock_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 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="lock_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="lock_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="lock_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="lock_failed_attempts_now_wiping_dialog_dismiss">Dismiss</string>
    <!-- Hint shown in dialog screen when password is too short -->
    <plurals name="lockpassword_password_too_short">
        <item quantity="one">Must contain at least <xliff:g id="count" example="1">%d</xliff:g> character</item>
@@ -7640,8 +7631,6 @@
    <string name="user_list_title">Users &amp; profiles</string>
    <!-- User settings add user or restricted profile menu [CHAR LIMIT=35] -->
    <string name="user_add_user_or_profile_menu">Add user or profile</string>
    <!-- User settings add user menu [CHAR LIMIT=35] -->
    <string name="user_add_user_menu">Add user</string>
    <!-- User settings summary for a restricted profile [CHAR LIMIT=50] -->
    <string name="user_summary_restricted_profile">Restricted profile</string>
@@ -7701,12 +7690,6 @@
    <!-- Delete button text [CHAR LIMIT=25] -->
    <string name="user_delete_button">Delete</string>
    <!-- TODO: Remove it once the same entry in SettingsLib is translated. -->
    <!-- Title for Guest user [CHAR LIMIT=35] -->
    <string name="user_guest">Guest</string>
    <!-- Label for item to exit guest mode [CHAR LIMIT=35] -->
    <string name="user_exit_guest_title">Remove guest</string>
    <!-- Title of dialog to user to confirm exiting guest. [CHAR LIMIT=50] -->
    <string name="user_exit_guest_confirm_title">Remove guest?</string>
    <!-- Message to user to confirm exiting guest. [CHAR LIMIT=none] -->
    <string name="user_exit_guest_confirm_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] -->
+7 −4
Original line number Diff line number Diff line
@@ -255,7 +255,8 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
            // Device, profile, or secondary user is wiped
            final String message = getWipeMessage(userType);
            LastTryDialog.show(fragmentManager, null /* title */, message,
                    R.string.lock_failed_attempts_now_wiping_dialog_dismiss, true /* dismiss */);
                    com.android.settingslib.R.string.failed_attempts_now_wiping_dialog_dismiss,
                    true /* dismiss */);
        }
    }

@@ -277,13 +278,15 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
    private String getWipeMessage(int userType) {
        switch (userType) {
            case USER_TYPE_PRIMARY:
                return getString(R.string.lock_failed_attempts_now_wiping_device);
                return getString(com.android.settingslib
                        .R.string.failed_attempts_now_wiping_device);
            case USER_TYPE_MANAGED_PROFILE:
                return mDevicePolicyManager.getResources().getString(
                        WORK_PROFILE_LOCK_ATTEMPTS_FAILED,
                        () -> getString(R.string.lock_failed_attempts_now_wiping_profile));
                        () -> getString(com.android.settingslib
                                .R.string.failed_attempts_now_wiping_profile));
            case USER_TYPE_SECONDARY:
                return getString(R.string.lock_failed_attempts_now_wiping_user);
                return getString(com.android.settingslib.R.string.failed_attempts_now_wiping_user);
            default:
                throw new IllegalArgumentException("Unrecognized user type:" + userType);
        }
+1 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
                        !mDefaultGuestRestrictions.getBoolean(UserManager.DISALLOW_OUTGOING_CALLS));
                mRemoveUserPref.setTitle(mGuestUserAutoCreated
                        ? com.android.settingslib.R.string.guest_reset_guest
                        : R.string.user_exit_guest_title);
                        : com.android.settingslib.R.string.guest_exit_guest);
                if (mGuestUserAutoCreated) {
                    mRemoveUserPref.setEnabled((mUserInfo.flags & UserInfo.FLAG_INITIALIZED) != 0);
                }
+6 −6
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ public class UserSettings extends SettingsPreferenceFragment
        mAddUser = findPreference(KEY_ADD_USER);
        if (!mUserCaps.mCanAddRestrictedProfile) {
            // Label should only mention adding a "user", not a "profile"
            mAddUser.setTitle(R.string.user_add_user_menu);
            mAddUser.setTitle(com.android.settingslib.R.string.user_add_user);
        }
        mAddUser.setOnPreferenceClickListener(this);

@@ -425,9 +425,9 @@ public class UserSettings extends SettingsPreferenceFragment
        if (isCurrentUserGuest()) {
            // No need to load profile information
            mMePreference.setIcon(getEncircledDefaultIcon());
            mMePreference.setTitle(
                    mGuestUserAutoCreated ? com.android.settingslib.R.string.guest_reset_guest
                            : R.string.user_exit_guest_title);
            mMePreference.setTitle(mGuestUserAutoCreated
                    ? com.android.settingslib.R.string.guest_reset_guest
                    : com.android.settingslib.R.string.guest_exit_guest);
            mMePreference.setSelectable(true);
            // removing a guest will result in switching back to the admin user
            mMePreference.setEnabled(canSwitchUserNow());
@@ -704,7 +704,7 @@ public class UserSettings extends SettingsPreferenceFragment
            }
            case DIALOG_CONFIRM_EXIT_GUEST: {
                Dialog dlg = new AlertDialog.Builder(context)
                        .setTitle(R.string.user_exit_guest_confirm_title)
                        .setTitle(com.android.settingslib.R.string.guest_remove_guest_dialog_title)
                        .setMessage(R.string.user_exit_guest_confirm_message)
                        .setPositiveButton(R.string.user_exit_guest_dialog_remove,
                                new DialogInterface.OnClickListener() {
@@ -1157,7 +1157,7 @@ public class UserSettings extends SettingsPreferenceFragment
            mAddGuest.setIcon(centerAndTint(icon));
            mAddGuest.setSelectable(true);
            if (mGuestUserAutoCreated && mGuestCreationScheduled.get()) {
                mAddGuest.setTitle(com.android.settingslib.R.string.user_guest);
                mAddGuest.setTitle(com.android.internal.R.string.guest_name);
                mAddGuest.setSummary(R.string.guest_resetting);
                mAddGuest.setEnabled(false);
            } else {
+1 −1
Original line number Diff line number Diff line
@@ -373,7 +373,7 @@ public class UserDetailsSettingsTest {
        mFragment.initialize(mActivity, mArguments);

        verify(mRemoveUserPref).setOnPreferenceClickListener(mFragment);
        verify(mRemoveUserPref).setTitle(R.string.user_exit_guest_title);
        verify(mRemoveUserPref).setTitle(com.android.settingslib.R.string.guest_exit_guest);
        verify(mFragment, never()).removePreference(KEY_REMOVE_USER);
    }