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

Commit b02f8ff7 authored by Arc Wang's avatar Arc Wang Committed by Android (Google) Code Review
Browse files

Merge "[Wi-Fi] Add WifiSavedConfigUtils#getAllConfigsCount" into rvc-dev

parents 5b8c53ff 6ed3e93f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -65,5 +65,17 @@ public class WifiSavedConfigUtils {
        }
        return savedConfigs;
    }

    /**
     * Returns the count of the saved configurations on the device, including both Wi-Fi networks
     * and Passpoint profiles.
     *
     * @param context The application context
     * @param wifiManager An instance of {@link WifiManager}
     * @return count of saved Wi-Fi networks
     */
    public static int getAllConfigsCount(Context context, WifiManager wifiManager) {
        return getAllConfigs(context, wifiManager).size();
    }
}