diff options
author | Etan Cohen <etancohen@google.com> | 2017-07-18 09:00:47 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2017-07-18 09:00:47 -0700 |
commit | 859f9739d760dc66fea3966d2c004b21c0f326cd (patch) | |
tree | 5ea3b3ec65a81400839fbb45c9157449dcdbcd7b /service | |
parent | 24ebfc10ac1bf59fa0d91d68a0f1ae359f1b5cde (diff) |
[AWARE] Allow a previously enabled Aware
Current behavior assumes that the firmware is always in sync with
the host - thus the host knows when Aware is disabled on the firmware
and does not expect an 'aware already enabled' error code when trying
to enable Aware.
However, this may not always be the case (e.g. firmware may not disable
aware on wifi getting disabled). Change:
- Considers 'aware already enabled' to be a success
- But prints out a WTF to track (need to make sure that firmware does
disable Aware when expected)
Bug: 63773428
Test: integrated (acts/sl4a) AttachTest:test_attach_disable_wifi_attach_again
Test: unit tests pass
Change-Id: I940a2ff3e5c24434a1bb2bdf21263b2f8e9769a0
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java b/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java index 6fdcc36c6..05721afee 100644 --- a/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java +++ b/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java @@ -183,7 +183,12 @@ public class WifiAwareNativeCallback extends IWifiNanIfaceEventCallback.Stub imp public void notifyEnableResponse(short id, WifiNanStatus status) { if (VDBG) Log.v(TAG, "notifyEnableResponse: id=" + id + ", status=" + statusString(status)); - if (status.status == NanStatusType.SUCCESS) { + if (status.status == NanStatusType.ALREADY_ENABLED) { + Log.wtf(TAG, "notifyEnableResponse: id=" + id + ", already enabled!?"); + } + + if (status.status == NanStatusType.SUCCESS + || status.status == NanStatusType.ALREADY_ENABLED) { mWifiAwareStateManager.onConfigSuccessResponse(id); } else { mWifiAwareStateManager.onConfigFailedResponse(id, status.status); |