From 4c22e8bede71fde064ab214e939c2d359720495f Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Thu, 29 Sep 2016 16:02:30 -0700 Subject: [NAN] Update API javadoc to clarify NAN status change broadcast scope (cherry-pick of commit 1fceaf9d63cd572cad57e71f6cb66f0cb59183b5) Bug: 31675932 Test: make -j 32 update-api (to generate doc) Change-Id: I7263a15902c423c1c71c2c457c82e8caef5abceb --- wifi/java/android/net/wifi/nan/WifiNanManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wifi/java/android/net/wifi/nan/WifiNanManager.java b/wifi/java/android/net/wifi/nan/WifiNanManager.java index 705ba4a5a4bd..bb1543418c6d 100644 --- a/wifi/java/android/net/wifi/nan/WifiNanManager.java +++ b/wifi/java/android/net/wifi/nan/WifiNanManager.java @@ -201,6 +201,8 @@ public class WifiNanManager { * Use the {@link #isAvailable()} to query the current status. * This broadcast is not sticky, use the {@link #isAvailable()} API after registering * the broadcast to check the current state of Wi-Fi NAN. + *

Note: The broadcast is only delivered to registered receivers - no manifest registered + * components will be launched. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_WIFI_NAN_STATE_CHANGED = -- cgit v1.2.3-59-g8ed1b From 720d175757f30ff7546309031a8e60f71f5387ee Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Thu, 29 Sep 2016 16:12:47 -0700 Subject: [NAN] Register WIFI_NAN_STATE_CHANGED as protected broadcast Broadcast can be registered protected (as in this CL) in which case they are restricted to system apps. Broadcasts sent by the System Service must be protected (so no one else can fake them). The WIFI_NAN_STATE_CHANGED is sent by the System Service and no other apps should be able to send them (e.g. to deny access to NAN to other apps). (cherry-pick of commit b8ce87175e3a865feaad7c6aa49226f768729540) Bug: 31811154 Test: build & run - enable/disable Wi-Fi to trigger bug Change-Id: I77ea18291d68c38a63d64a75affc6b7ea114e549 --- core/res/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index b0b57d909174..ae560f9f8779 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -289,6 +289,7 @@ + -- cgit v1.2.3-59-g8ed1b