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

Commit c72ae256 authored by Hai Zhang's avatar Hai Zhang
Browse files

Revert "Add Slog.wtf for calling setMode() with OP_COARSE_LOCATION."

This reverts commit 2a31fd75.

Reason for revert: Remove debugging info before R ships.

Fixes: 146014123
Change-Id: Ic1804d6fb85d6259a1a8f83e9f6285625c8485a5
parent 2a31fd75
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import static android.app.ActivityManager.PROCESS_CAPABILITY_FOREGROUND_LOCATION
import static android.app.AppOpsManager.MAX_PRIORITY_UID_STATE;
import static android.app.AppOpsManager.MIN_PRIORITY_UID_STATE;
import static android.app.AppOpsManager.OP_CAMERA;
import static android.app.AppOpsManager.OP_COARSE_LOCATION;
import static android.app.AppOpsManager.OP_FLAGS_ALL;
import static android.app.AppOpsManager.OP_NONE;
import static android.app.AppOpsManager.OP_PLAY_AUDIO;
@@ -1643,13 +1642,6 @@ public class AppOpsService extends IAppOpsService.Stub {
            return;
        }

        // STOPSHIP: Remove this check once we are sure no one is doing it.
        if (code == OP_COARSE_LOCATION && mode != AppOpsManager.opToDefaultMode(code)) {
            Slog.wtf(TAG, "Trying to setMode() instead of setUidMode(), " + "code=" + code
                    + ", uid=" + uid + ", packageName=" + packageName + ", mode=" + mode
                    + ", callingUid=" + Binder.getCallingUid(), new RuntimeException());
        }

        synchronized (this) {
            UidState uidState = getUidStateLocked(uid, false);
            Op op = getOpLocked(code, uid, packageName, isPrivileged, true);