Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb0d9a7a authored by Oscar Shu's avatar Oscar Shu Committed by Android (Google) Code Review
Browse files

Merge "WifiManager: mark WPS related API calls deprecated"

parents 83178bc0 5fee9aee
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -27385,7 +27385,7 @@ package android.net.wifi {
    method public int addNetwork(android.net.wifi.WifiConfiguration);
    method public void addOrUpdatePasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
    method public static int calculateSignalLevel(int, int);
    method public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
    method public deprecated void cancelWps(android.net.wifi.WifiManager.WpsCallback);
    method public static int compareSignalLevel(int, int);
    method public android.net.wifi.WifiManager.MulticastLock createMulticastLock(java.lang.String);
    method public android.net.wifi.WifiManager.WifiLock createWifiLock(int, java.lang.String);
@@ -27418,7 +27418,7 @@ package android.net.wifi {
    method public boolean setWifiEnabled(boolean);
    method public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, android.os.Handler);
    method public deprecated boolean startScan();
    method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback);
    method public deprecated void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback);
    method public int updateNetwork(android.net.wifi.WifiConfiguration);
    field public static final java.lang.String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
    field public static final java.lang.String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE = "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
@@ -27448,11 +27448,11 @@ package android.net.wifi {
    field public static final int WIFI_STATE_ENABLED = 3; // 0x3
    field public static final int WIFI_STATE_ENABLING = 2; // 0x2
    field public static final int WIFI_STATE_UNKNOWN = 4; // 0x4
    field public static final int WPS_AUTH_FAILURE = 6; // 0x6
    field public static final int WPS_OVERLAP_ERROR = 3; // 0x3
    field public static final int WPS_TIMED_OUT = 7; // 0x7
    field public static final int WPS_TKIP_ONLY_PROHIBITED = 5; // 0x5
    field public static final int WPS_WEP_PROHIBITED = 4; // 0x4
    field public static final deprecated int WPS_AUTH_FAILURE = 6; // 0x6
    field public static final deprecated int WPS_OVERLAP_ERROR = 3; // 0x3
    field public static final deprecated int WPS_TIMED_OUT = 7; // 0x7
    field public static final deprecated int WPS_TKIP_ONLY_PROHIBITED = 5; // 0x5
    field public static final deprecated int WPS_WEP_PROHIBITED = 4; // 0x4
  }
  public static class WifiManager.LocalOnlyHotspotCallback {
@@ -27486,11 +27486,11 @@ package android.net.wifi {
    method public void setWorkSource(android.os.WorkSource);
  }
  public static abstract class WifiManager.WpsCallback {
  public static abstract deprecated class WifiManager.WpsCallback {
    ctor public WifiManager.WpsCallback();
    method public abstract void onFailed(int);
    method public abstract void onStarted(java.lang.String);
    method public abstract void onSucceeded();
    method public abstract deprecated void onFailed(int);
    method public abstract deprecated void onStarted(java.lang.String);
    method public abstract deprecated void onSucceeded();
  }
  public class WpsInfo implements android.os.Parcelable {
+50 −15
Original line number Diff line number Diff line
@@ -1625,6 +1625,7 @@ public class WifiManager {
     *
     * @return hex-string encoded configuration token or null if there is no current network
     * @hide
     * @deprecated This API is deprecated
     */
    public String getCurrentNetworkWpsNfcConfigurationToken() {
        try {
@@ -2210,20 +2211,34 @@ public class WifiManager {
    /** @hide */
    public static final int SAVE_NETWORK_SUCCEEDED          = BASE + 9;

    /** @hide */
    /** @hide
     * @deprecated This is deprecated
     */
    public static final int START_WPS                       = BASE + 10;
    /** @hide */
    /** @hide
     * @deprecated This is deprecated
     */
    public static final int START_WPS_SUCCEEDED             = BASE + 11;
    /** @hide */
    /** @hide
     * @deprecated This is deprecated
     */
    public static final int WPS_FAILED                      = BASE + 12;
    /** @hide */
    /** @hide
     * @deprecated This is deprecated
     */
    public static final int WPS_COMPLETED                   = BASE + 13;

    /** @hide */
    /** @hide
     * @deprecated This is deprecated
     */
    public static final int CANCEL_WPS                      = BASE + 14;
    /** @hide */
    /** @hide
     * @deprecated This is deprecated
     */
    public static final int CANCEL_WPS_FAILED               = BASE + 15;
    /** @hide */
    /** @hide
     * @deprecated This is deprecated
     */
    public static final int CANCEL_WPS_SUCCEDED             = BASE + 16;

    /** @hide */
@@ -2263,15 +2278,25 @@ public class WifiManager {
    public static final int BUSY                        = 2;

    /* WPS specific errors */
    /** WPS overlap detected */
    /** WPS overlap detected
     * @deprecated This is deprecated
     */
    public static final int WPS_OVERLAP_ERROR           = 3;
    /** WEP on WPS is prohibited */
    /** WEP on WPS is prohibited
     * @deprecated This is deprecated
     */
    public static final int WPS_WEP_PROHIBITED          = 4;
    /** TKIP only prohibited */
    /** TKIP only prohibited
     * @deprecated This is deprecated
     */
    public static final int WPS_TKIP_ONLY_PROHIBITED    = 5;
    /** Authentication failure on WPS */
    /** Authentication failure on WPS
     * @deprecated This is deprecated
     */
    public static final int WPS_AUTH_FAILURE            = 6;
    /** WPS timed out */
    /** WPS timed out
     * @deprecated This is deprecated
     */
    public static final int WPS_TIMED_OUT               = 7;

    /**
@@ -2312,12 +2337,19 @@ public class WifiManager {
        public void onFailure(int reason);
    }

    /** Interface for callback invocation on a start WPS action */
    /** Interface for callback invocation on a start WPS action
     * @deprecated This is deprecated
     */
    public static abstract class WpsCallback {
        /** WPS start succeeded */

        /** WPS start succeeded
         * @deprecated This API is deprecated
         */
        public abstract void onStarted(String pin);

        /** WPS operation completed successfully */
        /** WPS operation completed successfully
         * @deprecated This API is deprecated
         */
        public abstract void onSucceeded();

        /**
@@ -2326,6 +2358,7 @@ public class WifiManager {
         * {@link #WPS_TKIP_ONLY_PROHIBITED}, {@link #WPS_OVERLAP_ERROR},
         * {@link #WPS_WEP_PROHIBITED}, {@link #WPS_TIMED_OUT} or {@link #WPS_AUTH_FAILURE}
         * and some generic errors.
         * @deprecated This API is deprecated
         */
        public abstract void onFailed(int reason);
    }
@@ -3032,6 +3065,7 @@ public class WifiManager {
     * @param listener for callbacks on success or failure. Can be null.
     * @throws IllegalStateException if the WifiManager instance needs to be
     * initialized again
     * @deprecated This API is deprecated
     */
    public void startWps(WpsInfo config, WpsCallback listener) {
        if (config == null) throw new IllegalArgumentException("config cannot be null");
@@ -3044,6 +3078,7 @@ public class WifiManager {
     * @param listener for callbacks on success or failure. Can be null.
     * @throws IllegalStateException if the WifiManager instance needs to be
     * initialized again
     * @deprecated This API is deprecated
     */
    public void cancelWps(WpsCallback listener) {
        getChannel().sendMessage(CANCEL_WPS, 0, putListener(listener));