From 6ee894759a1281e08c80ded05e9567fd1ec3ca22 Mon Sep 17 00:00:00 2001 From: govenliu Date: Thu, 15 Aug 2019 12:03:59 +0800 Subject: [PATCH] [Wi-Fi HotSpot] Improve Wi-Fi hotspot settings entries visibility problem When the security type of hotspot changed, the hidden item will showed because of the Expanded child list is set as constant. To improve it, dynamicall adjust the Expanded child count according to the security type. Bug: 138594907 Test: Manually 1. Enter Settings APP -> Network & internet -> Hotspot & tethering ->Wi-Fi hotspot 2. Check if there are only two expanded items if the Security type is None, or three expaned items if the Security type is WPA2-personal 3. Change the Security type and back to check item 2 match or not. Change-Id: I84d1c5dca94d6a218cfc7ecd57e201e1cffdd878 --- res/xml/wifi_tether_settings.xml | 3 +- .../WifiTetherApBandPreferenceController.java | 2 +- .../WifiTetherBasePreferenceController.java | 2 +- ...ifiTetherPasswordPreferenceController.java | 2 +- .../WifiTetherSSIDPreferenceController.java | 2 +- ...ifiTetherSecurityPreferenceController.java | 2 +- .../wifi/tether/WifiTetherSettings.java | 32 ++++++++++++++++--- ...iTetherApBandPreferenceControllerTest.java | 12 +++---- ...etherPasswordPreferenceControllerTest.java | 2 +- ...ifiTetherSSIDPreferenceControllerTest.java | 2 +- 10 files changed, 42 insertions(+), 19 deletions(-) diff --git a/res/xml/wifi_tether_settings.xml b/res/xml/wifi_tether_settings.xml index 81e60a2d8e1..3a3bdc4ba4b 100644 --- a/res/xml/wifi_tether_settings.xml +++ b/res/xml/wifi_tether_settings.xml @@ -20,8 +20,7 @@ xmlns:settings="http://schemas.android.com/apk/res-auto" android:key="wifi_tether_settings_screen" android:title="@string/wifi_hotspot_checkbox_text" - settings:searchable="false" - settings:initialExpandedChildrenCount="3"> + settings:searchable="false">