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

Commit d025d3b4 authored by Roshan Pius's avatar Roshan Pius Committed by Android (Google) Code Review
Browse files

Merge changes from topics "oem_paid_suggestions", "sta_sta_feature"

* changes:
  WifiNetworkSuggestion: Add setOemPaid flag
  WifiManager: Add public API for STA + STA concurrency support
parents 9920baf4 102e083d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31607,6 +31607,7 @@ package android.net.wifi {
    method public boolean isEasyConnectSupported();
    method public boolean isEnhancedOpenSupported();
    method public boolean isEnhancedPowerReportingSupported();
    method public boolean isMultiStaConcurrencySupported();
    method public boolean isP2pSupported();
    method public boolean isPreferredNetworkOffloadSupported();
    method @Deprecated public boolean isScanAlwaysAvailable();
+2 −0
Original line number Diff line number Diff line
@@ -7565,10 +7565,12 @@ package android.net.wifi {
  public final class WifiNetworkSuggestion implements android.os.Parcelable {
    method @NonNull public android.net.wifi.WifiConfiguration getWifiConfiguration();
    method public boolean isOemPaid();
  }
  public static final class WifiNetworkSuggestion.Builder {
    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public android.net.wifi.WifiNetworkSuggestion.Builder setCarrierId(int);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setOemPaid(boolean);
  }
  public class WifiScanner {
+1 −0
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ package android.net.wifi {
    method public boolean isEasyConnectSupported();
    method public boolean isEnhancedOpenSupported();
    method public boolean isEnhancedPowerReportingSupported();
    method public boolean isMultiStaConcurrencySupported();
    method public boolean isP2pSupported();
    method public boolean isPreferredNetworkOffloadSupported();
    method @Deprecated public boolean isScanAlwaysAvailable();
+2 −0
Original line number Diff line number Diff line
@@ -608,10 +608,12 @@ package android.net.wifi {

  public final class WifiNetworkSuggestion implements android.os.Parcelable {
    method @NonNull public android.net.wifi.WifiConfiguration getWifiConfiguration();
    method public boolean isOemPaid();
  }

  public static final class WifiNetworkSuggestion.Builder {
    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public android.net.wifi.WifiNetworkSuggestion.Builder setCarrierId(int);
    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setOemPaid(boolean);
  }

  public class WifiScanner {
+16 −1
Original line number Diff line number Diff line
@@ -991,6 +991,16 @@ public class WifiConfiguration implements Parcelable {
     */
    public boolean trusted;

    /**
     * Indicate whether the network is oem paid or not. Networks are considered oem paid
     * if the corresponding connection is only available to system apps.
     *
     * This bit can only be used by suggestion network, see
     * {@link WifiNetworkSuggestion.Builder#setOemPaid(boolean)}
     * @hide
     */
    public boolean oemPaid;

    /**
     * True if this Wifi configuration is created from a {@link WifiNetworkSuggestion},
     * false otherwise.
@@ -2158,6 +2168,7 @@ public class WifiConfiguration implements Parcelable {
        ephemeral = false;
        osu = false;
        trusted = true; // Networks are considered trusted by default.
        oemPaid = false;
        fromWifiNetworkSuggestion = false;
        fromWifiNetworkSpecifier = false;
        meteredHint = false;
@@ -2278,11 +2289,12 @@ public class WifiConfiguration implements Parcelable {
        if (this.ephemeral) sbuf.append(" ephemeral");
        if (this.osu) sbuf.append(" osu");
        if (this.trusted) sbuf.append(" trusted");
        if (this.oemPaid) sbuf.append(" oemPaid");
        if (this.fromWifiNetworkSuggestion) sbuf.append(" fromWifiNetworkSuggestion");
        if (this.fromWifiNetworkSpecifier) sbuf.append(" fromWifiNetworkSpecifier");
        if (this.meteredHint) sbuf.append(" meteredHint");
        if (this.useExternalScores) sbuf.append(" useExternalScores");
        if (this.validatedInternetAccess || this.ephemeral || this.trusted
        if (this.validatedInternetAccess || this.ephemeral || this.trusted || this.oemPaid
                || this.fromWifiNetworkSuggestion || this.fromWifiNetworkSpecifier
                || this.meteredHint || this.useExternalScores) {
            sbuf.append("\n");
@@ -2828,6 +2840,7 @@ public class WifiConfiguration implements Parcelable {
            ephemeral = source.ephemeral;
            osu = source.osu;
            trusted = source.trusted;
            oemPaid = source.oemPaid;
            fromWifiNetworkSuggestion = source.fromWifiNetworkSuggestion;
            fromWifiNetworkSpecifier = source.fromWifiNetworkSpecifier;
            meteredHint = source.meteredHint;
@@ -2906,6 +2919,7 @@ public class WifiConfiguration implements Parcelable {
        dest.writeInt(isLegacyPasspointConfig ? 1 : 0);
        dest.writeInt(ephemeral ? 1 : 0);
        dest.writeInt(trusted ? 1 : 0);
        dest.writeInt(oemPaid ? 1 : 0);
        dest.writeInt(fromWifiNetworkSuggestion ? 1 : 0);
        dest.writeInt(fromWifiNetworkSpecifier ? 1 : 0);
        dest.writeInt(meteredHint ? 1 : 0);
@@ -2981,6 +2995,7 @@ public class WifiConfiguration implements Parcelable {
                config.isLegacyPasspointConfig = in.readInt() != 0;
                config.ephemeral = in.readInt() != 0;
                config.trusted = in.readInt() != 0;
                config.oemPaid = in.readInt() != 0;
                config.fromWifiNetworkSuggestion =  in.readInt() != 0;
                config.fromWifiNetworkSpecifier =  in.readInt() != 0;
                config.meteredHint = in.readInt() != 0;
Loading