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

Commit 740e68c2 authored by David Su's avatar David Su
Browse files

Verbose Logging: Add maxTargetSdk

Add maxTargetSdk = Q for @UnsupportedAppUsage
Wifi Verbose Logging APIs. Callers on Android R+
should use formal @SystemApi's.

Bug: 148967842
Test: compiles
Change-Id: I27798f2ae97f07c3452e13ff8f82fdc90b36298d
parent 75088d14
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import android.net.wifi.hotspot2.OsuProvider;
import android.net.wifi.hotspot2.PasspointConfiguration;
import android.net.wifi.hotspot2.ProvisioningCallback;
import android.os.Binder;
import android.os.Build;
import android.os.Handler;
import android.os.HandlerExecutor;
import android.os.IBinder;
@@ -4900,7 +4901,10 @@ public class WifiManager {
    }

    /** @hide */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(
            maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code #setVerboseLoggingEnabled(boolean)} instead."
    )
    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
    public void enableVerboseLogging (int verbose) {
        try {
@@ -4928,7 +4932,10 @@ public class WifiManager {

    /** @hide */
    // TODO(b/145484145): remove once SUW stops calling this via reflection
    @UnsupportedAppUsage
    @UnsupportedAppUsage(
            maxTargetSdk = Build.VERSION_CODES.Q,
            publicAlternatives = "Use {@code #isVerboseLoggingEnabled()} instead."
    )
    public int getVerboseLoggingLevel() {
        try {
            return mService.getVerboseLoggingLevel();