Merge "wifi: Add API to indicate (STA) + Bridged AP supported (Part 4)"

This commit is contained in:
Les Lee
2020-12-04 06:43:29 +00:00
committed by Android (Google) Code Review
3 changed files with 48 additions and 0 deletions

View File

@@ -332,6 +332,7 @@ package android.net.wifi {
method public boolean is5GHzBandSupported();
method public boolean is6GHzBandSupported();
method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isAutoWakeupEnabled();
method public boolean isBridgedApConcurrencySupported();
method @Deprecated public boolean isDeviceToApRttSupported();
method public boolean isEasyConnectSupported();
method public boolean isEnhancedOpenSupported();
@@ -342,6 +343,7 @@ package android.net.wifi {
method @Deprecated public boolean isScanAlwaysAvailable();
method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isScanThrottleEnabled();
method public boolean isStaApConcurrencySupported();
method public boolean isStaBridgedApConcurrencySupported();
method public boolean isTdlsSupported();
method public boolean isWapiSupported();
method public boolean isWifiEnabled();

View File

@@ -935,6 +935,9 @@ public final class SoftApConfiguration implements Parcelable {
* on the requested bands (if possible).
* <p>
*
* Use {@link WifiManager#isBridgedApConcurrencySupported()} to determine
* whether or not concurrent APs are supported.
*
* @param bands Array of the {@link #BandType}.
* @return Builder for chaining.
* @throws IllegalArgumentException when more than 2 bands are set or an invalid band type
@@ -1007,6 +1010,9 @@ public final class SoftApConfiguration implements Parcelable {
* The {@link SoftApCapability#getSupportedChannelList(int)} can be used to obtain
* valid channels in each band.
*
* Use {@link WifiManager#isBridgedApConcurrencySupported()} to determine
* whether or not concurrent APs are supported.
*
* <p>
* If not set, the default for the channel is the special value 0 which has the framework
* auto-select a valid channel from the band configured with {@link #setBands(int[])}.

View File

@@ -2489,6 +2489,12 @@ public class WifiManager {
/** @hide */
public static final long WIFI_FEATURE_SAE_PK = 0x10000000000L; // SAE-PK
/** @hide */
public static final long WIFI_FEATURE_STA_BRIDGED_AP = 0x20000000000L; // STA + Bridged AP
/** @hide */
public static final long WIFI_FEATURE_BRIDGED_AP = 0x40000000000L; // Bridged AP
private long getSupportedFeatures() {
try {
return mService.getSupportedFeatures();
@@ -2688,6 +2694,40 @@ public class WifiManager {
}
}
/**
* Query whether the device supports Station (STA) + Bridged access point (AP)
* concurrency or not.
*
* The bridged AP support means that the device supports AP + AP concurrency with the 2 APs
* bridged together.
*
* See {@link SoftApConfiguration.Builder#setBands(int[])}
* or {@link SoftApConfiguration.Builder#setChannels(SparseIntArray)} to configure bridged AP
* when the bridged AP supported.
*
* @return true if this device supports STA + bridged AP concurrency, false otherwise.
*/
public boolean isStaBridgedApConcurrencySupported() {
return isFeatureSupported(WIFI_FEATURE_STA_BRIDGED_AP);
}
/**
* Query whether the device supports Bridged Access point (AP) concurrency or not.
*
* The bridged AP support means that the device supports AP + AP concurrency with the 2 APs
* bridged together.
*
* See {@link SoftApConfiguration.Builder#setBands(int[])}
* or {@link SoftApConfiguration.Builder#setChannels(SparseIntArray)} to configure bridged AP
* when the bridged AP supported.
*
* @return true if this device supports bridged AP concurrency, false otherwise.
*/
public boolean isBridgedApConcurrencySupported() {
return isFeatureSupported(WIFI_FEATURE_BRIDGED_AP);
}
/**
* Interface for Wi-Fi activity energy info listener. Should be implemented by applications and
* set when calling {@link WifiManager#getWifiActivityEnergyInfoAsync}.