diff options
| -rwxr-xr-x | api/system-current.txt | 2 | ||||
| -rw-r--r-- | wifi/api/system-current.txt | 2 | ||||
| -rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 26 |
3 files changed, 26 insertions, 4 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 94474277666d..b011e9af40a0 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7141,6 +7141,8 @@ package android.net.wifi { field @Deprecated public static final int METERED_OVERRIDE_METERED = 1; // 0x1 field @Deprecated public static final int METERED_OVERRIDE_NONE = 0; // 0x0 field @Deprecated public static final int METERED_OVERRIDE_NOT_METERED = 2; // 0x2 + field @Deprecated public static final int RANDOMIZATION_AUTO = 3; // 0x3 + field @Deprecated public static final int RANDOMIZATION_ENHANCED = 2; // 0x2 field @Deprecated public static final int RANDOMIZATION_NONE = 0; // 0x0 field @Deprecated public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1 field @Deprecated public static final int RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA = 17; // 0x11 diff --git a/wifi/api/system-current.txt b/wifi/api/system-current.txt index 53c69c47d052..eff64a31367a 100644 --- a/wifi/api/system-current.txt +++ b/wifi/api/system-current.txt @@ -326,6 +326,8 @@ package android.net.wifi { field @Deprecated public static final int METERED_OVERRIDE_METERED = 1; // 0x1 field @Deprecated public static final int METERED_OVERRIDE_NONE = 0; // 0x0 field @Deprecated public static final int METERED_OVERRIDE_NOT_METERED = 2; // 0x2 + field @Deprecated public static final int RANDOMIZATION_AUTO = 3; // 0x3 + field @Deprecated public static final int RANDOMIZATION_ENHANCED = 2; // 0x2 field @Deprecated public static final int RANDOMIZATION_NONE = 0; // 0x0 field @Deprecated public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1 field @Deprecated public static final int RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA = 17; // 0x11 diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 71f0ab8087ab..1588bf72c969 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -1130,7 +1130,9 @@ public class WifiConfiguration implements Parcelable { @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"RANDOMIZATION_"}, value = { RANDOMIZATION_NONE, - RANDOMIZATION_PERSISTENT}) + RANDOMIZATION_PERSISTENT, + RANDOMIZATION_ENHANCED, + RANDOMIZATION_AUTO}) public @interface MacRandomizationSetting {} /** @@ -1147,14 +1149,30 @@ public class WifiConfiguration implements Parcelable { public static final int RANDOMIZATION_PERSISTENT = 1; /** + * Use a randomly generated MAC address for connections to this network. + * This option does not persist the randomized MAC address. + * @hide + */ + @SystemApi + public static final int RANDOMIZATION_ENHANCED = 2; + + /** + * Let the wifi framework automatically decide the MAC randomization strategy. + * @hide + */ + @SystemApi + public static final int RANDOMIZATION_AUTO = 3; + + /** * Level of MAC randomization for this network. - * One of {@link #RANDOMIZATION_NONE} or {@link #RANDOMIZATION_PERSISTENT}. - * By default this field is set to {@link #RANDOMIZATION_PERSISTENT}. + * One of {@link #RANDOMIZATION_NONE}, {@link #RANDOMIZATION_AUTO}, + * {@link #RANDOMIZATION_PERSISTENT} or {@link #RANDOMIZATION_ENHANCED}. + * By default this field is set to {@link #RANDOMIZATION_AUTO}. * @hide */ @SystemApi @MacRandomizationSetting - public int macRandomizationSetting = RANDOMIZATION_PERSISTENT; + public int macRandomizationSetting = RANDOMIZATION_AUTO; /** * @hide |