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

Commit fd169998 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Wifi: Rename removeDoubleQuotes to sanitizeSsid am: 51939ea9 am: 3dd5a803

Change-Id: I96b33fef542cb13fdd43e3ab381a97674d8a5c62
parents 4b3f94a2 3dd5a803
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5671,6 +5671,7 @@ package android.net.wifi {
  public class WifiInfo implements android.os.Parcelable {
    method public boolean isOsuAp();
    method public boolean isPasspointAp();
    method @Nullable public static String sanitizeSsid(@Nullable String);
  }
  public class WifiManager {
+14 −2
Original line number Diff line number Diff line
@@ -658,9 +658,21 @@ public class WifiInfo implements Parcelable {
        }
    }

    /** {@hide} */
    /**
     * Remove double quotes (") surrounding a SSID string, if present. Otherwise, return the
     * string unmodified. Return null if the input string was null.
     * @hide
     */
    @Nullable
    @SystemApi
    public static String sanitizeSsid(@Nullable String string) {
        return removeDoubleQuotes(string);
    }

    /** @hide */
    @UnsupportedAppUsage
    public static String removeDoubleQuotes(String string) {
    @Nullable
    public static String removeDoubleQuotes(@Nullable String string) {
        if (string == null) return null;
        final int length = string.length();
        if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {