[Wi-Fi] Add STA+AP information in Hotspot & tethering footer

Use WifiManager#isStaApConcurrencySupported() to check if a
device supports STA+AP and shows the footer information.

Bug: 121328949
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherFooterPreferenceControllerTest
Change-Id: I3446abb5cc9cdf76da8d17f5de31bd65715c165c
This commit is contained in:
Arc Wang
2020-03-04 21:03:54 +08:00
parent be753c3543
commit 005fe6951c
12 changed files with 190 additions and 3 deletions

View File

@@ -56,6 +56,7 @@ import com.android.settings.widget.SwitchBarController;
import com.android.settings.wifi.tether.WifiTetherApBandPreferenceController;
import com.android.settings.wifi.tether.WifiTetherAutoOffPreferenceController;
import com.android.settings.wifi.tether.WifiTetherBasePreferenceController;
import com.android.settings.wifi.tether.WifiTetherFooterPreferenceController;
import com.android.settings.wifi.tether.WifiTetherPasswordPreferenceController;
import com.android.settings.wifi.tether.WifiTetherSSIDPreferenceController;
import com.android.settings.wifi.tether.WifiTetherSecurityPreferenceController;
@@ -71,7 +72,7 @@ import java.util.concurrent.atomic.AtomicReference;
* Displays preferences for all Tethering options.
*/
@SearchIndexable
public final class AllInOneTetherSettings extends RestrictedDashboardFragment
public class AllInOneTetherSettings extends RestrictedDashboardFragment
implements DataSaverBackend.Listener,
WifiTetherBasePreferenceController.OnTetherConfigUpdateListener,
SharedPreferences.OnSharedPreferenceChangeListener {
@@ -304,6 +305,8 @@ public final class AllInOneTetherSettings extends RestrictedDashboardFragment
new WifiTetherSecurityPreferenceController(context, listener));
controllers.add(
new WifiTetherAutoOffPreferenceController(context, KEY_WIFI_TETHER_AUTO_OFF));
controllers.add(
new WifiTetherFooterPreferenceController(context));
return controllers;
}