From c94da8b7ce87b699913da81bdfce2c5690d7a1d3 Mon Sep 17 00:00:00 2001 From: Beverly Date: Wed, 21 Nov 2018 13:22:31 -0500 Subject: [PATCH 1/7] Remove "Allow alarms" from top level DND settings Test: manual Bug: 111475013 Change-Id: Ieb2539a7f0a389738a936cb9210951d07121e69a --- res/xml/zen_mode_settings.xml | 5 ----- src/com/android/settings/notification/ZenModeSettings.java | 2 -- 2 files changed, 7 deletions(-) diff --git a/res/xml/zen_mode_settings.xml b/res/xml/zen_mode_settings.xml index 19664840239..20143080c4e 100644 --- a/res/xml/zen_mode_settings.xml +++ b/res/xml/zen_mode_settings.xml @@ -37,11 +37,6 @@ android:title="@string/zen_mode_messages_title" android:fragment="com.android.settings.notification.ZenModeMessagesSettings" /> - - - Date: Fri, 29 Jun 2018 14:21:39 +0900 Subject: [PATCH 2/7] Display a toast to notify user that Preset APN setting cannot be viewed When KEY_HIDE_PRESET_APN_DETAILS_BOOL is set to true, Preset APN setting is hidden. When user taps Preset APN, a toast should be shown to inform that user cannot view the APN. Test: manual - check Preset APN setting details are hidden Bug: 115453290 Depends-On: I8a5c6f92f876d349b304acf89b4ffab86ff3f24b Change-Id: I0078b3492ae87a4297f24871b8bea1579e6a79af --- res/values/strings.xml | 3 +++ .../settings/network/ApnPreference.java | 11 ++++++++ .../android/settings/network/ApnSettings.java | 25 ++++++++++++++++--- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 533c1304c0f..21bec16b3b1 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -10041,6 +10041,9 @@ Take call on + + This APN cannot be changed. + Improve tablet\'s battery life diff --git a/src/com/android/settings/network/ApnPreference.java b/src/com/android/settings/network/ApnPreference.java index 27d275f83c6..73837af6b5d 100755 --- a/src/com/android/settings/network/ApnPreference.java +++ b/src/com/android/settings/network/ApnPreference.java @@ -29,6 +29,7 @@ import android.util.Log; import android.view.View; import android.widget.CompoundButton; import android.widget.RadioButton; +import android.widget.Toast; import com.android.settings.R; @@ -53,6 +54,7 @@ public class ApnPreference extends Preference implements CompoundButton.OnChecke private static CompoundButton mCurrentChecked = null; private boolean mProtectFromCheckedChange = false; private boolean mSelectable = true; + private boolean mHideDetails = false; @Override public void onBindViewHolder(PreferenceViewHolder view) { @@ -112,6 +114,11 @@ public class ApnPreference extends Preference implements CompoundButton.OnChecke super.onClick(); Context context = getContext(); if (context != null) { + if (mHideDetails) { + Toast.makeText(context, context.getString( + R.string.cannot_change_apn_toast), Toast.LENGTH_LONG).show(); + return; + } int pos = Integer.parseInt(getKey()); Uri url = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, pos); Intent editIntent = new Intent(Intent.ACTION_EDIT, url); @@ -131,4 +138,8 @@ public class ApnPreference extends Preference implements CompoundButton.OnChecke public void setSubId(int subId) { mSubId = subId; } + + public void setHideDetails() { + mHideDetails = true; + } } diff --git a/src/com/android/settings/network/ApnSettings.java b/src/com/android/settings/network/ApnSettings.java index 5bc52cc9d3d..ad7f463b231 100755 --- a/src/com/android/settings/network/ApnSettings.java +++ b/src/com/android/settings/network/ApnSettings.java @@ -77,12 +77,23 @@ public class ApnSettings extends RestrictedSettingsFragment { public static final String MVNO_TYPE = "mvno_type"; public static final String MVNO_MATCH_DATA = "mvno_match_data"; + private static final String[] CARRIERS_PROJECTION = new String[] { + Telephony.Carriers._ID, + Telephony.Carriers.NAME, + Telephony.Carriers.APN, + Telephony.Carriers.TYPE, + Telephony.Carriers.MVNO_TYPE, + Telephony.Carriers.MVNO_MATCH_DATA, + Telephony.Carriers.EDITED, + }; + private static final int ID_INDEX = 0; private static final int NAME_INDEX = 1; private static final int APN_INDEX = 2; private static final int TYPES_INDEX = 3; private static final int MVNO_TYPE_INDEX = 4; private static final int MVNO_MATCH_DATA_INDEX = 5; + private static final int EDITED_INDEX = 6; private static final int MENU_NEW = Menu.FIRST; private static final int MENU_RESTORE = Menu.FIRST + 1; @@ -115,6 +126,7 @@ public class ApnSettings extends RestrictedSettingsFragment { private boolean mHideImsApn; private boolean mAllowAddingApns; + private boolean mHidePresetApnDetails; public ApnSettings() { super(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS); @@ -195,6 +207,7 @@ public class ApnSettings extends RestrictedSettingsFragment { mAllowAddingApns = false; } } + mHidePresetApnDetails = b.getBoolean(CarrierConfigManager.KEY_HIDE_PRESET_APN_DETAILS_BOOL); mUserManager = UserManager.get(activity); } @@ -276,9 +289,8 @@ public class ApnSettings extends RestrictedSettingsFragment { where.append(" AND NOT (type='ims')"); } - Cursor cursor = getContentResolver().query(Telephony.Carriers.CONTENT_URI, new String[] { - "_id", "name", "apn", "type", "mvno_type", "mvno_match_data"}, where.toString(), - null, Telephony.Carriers.DEFAULT_SORT_ORDER); + Cursor cursor = getContentResolver().query(Telephony.Carriers.CONTENT_URI, + CARRIERS_PROJECTION, where.toString(), null, Telephony.Carriers.DEFAULT_SORT_ORDER); if (cursor != null) { IccRecords r = null; @@ -303,14 +315,19 @@ public class ApnSettings extends RestrictedSettingsFragment { String type = cursor.getString(TYPES_INDEX); String mvnoType = cursor.getString(MVNO_TYPE_INDEX); String mvnoMatchData = cursor.getString(MVNO_MATCH_DATA_INDEX); + int edited = cursor.getInt(EDITED_INDEX); ApnPreference pref = new ApnPreference(getPrefContext()); pref.setKey(key); pref.setTitle(name); - pref.setSummary(apn); pref.setPersistent(false); pref.setSubId(subId); + if (mHidePresetApnDetails && edited == Telephony.Carriers.UNEDITED) { + pref.setHideDetails(); + } else { + pref.setSummary(apn); + } boolean selectable = ((type == null) || !type.equals("mms")); pref.setSelectable(selectable); From 1638168336d1b5e9c2b77859dacbb7f19b2462e2 Mon Sep 17 00:00:00 2001 From: Hai Shalom Date: Tue, 13 Nov 2018 16:37:24 -0800 Subject: [PATCH 3/7] [WPA3] Filter unsupported networks from Add network spinner Filter unsupported networks from Add network spinner. Removed entries from wifi_dialog.xml, adding them dynamically based on device capabilities. Adding position-to-security table, that decouples spinner positions from security values. Bug: 112195778 Test: atest WifiConfigControllerTest + device functional test Change-Id: I6a814c4d69fbd8d8076db5dbaa5da807b4da4c32 --- res/layout/wifi_dialog.xml | 5 +- res/values/arrays.xml | 23 ---- .../settings/wifi/WifiConfigController.java | 100 ++++++++++++++---- .../wifi/WifiConfigControllerTest.java | 77 ++++++++++++++ ...etherSecurityPreferenceControllerTest.java | 10 +- 5 files changed, 165 insertions(+), 50 deletions(-) diff --git a/res/layout/wifi_dialog.xml b/res/layout/wifi_dialog.xml index 72eb011befb..bb2946d9202 100644 --- a/res/layout/wifi_dialog.xml +++ b/res/layout/wifi_dialog.xml @@ -83,12 +83,13 @@ style="@style/wifi_item_label" android:text="@string/wifi_security" /> + + + android:prompt="@string/wifi_security" /> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 80224bd2fec..0ddd3ea9ce6 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -210,29 +210,6 @@ Temporarily avoiding poor connection - - - - - @string/wifi_security_none - @string/wifi_security_wep - @string/wifi_security_psk_generic - @string/wifi_security_eap - @string/wifi_security_owe - @string/wifi_security_sae - @string/wifi_security_eap_suiteb - - - - - - - @string/wifi_security_none - @string/wifi_security_wep - @string/wifi_security_psk_generic - @string/wifi_security_sae - - diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java index 70837a6a810..2e3b76aea84 100644 --- a/src/com/android/settings/wifi/WifiConfigController.java +++ b/src/com/android/settings/wifi/WifiConfigController.java @@ -34,6 +34,7 @@ import android.net.wifi.WifiEnterpriseConfig; import android.net.wifi.WifiEnterpriseConfig.Eap; import android.net.wifi.WifiEnterpriseConfig.Phase2; import android.net.wifi.WifiInfo; +import android.net.wifi.WifiManager; import android.os.UserManager; import android.security.Credentials; import android.security.KeyStore; @@ -119,9 +120,9 @@ public class WifiConfigController implements TextWatcher, /* Phase2 methods supported by PEAP are limited */ - private final ArrayAdapter mPhase2PeapAdapter; + private ArrayAdapter mPhase2PeapAdapter; /* Full list of phase2 methods */ - private final ArrayAdapter mPhase2FullAdapter; + private ArrayAdapter mPhase2FullAdapter; // e.g. AccessPoint.SECURITY_NONE @VisibleForTesting @@ -174,6 +175,9 @@ public class WifiConfigController implements TextWatcher, private TextView mSsidView; private Context mContext; + private Integer mSecurityInPosition[]; + + private final WifiManager mWifiManager; public WifiConfigController(WifiConfigUiBase parent, View view, AccessPoint accessPoint, int mode) { @@ -181,11 +185,31 @@ public class WifiConfigController implements TextWatcher, mView = view; mAccessPoint = accessPoint; + mContext = mConfigUi.getContext(); + + // Init Wi-Fi manager + mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); + initWifiConfigController(accessPoint, mode); + } + + @VisibleForTesting + public WifiConfigController(WifiConfigUiBase parent, View view, AccessPoint accessPoint, + int mode, WifiManager wifiManager) { + mConfigUi = parent; + + mView = view; + mAccessPoint = accessPoint; + mContext = mConfigUi.getContext(); + mWifiManager = wifiManager; + initWifiConfigController(accessPoint, mode); + } + + private void initWifiConfigController(AccessPoint accessPoint, int mode) { + mAccessPointSecurity = (accessPoint == null) ? AccessPoint.SECURITY_NONE : accessPoint.getSecurity(); mMode = mode; - mContext = mConfigUi.getContext(); final Resources res = mContext.getResources(); mLevels = res.getStringArray(R.array.wifi_signal); @@ -234,24 +258,10 @@ public class WifiConfigController implements TextWatcher, mHiddenSettingsSpinner.getSelectedItemPosition() == NOT_HIDDEN_NETWORK ? View.GONE : View.VISIBLE); + mSecurityInPosition = new Integer[AccessPoint.SECURITY_MAX_VAL]; if (mAccessPoint == null) { // new network - mConfigUi.setTitle(R.string.wifi_add_network); - - mSsidView = (TextView) mView.findViewById(R.id.ssid); - mSsidView.addTextChangedListener(this); - mSecuritySpinner = ((Spinner) mView.findViewById(R.id.security)); - mSecuritySpinner.setOnItemSelectedListener(this); - mView.findViewById(R.id.type).setVisibility(View.VISIBLE); - - showIpConfigFields(); - showProxyFields(); - mView.findViewById(R.id.wifi_advanced_toggle).setVisibility(View.VISIBLE); - // Hidden option can be changed only when the user adds a network manually. - mView.findViewById(R.id.hidden_settings_field).setVisibility(View.VISIBLE); - ((CheckBox) mView.findViewById(R.id.wifi_advanced_togglebox)) - .setOnCheckedChangeListener(this); - + configureSecuritySpinner(); mConfigUi.setSubmitButton(res.getString(R.string.wifi_save)); } else { if (!mAccessPoint.isPasspointConfig()) { @@ -1414,7 +1424,8 @@ public class WifiConfigController implements TextWatcher, @Override public void onItemSelected(AdapterView parent, View view, int position, long id) { if (parent == mSecuritySpinner) { - mAccessPointSecurity = position; + // Convert menu position to actual Wi-Fi security type + mAccessPointSecurity = mSecurityInPosition[position]; showSecurityFields(); } else if (parent == mEapMethodSpinner || parent == mEapCaCertSpinner) { showSecurityFields(); @@ -1459,4 +1470,53 @@ public class WifiConfigController implements TextWatcher, public AccessPoint getAccessPoint() { return mAccessPoint; } + + private void configureSecuritySpinner() { + mConfigUi.setTitle(R.string.wifi_add_network); + + mSsidView = (TextView) mView.findViewById(R.id.ssid); + mSsidView.addTextChangedListener(this); + mSecuritySpinner = ((Spinner) mView.findViewById(R.id.security)); + mSecuritySpinner.setOnItemSelectedListener(this); + + ArrayAdapter spinnerAdapter = new ArrayAdapter(mContext, + android.R.layout.simple_spinner_item, android.R.id.text1); + spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + mSecuritySpinner.setAdapter(spinnerAdapter); + int idx = 0; + + // Populate the Wi-Fi security spinner with the various supported key management types + spinnerAdapter.add(mContext.getString(R.string.wifi_security_none)); + mSecurityInPosition[idx++] = AccessPoint.SECURITY_NONE; + if (mWifiManager.isOweSupported()) { + spinnerAdapter.add(mContext.getString(R.string.wifi_security_owe)); + mSecurityInPosition[idx++] = AccessPoint.SECURITY_OWE; + } + spinnerAdapter.add(mContext.getString(R.string.wifi_security_wep)); + mSecurityInPosition[idx++] = AccessPoint.SECURITY_WEP; + spinnerAdapter.add(mContext.getString(R.string.wifi_security_wpa_wpa2)); + mSecurityInPosition[idx++] = AccessPoint.SECURITY_PSK; + if (mWifiManager.isWpa3SaeSupported()) { + spinnerAdapter.add(mContext.getString(R.string.wifi_security_sae)); + mSecurityInPosition[idx++] = AccessPoint.SECURITY_SAE; + } + spinnerAdapter.add(mContext.getString(R.string.wifi_security_eap)); + mSecurityInPosition[idx++] = AccessPoint.SECURITY_EAP; + if (mWifiManager.isWpa3SuiteBSupported()) { + spinnerAdapter.add(mContext.getString(R.string.wifi_security_eap_suiteb)); + mSecurityInPosition[idx++] = AccessPoint.SECURITY_EAP_SUITE_B; + } + + spinnerAdapter.notifyDataSetChanged(); + + mView.findViewById(R.id.type).setVisibility(View.VISIBLE); + + showIpConfigFields(); + showProxyFields(); + mView.findViewById(R.id.wifi_advanced_toggle).setVisibility(View.VISIBLE); + // Hidden option can be changed only when the user adds a network manually. + mView.findViewById(R.id.hidden_settings_field).setVisibility(View.VISIBLE); + ((CheckBox) mView.findViewById(R.id.wifi_advanced_togglebox)) + .setOnCheckedChangeListener(this); + } } diff --git a/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java b/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java index 471c991bfad..411e68e4c9c 100644 --- a/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java +++ b/tests/robotests/src/com/android/settings/wifi/WifiConfigControllerTest.java @@ -22,16 +22,19 @@ import static org.mockito.Mockito.any; import static org.mockito.Mockito.anyBoolean; import static org.mockito.Mockito.anyInt; import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.content.Context; +import android.net.wifi.WifiManager; import android.os.ServiceSpecificException; import android.security.KeyStore; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ArrayAdapter; import android.widget.Spinner; import android.widget.TextView; @@ -298,6 +301,74 @@ public class WifiConfigControllerTest { assertThat(hiddenField.getVisibility()).isEqualTo(View.VISIBLE); } + @Test + public void securitySpinner_saeSuitebAndOweNotVisible() { + securitySpinnerTestHelper(false, false, false); + } + + @Test + public void securitySpinner_saeSuitebAndOweVisible() { + securitySpinnerTestHelper(true, true, true); + } + + @Test + public void securitySpinner_saeVisible_suitebAndOweNotVisible() { + securitySpinnerTestHelper(true, false, false); + } + + @Test + public void securitySpinner_oweVisible_suitebAndSaeNotVisible() { + securitySpinnerTestHelper(false, false, true); + } + + private void securitySpinnerTestHelper(boolean saeVisible, boolean suitebVisible, + boolean oweVisible) { + WifiManager wifiManager = mock(WifiManager.class); + when(wifiManager.isWpa3SaeSupported()).thenReturn(saeVisible ? true : false); + when(wifiManager.isWpa3SuiteBSupported()).thenReturn(suitebVisible ? true : false); + when(wifiManager.isOweSupported()).thenReturn(oweVisible ? true : false); + + mController = new TestWifiConfigController(mConfigUiBase, mView, null /* accessPoint */, + WifiConfigUiBase.MODE_MODIFY, wifiManager); + + final Spinner securitySpinner = ((Spinner) mView.findViewById(R.id.security)); + final ArrayAdapter adapter = (ArrayAdapter) securitySpinner.getAdapter(); + boolean saeFound = false; + boolean suitebFound = false; + boolean oweFound = false; + for (int i = 0; i < adapter.getCount(); i++) { + String val = adapter.getItem(i); + + if (val.compareTo(mContext.getString(R.string.wifi_security_sae)) == 0) { + saeFound = true; + } + + if (val.compareTo(mContext.getString(R.string.wifi_security_eap_suiteb)) == 0) { + suitebFound = true; + } + + if (val.compareTo(mContext.getString(R.string.wifi_security_owe)) == 0) { + oweFound = true; + } + } + + if (saeVisible) { + assertThat(saeFound).isTrue(); + } else { + assertThat(saeFound).isFalse(); + } + if (suitebVisible) { + assertThat(suitebFound).isTrue(); + } else { + assertThat(suitebFound).isFalse(); + } + if (oweVisible) { + assertThat(oweFound).isTrue(); + } else { + assertThat(oweFound).isFalse(); + } + } + public class TestWifiConfigController extends WifiConfigController { private TestWifiConfigController( @@ -305,6 +376,12 @@ public class WifiConfigControllerTest { super(parent, view, accessPoint, mode); } + private TestWifiConfigController( + WifiConfigUiBase parent, View view, AccessPoint accessPoint, int mode, + WifiManager wifiManager) { + super(parent, view, accessPoint, mode, wifiManager); + } + @Override boolean isSplitSystemUser() { return false; diff --git a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java index e8d13dfe218..bbf15add06a 100644 --- a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherSecurityPreferenceControllerTest.java @@ -66,11 +66,11 @@ public class WifiTetherSecurityPreferenceControllerTest { public void onPreferenceChange_securityValueUpdated() { mController.onPreferenceChange(mPreference, WPA2_PSK); assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK); - assertThat(mPreference.getSummary()).isEqualTo("WPA2-Personal"); + assertThat(mPreference.getSummary().toString()).isEqualTo("WPA2-Personal"); mController.onPreferenceChange(mPreference, NONE); assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.NONE); - assertThat(mPreference.getSummary()).isEqualTo("None"); + assertThat(mPreference.getSummary().toString()).isEqualTo("None"); } @Test @@ -79,7 +79,7 @@ public class WifiTetherSecurityPreferenceControllerTest { when(mWifiManager.getWifiApConfiguration()).thenReturn(null); mController.updateDisplay(); assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK); - assertThat(mPreference.getSummary()).isEqualTo("WPA2-Personal"); + assertThat(mPreference.getSummary().toString()).isEqualTo("WPA2-Personal"); // test open tether network when(mWifiManager.getWifiApConfiguration()).thenReturn(mConfig); @@ -87,13 +87,13 @@ public class WifiTetherSecurityPreferenceControllerTest { mConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); mController.updateDisplay(); assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.NONE); - assertThat(mPreference.getSummary()).isEqualTo("None"); + assertThat(mPreference.getSummary().toString()).isEqualTo("None"); // test WPA2-Personal tether network mConfig.allowedKeyManagement.clear(); mConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK); mController.updateDisplay(); assertThat(mController.getSecurityType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK); - assertThat(mPreference.getSummary()).isEqualTo("WPA2-Personal"); + assertThat(mPreference.getSummary().toString()).isEqualTo("WPA2-Personal"); } } From dd7f99ba879d3da08d02e7cafc3bca52cf5e0481 Mon Sep 17 00:00:00 2001 From: tmfang Date: Wed, 21 Nov 2018 18:23:21 +0800 Subject: [PATCH 4/7] Fix action bar color in App info header - Action bar color is same as status bar. Test: visual Fixes: 119893936 Change-Id: I8806295f9f42b27d14eb7f3521907a3a234b9593 --- src/com/android/settings/widget/EntityHeaderController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/widget/EntityHeaderController.java b/src/com/android/settings/widget/EntityHeaderController.java index 853313fd32b..267838cc0a9 100644 --- a/src/com/android/settings/widget/EntityHeaderController.java +++ b/src/com/android/settings/widget/EntityHeaderController.java @@ -321,7 +321,7 @@ public class EntityHeaderController { } actionBar.setBackgroundDrawable( new ColorDrawable( - Utils.getColorAttrDefaultColor(activity, android.R.attr.colorPrimary))); + Utils.getColorAttrDefaultColor(activity, android.R.attr.colorPrimaryDark))); actionBar.setElevation(0); if (mRecyclerView != null && mLifecycle != null) { ActionBarShadowController.attachToRecyclerView(mActivity, mLifecycle, mRecyclerView); From a4586d40fd1a79c92be57904f8fd0b7ed5581b99 Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Thu, 22 Nov 2018 14:26:40 +0800 Subject: [PATCH 5/7] Change settings launcher icon background color Change-Id: Ie24466120208fcd584fa1ee14020e39058992901 Fixes: 119119603 Test: visual --- res/drawable/ic_launcher_settings.xml | 2 +- res/values/colors.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/res/drawable/ic_launcher_settings.xml b/res/drawable/ic_launcher_settings.xml index cdf9e3565a3..9ede59d3c7b 100644 --- a/res/drawable/ic_launcher_settings.xml +++ b/res/drawable/ic_launcher_settings.xml @@ -1,5 +1,5 @@ - + diff --git a/res/values/colors.xml b/res/values/colors.xml index 34885b4770a..5dfc0b91e7c 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -149,5 +149,8 @@ #ff4caf50 #fffdd835 #ff9e9e9e + + + @*android:color/accent_device_default_light From 2f180488f9d24e5405d9bd20ebb974fd7dc2f265 Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Mon, 26 Nov 2018 14:58:22 +0800 Subject: [PATCH 6/7] Hide dropdown list by default. Test: manual Change-Id: I0b3ae219404cf1c503cf71410d7bdcd5daef4fb6 Fixes: 119872107 --- res/xml/app_data_usage.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/xml/app_data_usage.xml b/res/xml/app_data_usage.xml index 5eaee969c25..e64a1c5cc63 100644 --- a/res/xml/app_data_usage.xml +++ b/res/xml/app_data_usage.xml @@ -21,7 +21,8 @@ android:title="@string/data_usage_app_summary_title"> + android:key="cycle" + settings:isPreferenceVisible="false" /> From 7b38d57080f4d6868a7ec19e91b057eba9afd2d8 Mon Sep 17 00:00:00 2001 From: Salvador Martinez Date: Mon, 26 Nov 2018 13:35:58 -0800 Subject: [PATCH 7/7] Update battery percentage preference strings This changes the preference to be "Battery Info" and updates the summary text to mention time remaning in addition to percentage. Test: None, String only change Change-Id: Id9a8132051455842a76104ed0f2abfca3b589011 Fixes: 119828170 --- res/values/strings.xml | 4 ++-- res/xml/power_usage_summary.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index d9ac590240e..5f887fdd49b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5420,9 +5420,9 @@ at %1$s battery - Battery percentage + Battery Information - Show battery percentage in status bar + Show percentage and time left before charge is needed diff --git a/res/xml/power_usage_summary.xml b/res/xml/power_usage_summary.xml index b4db4ed155e..48e1276bc39 100644 --- a/res/xml/power_usage_summary.xml +++ b/res/xml/power_usage_summary.xml @@ -50,8 +50,8 @@