[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
This commit is contained in:
govenliu
2019-08-15 12:03:59 +08:00
parent 0ec21f8a1b
commit 6ee894759a
10 changed files with 42 additions and 19 deletions

View File

@@ -30,7 +30,7 @@ public abstract class WifiTetherBasePreferenceController extends AbstractPrefere
implements PreferenceControllerMixin, Preference.OnPreferenceChangeListener {
public interface OnTetherConfigUpdateListener {
void onTetherConfigUpdated();
void onTetherConfigUpdated(AbstractPreferenceController context);
}
protected final WifiManager mWifiManager;