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

Commit 4572b7bf authored by Nate(Qiang) Jiang's avatar Nate(Qiang) Jiang
Browse files

Deprecate WifiManager passpoint API's

We prefer app to use suggestion API to add passpoint network.

Bug: 142424092
Test: atest android.net.wifi
Change-Id: I030efc2eeecef16ce7d5650136f168a44fad864e
parent 0ac2268b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1948,6 +1948,15 @@ public class WifiManager {
     * @param config The Passpoint configuration to be added
     * @throws IllegalArgumentException if configuration is invalid or Passpoint is not enabled on
     *                                  the device.
     *
     * Deprecated for general app usage - except DO/PO apps.
     * See {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} to
     * create a passpoint suggestion.
     * See {@link #addNetworkSuggestions(List)}, {@link #removeNetworkSuggestions(List)} for new
     * API to add Wi-Fi networks for consideration when auto-connecting to wifi.
     * <b>Compatibility Note:</b> For applications targeting
     * {@link android.os.Build.VERSION_CODES#R} or above, except for system of DO/PO apps, this API
     * will throw {@link IllegalArgumentException}
     */
    public void addOrUpdatePasspointConfiguration(PasspointConfiguration config) {
        try {