summaryrefslogtreecommitdiff
path: root/wifi/java
diff options
context:
space:
mode:
author Les Lee <lesl@google.com> 2022-01-11 12:07:57 +0800
committer Les Lee <lesl@google.com> 2022-01-24 10:16:00 +0800
commit1a8877f52f2d5511c3fef8ad0f916cb4299c386c (patch)
tree8952c0d299d10effd466f33b12d21cbeeaf95944 /wifi/java
parent8d6f835e75e88218a6cf71e8bbb62210ef56e3d3 (diff)
wifi: Add new API to notify wificond of CC have changed
When device doesn't support NL80211_CMD_REG_CHANGED, the wificond has no way to know the CC(country code) have changed. Add a new API to allow the wifi frameworks notify wificond daemon of country code have changed. Bug: 211573255 Bug: 212554181 Bug: 207426796 Test: atest WifiNl80211ManagerTest Test: Maunal Test with log check. Change-Id: I1e2c980062e66e6dcf007c0e2a4f1e9b203536ac
Diffstat (limited to 'wifi/java')
-rw-r--r--wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java b/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java
index 3b7566051fae..459696e81ee4 100644
--- a/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java
+++ b/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java
@@ -1262,6 +1262,26 @@ public class WifiNl80211Manager {
}
/**
+ * Notifies the wificond daemon that the WiFi framework has successfully updated the Country
+ * Code of the driver. The wificond daemon needs this notification if the device does not
+ * support the NL80211_CMD_REG_CHANGED (otherwise it will find out on its own). The wificond
+ * updates in internal state in response to this Country Code update.
+ *
+ * @return true on success, false otherwise.
+ */
+ public boolean notifyCountryCodeChanged() {
+ try {
+ if (mWificond != null) {
+ mWificond.notifyCountryCodeChanged();
+ return true;
+ }
+ } catch (RemoteException e1) {
+ Log.e(TAG, "Failed to notify country code changed due to remote exception");
+ }
+ return false;
+ }
+
+ /**
* Register the provided callback handler for SoftAp events. The interface must first be created
* using {@link #setupInterfaceForSoftApMode(String)}. The callback registration is valid until
* the interface is deleted using {@link #tearDownSoftApInterface(String)} (no deregistration