Merge "Changes in framework for WIFI_CREDENTIAL_CHANGE broadcast. [DO NOT MERGE]" into lmp-dev

This commit is contained in:
Chelsea Derrick
2014-07-16 22:19:44 +00:00
committed by Android (Google) Code Review
2 changed files with 38 additions and 1 deletions

View File

@@ -235,6 +235,7 @@
<protected-broadcast android:name="com.android.server.WifiManager.action.DELAYED_DRIVER_STOP" />
<protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<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.SCAN_RESULTS" />
<protected-broadcast android:name="android.net.wifi.RSSI_CHANGED" />
@@ -805,6 +806,19 @@
android:description="@string/permdesc_changeWifiState"
android:label="@string/permlab_changeWifiState" />
<!-- @SystemApi @hide Allows applications to read Wi-Fi credential.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.READ_WIFI_CREDENTIAL"
android:permissionGroup="android.permission-group.NETWORK"
android:protectionLevel="signature|system" />
<!-- @SystemApi @hide Allow system apps to receive broadcast
when a wifi network credential is changed.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE"
android:permissionGroup="android.permission-group.NETWORK"
android:protectionLevel="signature|system" />
<!-- @hide -->
<permission android:name="android.permission.ACCESS_WIMAX_STATE"
android:permissionGroup="android.permission-group.NETWORK"

View File

@@ -18,6 +18,7 @@ package android.net.wifi;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.content.Context;
import android.net.DhcpInfo;
import android.net.wifi.ScanSettings;
@@ -82,7 +83,29 @@ public class WifiManager {
* Extra int indicating scan availability, WIFI_STATE_ENABLED and WIFI_STATE_DISABLED
* @hide
*/
public static final String EXTRA_SCAN_AVAILABLE = "scan_enabled";
public static final String EXTRA_SCAN_AVAILABLE = "scan_enabled";
/**
* Broadcast intent action indicating that the credential of a Wi-Fi network
* has been changed. One extra provides the ssid of the network. Another
* extra provides the event type, whether the credential is saved or forgot.
* @hide
*/
@SystemApi
public static final String WIFI_CREDENTIAL_CHANGED_ACTION =
"android.net.wifi.WIFI_CREDENTIAL_CHANGED";
/** @hide */
@SystemApi
public static final String EXTRA_WIFI_CREDENTIAL_EVENT_TYPE = "et";
/** @hide */
@SystemApi
public static final String EXTRA_WIFI_CREDENTIAL_SSID = "ssid";
/** @hide */
@SystemApi
public static final int WIFI_CREDENTIAL_SAVED = 0;
/** @hide */
@SystemApi
public static final int WIFI_CREDENTIAL_FORGOT = 1;
/**
* Broadcast intent action indicating that Wi-Fi has been enabled, disabled,