[automerge] Update multiple users strings 2p: 296b904bf1

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17352043

Bug: 219078700
Change-Id: Ib2e47960b4602cacf727f18d47fe405b850c3ef4
This commit is contained in:
Matt Pietal
2022-03-23 17:40:45 +00:00
committed by Presubmit Automerger Backend
3 changed files with 5 additions and 6 deletions

View File

@@ -7657,8 +7657,7 @@
<string name="user_you">You (<xliff:g id="name" example="Name">%s</xliff:g>)</string> <string name="user_you">You (<xliff:g id="name" example="Name">%s</xliff:g>)</string>
<!-- Summary for add user action, when it's disabled [CHAR LIMIT=100] --> <!-- Summary for add user action, when it's disabled [CHAR LIMIT=100] -->
<string name="user_add_max_count">You can add up to <xliff:g id="user_count">%1$d</xliff:g> users</string> <string name="user_add_max_count">You can\u2019t add any more users. Remove a user to add a new one.</string>
<!-- Message to secondary users that only owner can manage users [CHAR LIMIT=none] --> <!-- Message to secondary users that only owner can manage users [CHAR LIMIT=none] -->
<string name="user_cannot_manage_message" product="tablet">Only the tablet\u2019s owner can manage users.</string> <string name="user_cannot_manage_message" product="tablet">Only the tablet\u2019s owner can manage users.</string>
@@ -13712,7 +13711,7 @@
<!-- Title for default print service main switch. [CHAR LIMIT=50] --> <!-- Title for default print service main switch. [CHAR LIMIT=50] -->
<string name="default_print_service_main_switch_title">Use print service</string> <string name="default_print_service_main_switch_title">Use print service</string>
<!-- Title for multiple users main switch. [CHAR LIMIT=50] --> <!-- Title for multiple users main switch. [CHAR LIMIT=50] -->
<string name="multiple_users_main_switch_title">Enable multiple users</string> <string name="multiple_users_main_switch_title">Allow multiple users</string>
<!-- Title for wireless debugging main switch. [CHAR LIMIT=50] --> <!-- Title for wireless debugging main switch. [CHAR LIMIT=50] -->
<string name="wireless_debugging_main_switch_title">Use wireless debugging</string> <string name="wireless_debugging_main_switch_title">Use wireless debugging</string>
<!-- Title for graphics driver main switch. [CHAR LIMIT=50] --> <!-- Title for graphics driver main switch. [CHAR LIMIT=50] -->

View File

@@ -1199,8 +1199,7 @@ public class UserSettings extends SettingsPreferenceFragment
addUser.setEnabled(canAddMoreUsers && !mAddingUser && canSwitchUserNow()); addUser.setEnabled(canAddMoreUsers && !mAddingUser && canSwitchUserNow());
if (!canAddMoreUsers) { if (!canAddMoreUsers) {
addUser.setSummary( addUser.setSummary(getString(R.string.user_add_max_count));
getString(R.string.user_add_max_count, getRealUsersCount()));
} else { } else {
addUser.setSummary(null); addUser.setSummary(null);
} }

View File

@@ -354,7 +354,8 @@ public class UserSettingsTest {
mFragment.updateUserList(); mFragment.updateUserList();
verify(mAddUserPreference).setVisible(true); verify(mAddUserPreference).setVisible(true);
verify(mAddUserPreference).setSummary("You can add up to 4 users"); verify(mAddUserPreference).setSummary(
"You can\u2019t add any more users. Remove a user to add a new one.");
verify(mAddUserPreference).setEnabled(false); verify(mAddUserPreference).setEnabled(false);
verify(mAddUserPreference).setSelectable(true); verify(mAddUserPreference).setSelectable(true);
} }