From 3135402748487080c61e34b08cc2ab4991e52a56 Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Fri, 1 Jun 2018 16:18:40 +0000 Subject: Revert "[HDM] Add API to check for STA+AP concurrency" This reverts commit 5a2a9e11a8f3f4d82e9d451a2fe06eba9e8b39fc. Reason for revert: API only functions if Wi-Fi is on - otherwise it returns incorrect information. Bug: 80251951 Test: N/A Change-Id: I847b394816252b417158f5c83d3b3c3efc14aabb --- .../com/android/server/wifi/HalDeviceManager.java | 53 ---------------------- 1 file changed, 53 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/HalDeviceManager.java b/service/java/com/android/server/wifi/HalDeviceManager.java index f570ffcb5..3c61217d7 100644 --- a/service/java/com/android/server/wifi/HalDeviceManager.java +++ b/service/java/com/android/server/wifi/HalDeviceManager.java @@ -204,16 +204,6 @@ public class HalDeviceManager { return getSupportedIfaceTypesInternal(chip); } - /** - * Checks whether the device (the combination of all Wi-Fi chips on the device) supports a - * concurrent combination of 1 or more STAs and 1 or more APs. - * - * @return true if STA+AP concurrency is supported, false otherwise. - */ - public boolean isConcurrentStaPlusApSupported() { - return isConcurrentStaPlusApSupportedInternal(); - } - // interface-specific behavior /** @@ -1323,49 +1313,6 @@ public class HalDeviceManager { return results; } - private boolean isConcurrentStaPlusApSupportedInternal() { - if (mDbg) Log.d(TAG, "isConcurrentStaPlusApSupportedInternal"); - - synchronized (mLock) { - WifiChipInfo[] chipInfos = getAllChipInfo(); - if (chipInfos == null) { - Log.e(TAG, "isConcurrentStaPlusApSupportedInternal: no chip info found"); - stopWifi(); // major error: shutting down - return false; - } - - if (!validateInterfaceCache(chipInfos)) { - Log.e(TAG, "isConcurrentStaPlusApSupportedInternal: local cache is invalid!"); - stopWifi(); // major error: shutting down - return false; - } - - // check whether any chip individually supports AP+STA - // TODO b/80270202: this does not fully handle multi-chip behavior - for (WifiChipInfo chipInfo : chipInfos) { - for (IWifiChip.ChipMode chipMode : chipInfo.availableModes) { - for (IWifiChip.ChipIfaceCombination chipIfaceCombo : chipMode - .availableCombinations) { - int[][] expandedIfaceCombos = expandIfaceCombos(chipIfaceCombo); - if (VDBG) { - Log.d(TAG, chipIfaceCombo + " expands to " + Arrays.deepToString( - expandedIfaceCombos)); - } - - for (int[] expandedIfaceCombo : expandedIfaceCombos) { - if (expandedIfaceCombo[IfaceType.STA] > 0 - && expandedIfaceCombo[IfaceType.AP] > 0) { - return true; - } - } - } - } - } - } - - return false; - } - private IWifiIface createIface(int ifaceType, boolean lowPriority, InterfaceDestroyedListener destroyedListener, Handler handler) { if (mDbg) { -- cgit v1.2.3