From f24f4e830d04f836438deb49c064332e8d9810b8 Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Tue, 15 Dec 2020 16:02:44 -0800 Subject: [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 --- wifi/java/android/net/wifi/IWifiManager.aidl | 2 ++ wifi/java/android/net/wifi/WifiManager.java | 13 +++++++++++++ 2 files changed, 15 insertions(+) (limited to 'wifi/java') diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl index 0d4e9c3a513d..c801e85dc8ad 100644 --- a/wifi/java/android/net/wifi/IWifiManager.aidl +++ b/wifi/java/android/net/wifi/IWifiManager.aidl @@ -146,6 +146,8 @@ interface IWifiManager void updateInterfaceIpState(String ifaceName, int mode); + boolean isDefaultCoexAlgorithmEnabled(); + void setCoexUnsafeChannels(in List unsafeChannels, int mandatoryRestrictions); List getCoexUnsafeChannels(); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index bccb2410ae09..5affdec8218d 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -3224,6 +3224,19 @@ public class WifiManager { }) 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 -- cgit v1.2.3-59-g8ed1b