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

Commit c1728f16 authored by David Su's avatar David Su Committed by Android (Google) Code Review
Browse files

Merge changes from topics "framework-jar-build-against-framework-wifi-stubs",...

Merge changes from topics "framework-jar-build-against-framework-wifi-stubs", "settings-suggestions-apis"

* changes:
  framework.jar - include framework-wifi-stubs instead of framework-wifi (Attempt 2)
  Expose WifiNetworkSuggestion.getWifi/PasspointConfiguration()
parents 9e208ff6 298cd36e
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -511,8 +511,7 @@ java_library {
        "framework-sdkextensions-stubs-systemapi",
        // TODO(b/146167933): Use framework-statsd-stubs instead.
        "framework-statsd",
        // TODO(b/140299412): should be framework-wifi-stubs
        "framework-wifi",
        "framework-wifi-stubs",
        "ike-stubs",
        // TODO(b/147200698): should be the stub of framework-tethering
        "framework-tethering",
@@ -551,7 +550,8 @@ java_library {
        "compat-changeid-annotation-processor",
    ],
    static_libs: [
        "exoplayer2-core"
        "exoplayer2-core",
        "android.hardware.wifi-V1.0-java-constants",
    ]
}

@@ -1243,6 +1243,7 @@ filegroup {
        "core/java/com/android/internal/util/StateMachine.java",
        "core/java/com/android/internal/util/WakeupMessage.java",
    ],
    visibility: ["//frameworks/opt/net/wifi/service"],
}

// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
+5 −0
Original line number Diff line number Diff line
@@ -6850,6 +6850,11 @@ package android.net.wifi {
    method public boolean satisfiedBy(android.net.NetworkSpecifier);
  }
  public final class WifiNetworkSuggestion implements android.os.Parcelable {
    method @Nullable public android.net.wifi.hotspot2.PasspointConfiguration getPasspointConfiguration();
    method @NonNull public android.net.wifi.WifiConfiguration getWifiConfiguration();
  }
  public static final class WifiNetworkSuggestion.Builder {
    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public android.net.wifi.WifiNetworkSuggestion.Builder setCarrierId(int);
  }
+0 −1
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ java_library {
    },
    hostdex: true, // for hiddenapi check
    visibility: [
        "//frameworks/base", // TODO(b/140299412) remove once all dependencies are fixed
        "//frameworks/opt/net/wifi/service:__subpackages__",
    ] + test_access_hidden_api_whitelist,
    apex_available: [
+24 −1
Original line number Diff line number Diff line
@@ -692,12 +692,14 @@ public final class WifiNetworkSuggestion implements Parcelable {
     * Network configuration for the provided network.
     * @hide
     */
    @NonNull
    public final WifiConfiguration wifiConfiguration;

    /**
     * Passpoint configuration for the provided network.
     * @hide
     */
    @Nullable
    public final PasspointConfiguration passpointConfiguration;

    /**
@@ -734,7 +736,7 @@ public final class WifiNetworkSuggestion implements Parcelable {

    /** @hide */
    public WifiNetworkSuggestion() {
        this.wifiConfiguration = null;
        this.wifiConfiguration = new WifiConfiguration();
        this.passpointConfiguration = null;
        this.isAppInteractionRequired = false;
        this.isUserInteractionRequired = false;
@@ -842,4 +844,25 @@ public final class WifiNetworkSuggestion implements Parcelable {
                .append(" ]");
        return sb.toString();
    }

    /**
     * Get the {@link WifiConfiguration} associated with this Suggestion.
     * @hide
     */
    @SystemApi
    @NonNull
    public WifiConfiguration getWifiConfiguration() {
        return wifiConfiguration;
    }

    /**
     * Get the {@link PasspointConfiguration} associated with this Suggestion, or null if this
     * Suggestion is not for a Passpoint network.
     * @hide
     */
    @SystemApi
    @Nullable
    public PasspointConfiguration getPasspointConfiguration() {
        return passpointConfiguration;
    }
}