[WifiCoex] Add @hide API for default coex algorithm enabled or not
Add @hide API to return whether the default coex algorithm is enabled or
not for ACTS testing.
Bug: 153651001
Test: build
Change-Id: I4c574c767a8cc2c325139f5f668dd7090efd68b4
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 0d4e9c3..c801e85 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -146,6 +146,8 @@
void updateInterfaceIpState(String ifaceName, int mode);
+ boolean isDefaultCoexAlgorithmEnabled();
+
void setCoexUnsafeChannels(in List<CoexUnsafeChannel> unsafeChannels, int mandatoryRestrictions);
List<CoexUnsafeChannel> getCoexUnsafeChannels();
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index bccb241..5affdec 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -3225,6 +3225,19 @@
public @interface CoexRestriction {}
/**
+ * @return {@code true} if the default coex algorithm is enabled. {@code false} otherwise.
+ *
+ * @hide
+ */
+ public boolean isDefaultCoexAlgorithmEnabled() {
+ try {
+ return mService.isDefaultCoexAlgorithmEnabled();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Specify the set of {@link CoexUnsafeChannel} to propagate through the framework for
* Wi-Fi/Cellular coex channel avoidance if the default algorithm is disabled via overlay
* (i.e. config_wifiCoexDefaultAlgorithmEnabled = false). Otherwise do nothing.