Loading wifi/java/android/net/wifi/WifiScanner.java +53 −19 Original line number Diff line number Diff line Loading @@ -58,38 +58,73 @@ import java.util.concurrent.Executor; @SystemService(Context.WIFI_SCANNING_SERVICE) public class WifiScanner { /** @hide */ public static final int WIFI_BAND_INDEX_24_GHZ = 0; /** @hide */ public static final int WIFI_BAND_INDEX_5_GHZ = 1; /** @hide */ public static final int WIFI_BAND_INDEX_5_GHZ_DFS_ONLY = 2; /** @hide */ public static final int WIFI_BAND_COUNT = 3; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"WIFI_BAND_"}, value = { WIFI_BAND_UNSPECIFIED, WIFI_BAND_24_GHZ, WIFI_BAND_5_GHZ, WIFI_BAND_BOTH, WIFI_BAND_5_GHZ_DFS_ONLY, WIFI_BAND_24_GHZ_WITH_5GHZ_DFS, WIFI_BAND_5_GHZ_WITH_DFS, WIFI_BAND_BOTH_WITH_DFS}) public @interface WifiBand {} @IntDef(prefix = {"WIFI_BAND_INDEX_"}, value = { WIFI_BAND_INDEX_24_GHZ, WIFI_BAND_INDEX_5_GHZ, WIFI_BAND_INDEX_5_GHZ_DFS_ONLY}) public @interface WifiBandIndex {} /** no band specified; use channel list instead */ public static final int WIFI_BAND_UNSPECIFIED = 0; /** 2.4 GHz band */ public static final int WIFI_BAND_24_GHZ = 1; public static final int WIFI_BAND_24_GHZ = 1 << WIFI_BAND_INDEX_24_GHZ; /** 5 GHz band excluding DFS channels */ public static final int WIFI_BAND_5_GHZ = 2; /** Both 2.4 GHz band and 5 GHz band; no DFS channels */ public static final int WIFI_BAND_BOTH = 3; public static final int WIFI_BAND_5_GHZ = 1 << WIFI_BAND_INDEX_5_GHZ; /** DFS channels from 5 GHz band only */ public static final int WIFI_BAND_5_GHZ_DFS_ONLY = 4; public static final int WIFI_BAND_5_GHZ_DFS_ONLY = 1 << WIFI_BAND_INDEX_5_GHZ_DFS_ONLY; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"WIFI_BAND_"}, value = { WIFI_BAND_UNSPECIFIED, WIFI_BAND_24_GHZ, WIFI_BAND_5_GHZ, WIFI_BAND_5_GHZ_DFS_ONLY}) public @interface WifiBandBasic {} /** * Combination of bands * Note that those are only the common band combinations, * other combinations can be created by combining any of the basic bands above */ /** Both 2.4 GHz band and 5 GHz band; no DFS channels */ public static final int WIFI_BAND_BOTH = WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ; /** * 2.4Ghz band + DFS channels from 5 GHz band only * @hide */ public static final int WIFI_BAND_24_GHZ_WITH_5GHZ_DFS = 5; public static final int WIFI_BAND_24_GHZ_WITH_5GHZ_DFS = WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY; /** 5 GHz band including DFS channels */ public static final int WIFI_BAND_5_GHZ_WITH_DFS = 6; public static final int WIFI_BAND_5_GHZ_WITH_DFS = WIFI_BAND_5_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY; /** Both 2.4 GHz band and 5 GHz band; with DFS channels */ public static final int WIFI_BAND_BOTH_WITH_DFS = 7; public static final int WIFI_BAND_BOTH_WITH_DFS = WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"WIFI_BAND_"}, value = { WIFI_BAND_UNSPECIFIED, WIFI_BAND_24_GHZ, WIFI_BAND_5_GHZ, WIFI_BAND_BOTH, WIFI_BAND_5_GHZ_DFS_ONLY, WIFI_BAND_24_GHZ_WITH_5GHZ_DFS, WIFI_BAND_5_GHZ_WITH_DFS, WIFI_BAND_BOTH_WITH_DFS}) public @interface WifiBand {} /** * Max band value * @hide Loading Loading @@ -398,7 +433,6 @@ public class WifiScanner { return new ScanSettings[size]; } }; } /** Loading Loading
wifi/java/android/net/wifi/WifiScanner.java +53 −19 Original line number Diff line number Diff line Loading @@ -58,38 +58,73 @@ import java.util.concurrent.Executor; @SystemService(Context.WIFI_SCANNING_SERVICE) public class WifiScanner { /** @hide */ public static final int WIFI_BAND_INDEX_24_GHZ = 0; /** @hide */ public static final int WIFI_BAND_INDEX_5_GHZ = 1; /** @hide */ public static final int WIFI_BAND_INDEX_5_GHZ_DFS_ONLY = 2; /** @hide */ public static final int WIFI_BAND_COUNT = 3; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"WIFI_BAND_"}, value = { WIFI_BAND_UNSPECIFIED, WIFI_BAND_24_GHZ, WIFI_BAND_5_GHZ, WIFI_BAND_BOTH, WIFI_BAND_5_GHZ_DFS_ONLY, WIFI_BAND_24_GHZ_WITH_5GHZ_DFS, WIFI_BAND_5_GHZ_WITH_DFS, WIFI_BAND_BOTH_WITH_DFS}) public @interface WifiBand {} @IntDef(prefix = {"WIFI_BAND_INDEX_"}, value = { WIFI_BAND_INDEX_24_GHZ, WIFI_BAND_INDEX_5_GHZ, WIFI_BAND_INDEX_5_GHZ_DFS_ONLY}) public @interface WifiBandIndex {} /** no band specified; use channel list instead */ public static final int WIFI_BAND_UNSPECIFIED = 0; /** 2.4 GHz band */ public static final int WIFI_BAND_24_GHZ = 1; public static final int WIFI_BAND_24_GHZ = 1 << WIFI_BAND_INDEX_24_GHZ; /** 5 GHz band excluding DFS channels */ public static final int WIFI_BAND_5_GHZ = 2; /** Both 2.4 GHz band and 5 GHz band; no DFS channels */ public static final int WIFI_BAND_BOTH = 3; public static final int WIFI_BAND_5_GHZ = 1 << WIFI_BAND_INDEX_5_GHZ; /** DFS channels from 5 GHz band only */ public static final int WIFI_BAND_5_GHZ_DFS_ONLY = 4; public static final int WIFI_BAND_5_GHZ_DFS_ONLY = 1 << WIFI_BAND_INDEX_5_GHZ_DFS_ONLY; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"WIFI_BAND_"}, value = { WIFI_BAND_UNSPECIFIED, WIFI_BAND_24_GHZ, WIFI_BAND_5_GHZ, WIFI_BAND_5_GHZ_DFS_ONLY}) public @interface WifiBandBasic {} /** * Combination of bands * Note that those are only the common band combinations, * other combinations can be created by combining any of the basic bands above */ /** Both 2.4 GHz band and 5 GHz band; no DFS channels */ public static final int WIFI_BAND_BOTH = WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ; /** * 2.4Ghz band + DFS channels from 5 GHz band only * @hide */ public static final int WIFI_BAND_24_GHZ_WITH_5GHZ_DFS = 5; public static final int WIFI_BAND_24_GHZ_WITH_5GHZ_DFS = WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY; /** 5 GHz band including DFS channels */ public static final int WIFI_BAND_5_GHZ_WITH_DFS = 6; public static final int WIFI_BAND_5_GHZ_WITH_DFS = WIFI_BAND_5_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY; /** Both 2.4 GHz band and 5 GHz band; with DFS channels */ public static final int WIFI_BAND_BOTH_WITH_DFS = 7; public static final int WIFI_BAND_BOTH_WITH_DFS = WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"WIFI_BAND_"}, value = { WIFI_BAND_UNSPECIFIED, WIFI_BAND_24_GHZ, WIFI_BAND_5_GHZ, WIFI_BAND_BOTH, WIFI_BAND_5_GHZ_DFS_ONLY, WIFI_BAND_24_GHZ_WITH_5GHZ_DFS, WIFI_BAND_5_GHZ_WITH_DFS, WIFI_BAND_BOTH_WITH_DFS}) public @interface WifiBand {} /** * Max band value * @hide Loading Loading @@ -398,7 +433,6 @@ public class WifiScanner { return new ScanSettings[size]; } }; } /** Loading