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

This commit is contained in:
Hai Zhang
2020-02-21 21:20:45 +00:00
committed by Android (Google) Code Review

View File

@@ -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);