summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-06-02 00:30:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-06-02 00:30:34 +0000
commit7b0164f58cce4dc294bfe5604c05fc91b386647b (patch)
treede57b0277ac060a93d321358f87c7dd539c0ce6d
parente3e85bde7e43a65beaceceb18cb54625e7cd839d (diff)
parent3135402748487080c61e34b08cc2ab4991e52a56 (diff)
downloadwifi-7b0164f58cce4dc294bfe5604c05fc91b386647b.tar.gz
Merge "Revert "[HDM] Add API to check for STA+AP concurrency"" into pi-dev
-rw-r--r--service/java/com/android/server/wifi/HalDeviceManager.java53
-rw-r--r--tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java64
2 files changed, 0 insertions, 117 deletions
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) {
diff --git a/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java b/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
index 7e74e3070..f18c52d39 100644
--- a/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
@@ -687,22 +687,6 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
- * Validate STA+AP concurrency derivation from chip configuration.
- */
- @Test
- public void testIsConcurrentStaPlusApSupportedChipV1() throws Exception {
- TestChipV1 chipMock = new TestChipV1();
- chipMock.initialize();
- mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
- mManagerStatusListenerMock);
- executeAndValidateInitializationSequence();
- executeAndValidateStartupSequence();
-
- assertFalse("STA+AP concurrency should be FALSE for TestChipV1",
- mDut.isConcurrentStaPlusApSupported());
- }
-
- /**
* Validate creation of AP interface when in STA mode - but with no interface created. Expect
* a change in chip mode.
*/
@@ -1205,22 +1189,6 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
- * Validate STA+AP concurrency derivation from chip configuration.
- */
- @Test
- public void testIsConcurrentStaPlusApSupportedChipV2() throws Exception {
- TestChipV2 chipMock = new TestChipV2();
- chipMock.initialize();
- mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
- mManagerStatusListenerMock);
- executeAndValidateInitializationSequence();
- executeAndValidateStartupSequence();
-
- assertTrue("STA+AP concurrency should be TRUE for TestChipV2",
- mDut.isConcurrentStaPlusApSupported());
- }
-
- /**
* Validate a flow sequence for test chip 2:
* - create STA
* - create P2P
@@ -1498,22 +1466,6 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
- * Validate STA+AP concurrency derivation from chip configuration.
- */
- @Test
- public void testIsConcurrentStaPlusApSupportedChipV3() throws Exception {
- TestChipV3 chipMock = new TestChipV3();
- chipMock.initialize();
- mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
- mManagerStatusListenerMock);
- executeAndValidateInitializationSequence();
- executeAndValidateStartupSequence();
-
- assertTrue("STA+AP concurrency should be TRUE for TestChipV3",
- mDut.isConcurrentStaPlusApSupported());
- }
-
- /**
* Validate a flow sequence for test chip 3:
* - create STA
* - create P2P
@@ -1779,22 +1731,6 @@ public class HalDeviceManagerTest {
//////////////////////////////////////////////////////////////////////////////////////
/**
- * Validate STA+AP concurrency derivation from chip configuration.
- */
- @Test
- public void testIsConcurrentStaPlusApSupportedChipV4() throws Exception {
- TestChipV4 chipMock = new TestChipV4();
- chipMock.initialize();
- mInOrder = inOrder(mServiceManagerMock, mWifiMock, chipMock.chip,
- mManagerStatusListenerMock);
- executeAndValidateInitializationSequence();
- executeAndValidateStartupSequence();
-
- assertTrue("STA+AP concurrency should be TRUE for TestChipV4",
- mDut.isConcurrentStaPlusApSupported());
- }
-
- /**
* Validate a flow sequence for test chip 4:
* - create STA
* - create P2P