From 8ab62a8750ddcde9d60996c37c018401858a0498 Mon Sep 17 00:00:00 2001 From: David Su Date: Wed, 29 Jan 2020 14:46:33 -0800 Subject: [PATCH] Migrate WifiManager.isDualModeSupported() to isStaApConcurrencySupported() isDualModeSupported is being removed, replace it with isStaApConcurrencySupported. Bug: 144925765 Test: compiles Change-Id: Ia3a0417a154ea401579a039113e96ba4578ffd80 --- .../wifi/tether/WifiTetherApBandPreferenceController.java | 2 +- .../tether/WifiTetherApBandPreferenceControllerTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceController.java b/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceController.java index b9b0d64d5c6..8953fc21790 100644 --- a/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceController.java +++ b/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceController.java @@ -40,7 +40,7 @@ public class WifiTetherApBandPreferenceController extends WifiTetherBasePreferen public WifiTetherApBandPreferenceController(Context context, OnTetherConfigUpdateListener listener) { super(context, listener); - isDualMode = mWifiManager.isDualModeSupported(); + isDualMode = mWifiManager.isStaApConcurrencySupported(); updatePreferenceEntries(); } diff --git a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java index 36279cb0051..b5645b4a3b2 100644 --- a/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/wifi/tether/WifiTetherApBandPreferenceControllerTest.java @@ -81,7 +81,7 @@ public class WifiTetherApBandPreferenceControllerTest { when(mScreen.findPreference(anyString())).thenReturn(mPreference); when(mWifiManager.getSoftApConfiguration()).thenReturn( new SoftApConfiguration.Builder().build()); - when(mWifiManager.isDualModeSupported()).thenReturn(false); + when(mWifiManager.isStaApConcurrencySupported()).thenReturn(false); mController = new WifiTetherApBandPreferenceController(mContext, mListener); } @@ -90,7 +90,7 @@ public class WifiTetherApBandPreferenceControllerTest { public void display_5GhzSupported_shouldDisplayFullList() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); - when(mWifiManager.isDualModeSupported()).thenReturn(true); + when(mWifiManager.isStaApConcurrencySupported()).thenReturn(true); // Create a new instance to pick the proper value of isDualModeSupported() mController = new WifiTetherApBandPreferenceController(mContext, mListener); @@ -156,7 +156,7 @@ public class WifiTetherApBandPreferenceControllerTest { public void changePreference_dualModeWith5G_shouldUpdateValue() { when(mWifiManager.getCountryCode()).thenReturn("US"); when(mWifiManager.is5GHzBandSupported()).thenReturn(true); - when(mWifiManager.isDualModeSupported()).thenReturn(true); + when(mWifiManager.isStaApConcurrencySupported()).thenReturn(true); // Create a new instance to pick the proper value of isDualModeSupported() mController = new WifiTetherApBandPreferenceController(mContext, mListener);