OSDN Git Service

Allow SetupWizard to do WiFi scans if location off
authorSvetoslav Ganov <svetoslavganov@google.com>
Tue, 11 Oct 2016 23:12:29 +0000 (16:12 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Wed, 12 Oct 2016 02:43:43 +0000 (02:43 +0000)
Location permission is needed for apps to do WiFi scans
and if location is globally off no app can scan too. It
is possible that an OEM does not want location to be on
until the user agrees to that or a device owner can turn
location off before setup. As a result setup wizard
cannot show the WiFi networks preventing the user form
logging in. This change allows the setup wizard component
to perform WiFi scans even if location is globally off.

bug:29577364

Change-Id: Ic56bfb7fb3818658a843d309b67ef37324045f67

core/res/AndroidManifest.xml

index a2759ba..5a41d67 100644 (file)
     <!-- @SystemApi Allows access to MAC addresses of WiFi and Bluetooth peer devices.
         @hide -->
     <permission android:name="android.permission.PEERS_MAC_ADDRESS"
-                android:protectionLevel="signature" />
+                android:protectionLevel="signature|setup" />
 
     <!-- Allows the Nfc stack to dispatch Nfc messages to applications. Applications
         can use this permission to ensure incoming Nfc messages are from the Nfc stack