From 8722509eb983c3f4d50dfa74f02154d3f097f55b Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Thu, 3 Aug 2017 10:48:43 -0700 Subject: [PATCH] Misc tweaks in settings - Tweak layout for default sms picker icon. Now icons are aligned and forced to be in the same size - Update string to use correct double-quote symbol - Multiline title for some user & account setting Change-Id: I27c1ed6459c5cd919778d535ab846b148a3f91b6 Fixes: 64285520 Fixes: 62891178 Fixes: 62265094 Fixes: 64363209 Test: robotests Test: visual --- res/layout/app_preference_item.xml | 30 +++++++++++++------ res/values/strings.xml | 10 ++----- res/xml/reset_dashboard_fragment.xml | 1 - res/xml/user_and_accounts_settings.xml | 1 + .../FactoryResetPreferenceController.java | 27 ----------------- ...othDeviceNamePreferenceControllerTest.java | 2 +- 6 files changed, 25 insertions(+), 46 deletions(-) diff --git a/res/layout/app_preference_item.xml b/res/layout/app_preference_item.xml index 2f722a1452d..f13ced7651f 100755 --- a/res/layout/app_preference_item.xml +++ b/res/layout/app_preference_item.xml @@ -16,19 +16,31 @@ ** limitations under the License. */ --> - - + + android:layout_height="wrap_content" + android:gravity="start|center_vertical" + android:paddingEnd="12dp" + android:paddingTop="4dp" + android:paddingBottom="4dp"> + + %1$s wants to access your SIM card. Granting access to the SIM card will disable data connectivity on your device for the duration of the connection. Give access to %2$s? - Visible as \"^1\" to other devices + Visible as \u201C^1\u201D to other devices Your devices @@ -3140,13 +3140,7 @@ - Erase all data (Factory reset) - - - 1 account will be reset - %1$d accounts will be reset - - Internal storage & all data will be reset + Erase all data (factory reset) "This will erase all data from your tablet\u2019s internal storage, including:\n\n
  • Your Google account
  • \n
  • System and app data and settings
  • \n
  • Downloaded apps
  • "
    diff --git a/res/xml/reset_dashboard_fragment.xml b/res/xml/reset_dashboard_fragment.xml index 1fd45db23c8..2761496a3e0 100644 --- a/res/xml/reset_dashboard_fragment.xml +++ b/res/xml/reset_dashboard_fragment.xml @@ -38,7 +38,6 @@ profiles = mUm.getProfiles(UserHandle.myUserId()); - int accountsCount = 0; - for (UserInfo userInfo : profiles) { - final int profileId = userInfo.id; - Account[] accounts = mAm.getAccountsAsUser(profileId); - accountsCount += accounts.length; - } - if (accountsCount == 0) { - preference.setSummary(R.string.master_clear_summary); - } else { - preference.setSummary(mContext.getResources().getQuantityString( - R.plurals.master_clear_with_account_summary, - accountsCount, accountsCount)); - } - } } diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceNamePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceNamePreferenceControllerTest.java index d2254ff4416..2e094e24071 100644 --- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceNamePreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDeviceNamePreferenceControllerTest.java @@ -74,7 +74,7 @@ public class BluetoothDeviceNamePreferenceControllerTest { final CharSequence summary = mPreference.getSummary(); assertThat(summary.toString()) - .isEqualTo("Visible as \"Nightshade\" to other devices"); + .isEqualTo("Visible as \u201CNightshade\u201D to other devices"); assertThat(mPreference.isSelectable()).isFalse(); }