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

Commit 5e2a082b authored by Hai Zhang's avatar Hai Zhang Committed by Android (Google) Code Review
Browse files

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

parents 3c24a473 c72ae256
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import static android.app.AppOpsManager.KEY_TOP_STATE_SETTLE_TIME;
import static android.app.AppOpsManager.MODE_ALLOWED;
import static android.app.AppOpsManager.NoteOpEvent;
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_FLAG_SELF;
import static android.app.AppOpsManager.OP_FLAG_TRUSTED_PROXIED;
@@ -2348,13 +2347,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, null, isPrivileged, true);