diff options
author | 2020-10-14 17:36:31 +0800 | |
---|---|---|
committer | 2020-10-15 14:54:03 +0800 | |
commit | 121a034d3ccf38067e0e340d0b4885ebef02a1b1 (patch) | |
tree | b24165dc0532bb7eb6e778ea17c01f291ac5913a | |
parent | 9dc64dbd67397a93d3cae4051586d8c5f93c57af (diff) |
wifi: make BAND_ANY to deprecated
Require to use bands bit mask to replace BAND_ANY.
The current bands are a bit mask. It already supported multi-bands
setting. The BAND_ANY will causes limitation when adding the new band setting.
Mark BAND_ANY to deprecated and replace all of the test code to use bit
mask.
Bug: 162899642
Test: atest FrameworksWifiApiTests
Change-Id: I0d379e60ed52e569a992ee566e4281cffa42aec9
-rw-r--r-- | api/system-current.txt | 2 | ||||
-rw-r--r-- | wifi/api/system-current.txt | 2 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/SoftApConfiguration.java | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 1404f7e1c554..df6e71877b7d 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7292,7 +7292,7 @@ package android.net.wifi { field public static final int BAND_2GHZ = 1; // 0x1 field public static final int BAND_5GHZ = 2; // 0x2 field public static final int BAND_6GHZ = 4; // 0x4 - field public static final int BAND_ANY = 7; // 0x7 + field @Deprecated public static final int BAND_ANY = 7; // 0x7 field public static final int RANDOMIZATION_NONE = 0; // 0x0 field public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1 } diff --git a/wifi/api/system-current.txt b/wifi/api/system-current.txt index 98cb849084d4..3615416480e1 100644 --- a/wifi/api/system-current.txt +++ b/wifi/api/system-current.txt @@ -263,7 +263,7 @@ package android.net.wifi { field public static final int BAND_2GHZ = 1; // 0x1 field public static final int BAND_5GHZ = 2; // 0x2 field public static final int BAND_6GHZ = 4; // 0x4 - field public static final int BAND_ANY = 7; // 0x7 + field @Deprecated public static final int BAND_ANY = 7; // 0x7 field public static final int RANDOMIZATION_NONE = 0; // 0x0 field public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1 } diff --git a/wifi/java/android/net/wifi/SoftApConfiguration.java b/wifi/java/android/net/wifi/SoftApConfiguration.java index 237922a6fe1e..2649b66c703f 100644 --- a/wifi/java/android/net/wifi/SoftApConfiguration.java +++ b/wifi/java/android/net/wifi/SoftApConfiguration.java @@ -90,6 +90,9 @@ public final class SoftApConfiguration implements Parcelable { * Device is allowed to choose the optimal band (2Ghz, 5Ghz, 6Ghz) based on device capability, * operating country code and current radio conditions. * @hide + * + * @deprecated The bands are a bit mask - use any combination of {@code BAND_}, + * for instance {@code BAND_2GHZ | BAND_5GHZ | BAND_6GHZ}. */ @SystemApi public static final int BAND_ANY = BAND_2GHZ | BAND_5GHZ | BAND_6GHZ; |