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

Commit 8a277663 authored by Roshan Pius's avatar Roshan Pius
Browse files

WifiManager: setWifiEnabled bypass for older apps

For apps targeting older SDK (<Q), preserve the old behavior for
setWifiEnabled.

Bug: 129549163
Test: Compiles
Change-Id: I4a2e89cfa1c1ac612a679ecab6a2d526a987f7c0
parent 65e18e43
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2424,8 +2424,11 @@ public class WifiManager {
     * @throws  {@link java.lang.SecurityException} if the caller is missing required permissions.
     *
     * @deprecated Starting with Build.VERSION_CODES#Q, applications are not allowed to
     * enable/disable Wi-Fi regardless of application's target SDK. This API will have no effect
     * and will always return false.
     * enable/disable Wi-Fi.
     * <b>Compatibility Note:</b> For applications targeting
     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always return {@code false}
     * and will have no effect. If apps are targeting an older SDK (
     * {@link android.os.Build.VERSION_CODES#P} or below), they can continue to use this API.
     */
    @Deprecated
    public boolean setWifiEnabled(boolean enabled) {