summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAhmed ElArabawy <arabawy@google.com>2018-05-23 14:23:59 -0700
committerAhmed ElArabawy <arabawy@google.com>2018-06-08 09:54:13 -0700
commit1b8216207b5ab9c5cc64932c9c731843fe819539 (patch)
tree2bf15db585e7f0944ded23628938bbb4c6660af5 /service
parent7db85489ea6deb3658ed6fc4895622e7a5ec3b18 (diff)
WiFi: SAR: Cleanup dead code
In previous commits, new SAR functionality was added to support handling of the SAR sensor. As part of the migration towards the new functionality, some old code was kept. This commit removes this old code (currently unused). Bug: 65174506 Test: Run Wifi unit test suite Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I2f9a789f0ae464e812c87a7c3c02c1955333a7a1 Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiNative.java24
-rw-r--r--service/java/com/android/server/wifi/WifiVendorHal.java50
2 files changed, 0 insertions, 74 deletions
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java
index 5369b0e1e..bc599c141 100644
--- a/service/java/com/android/server/wifi/WifiNative.java
+++ b/service/java/com/android/server/wifi/WifiNative.java
@@ -2820,30 +2820,6 @@ public class WifiNative {
}
/**
- * TODO: These constants will be removed in a future change
- * They are left for the interim use
- *
- * Tx power level scenarios that can be selected.
- */
- public static final int TX_POWER_SCENARIO_NORMAL = 0;
- public static final int TX_POWER_SCENARIO_VOICE_CALL = 1;
-
- /**
- * TODO: This method is deprecated and will be removed in a future change to use
- * the interface with sarInfo as an input instead.
- *
- * Select one of the pre-configured TX power level scenarios or reset it back to normal.
- * Primarily used for meeting SAR requirements during voice calls.
- *
- * @param scenario Should be one {@link #TX_POWER_SCENARIO_NORMAL} or
- * {@link #TX_POWER_SCENARIO_VOICE_CALL}.
- * @return true for success; false for failure or if the HAL version does not support this API.
- */
- public boolean selectTxPowerScenario(int scenario) {
- return mWifiVendorHal.selectTxPowerScenario(scenario);
- }
-
- /**
* Select one of the pre-configured transmit power level scenarios or reset it back to normal.
* Primarily used for meeting SAR requirements.
*
diff --git a/service/java/com/android/server/wifi/WifiVendorHal.java b/service/java/com/android/server/wifi/WifiVendorHal.java
index fdbd97fb0..361387e2f 100644
--- a/service/java/com/android/server/wifi/WifiVendorHal.java
+++ b/service/java/com/android/server/wifi/WifiVendorHal.java
@@ -2653,56 +2653,6 @@ public class WifiVendorHal {
return android.hardware.wifi.V1_2.IWifiStaIface.castFrom(iface);
}
- /* TODO: This method is to be removed in a future change */
- private int frameworkToHalTxPowerScenario(int scenario) {
- switch (scenario) {
- case WifiNative.TX_POWER_SCENARIO_VOICE_CALL:
- return android.hardware.wifi.V1_1.IWifiChip.TxPowerScenario.VOICE_CALL;
- default:
- throw new IllegalArgumentException("bad scenario: " + scenario);
- }
- }
-
- /**
- * TODO: This method will be removed in a future change
- * It will be replaced with another method receiving SarInfo
- * instance instead of the int for scenario
- *
- * Select one of the pre-configured TX power level scenarios or reset it back to normal.
- * Primarily used for meeting SAR requirements during voice calls.
- *
- * @param scenario Should be one {@link WifiNative#TX_POWER_SCENARIO_NORMAL} or
- * {@link WifiNative#TX_POWER_SCENARIO_VOICE_CALL}.
- * @return true for success; false for failure or if the HAL version does not support this API.
- */
- public boolean selectTxPowerScenario(int scenario) {
- synchronized (sLock) {
- try {
- android.hardware.wifi.V1_1.IWifiChip iWifiChipV11 = getWifiChipForV1_1Mockable();
- if (iWifiChipV11 == null) return boolResult(false);
- WifiStatus status;
- if (scenario != WifiNative.TX_POWER_SCENARIO_NORMAL) {
- int halScenario;
- try {
- halScenario = frameworkToHalTxPowerScenario(scenario);
- } catch (IllegalArgumentException e) {
- mLog.err("Illegal argument for select tx power scenario")
- .c(e.toString()).flush();
- return false;
- }
- status = iWifiChipV11.selectTxPowerScenario(halScenario);
- } else {
- status = iWifiChipV11.resetTxPowerScenario();
- }
- if (!ok(status)) return false;
- } catch (RemoteException e) {
- handleRemoteException(e);
- return false;
- }
- return true;
- }
- }
-
/**
* sarPowerBackoffRequired_1_1()
* This method checks if we need to backoff wifi Tx power due to SAR requirements.