OSDN Git Service

[NAN] Register WIFI_NAN_STATE_CHANGED as protected broadcast
authorEtan Cohen <etancohen@google.com>
Thu, 29 Sep 2016 23:12:47 +0000 (16:12 -0700)
committerEtan Cohen <etancohen@google.com>
Fri, 30 Sep 2016 18:32:18 +0000 (11:32 -0700)
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

index b0b57d9..ae560f9 100644 (file)
     <protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
     <protected-broadcast android:name="android.net.wifi.WIFI_CREDENTIAL_CHANGED" />
     <protected-broadcast android:name="android.net.wifi.WIFI_SCAN_AVAILABLE" />
+    <protected-broadcast android:name="android.net.wifi.nan.action.WIFI_NAN_STATE_CHANGED" />
     <protected-broadcast android:name="android.net.wifi.SCAN_RESULTS" />
     <protected-broadcast android:name="android.net.wifi.RSSI_CHANGED" />
     <protected-broadcast android:name="android.net.wifi.STATE_CHANGE" />