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

Commit b723a51b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove obsolete appops debugging logs" into main

parents db6f2b27 7d394745
Loading
Loading
Loading
Loading
+0 −40
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ import android.permission.flags.Flags;
import android.provider.DeviceConfig;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
import android.util.LongSparseArray;
import android.util.LongSparseLongArray;
import android.util.Pools;
@@ -3156,12 +3155,6 @@ public class AppOpsManager {
    /** @hide */
    public static final String KEY_HISTORICAL_OPS = "historical_ops";

    /** System properties for debug logging of noteOp call sites */
    private static final String DEBUG_LOGGING_ENABLE_PROP = "appops.logging_enabled";
    private static final String DEBUG_LOGGING_PACKAGES_PROP = "appops.logging_packages";
    private static final String DEBUG_LOGGING_OPS_PROP = "appops.logging_ops";
    private static final String DEBUG_LOGGING_TAG = "AppOpsManager";

    /**
     * Retrieve the op switch that controls the given operation.
     * @hide
@@ -8066,14 +8059,6 @@ public class AppOpsManager {
    @RequiresPermission(android.Manifest.permission.MANAGE_APP_OPS_MODES)
    public void setUidMode(int code, int uid, @Mode int mode) {
        try {
            // TODO(b/302609140): Remove extra logging after this issue is diagnosed.
            if (code == OP_BLUETOOTH_CONNECT) {
                Log.i(DEBUG_LOGGING_TAG,
                        "setUidMode called for OP_BLUETOOTH_CONNECT with mode: " + mode
                                + " for uid: " + uid + " calling uid: " + Binder.getCallingUid()
                                + " trace: "
                                + Arrays.toString(Thread.currentThread().getStackTrace()));
            }
            mService.setUidMode(code, uid, mode);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
@@ -8094,15 +8079,6 @@ public class AppOpsManager {
    @RequiresPermission(android.Manifest.permission.MANAGE_APP_OPS_MODES)
    public void setUidMode(@NonNull String appOp, int uid, @Mode int mode) {
        try {
            // TODO(b/302609140): Remove extra logging after this issue is diagnosed.
            if (appOp.equals(OPSTR_BLUETOOTH_CONNECT)) {
                Log.i(DEBUG_LOGGING_TAG,
                        "setUidMode called for OPSTR_BLUETOOTH_CONNECT with mode: " + mode
                                + " for uid: " + uid + " calling uid: " + Binder.getCallingUid()
                                + " trace: "
                                + Arrays.toString(Thread.currentThread().getStackTrace()));
            }

            mService.setUidMode(AppOpsManager.strOpToOp(appOp), uid, mode);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
@@ -8143,14 +8119,6 @@ public class AppOpsManager {
    @RequiresPermission(android.Manifest.permission.MANAGE_APP_OPS_MODES)
    public void setMode(int code, int uid, String packageName, @Mode int mode) {
        try {
            // TODO(b/302609140): Remove extra logging after this issue is diagnosed.
            if (code == OP_BLUETOOTH_CONNECT) {
                Log.i(DEBUG_LOGGING_TAG,
                        "setMode called for OPSTR_BLUETOOTH_CONNECT with mode: " + mode
                                + " for uid: " + uid + " calling uid: " + Binder.getCallingUid()
                                + " trace: "
                                + Arrays.toString(Thread.currentThread().getStackTrace()));
            }
            mService.setMode(code, uid, packageName, mode);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
@@ -8173,14 +8141,6 @@ public class AppOpsManager {
    public void setMode(@NonNull String op, int uid, @Nullable String packageName,
            @Mode int mode) {
        try {
            // TODO(b/302609140): Remove extra logging after this issue is diagnosed.
            if (op.equals(OPSTR_BLUETOOTH_CONNECT)) {
                Log.i(DEBUG_LOGGING_TAG,
                        "setMode called for OPSTR_BLUETOOTH_CONNECT with mode: " + mode
                                + " for uid: " + uid + " calling uid: " + Binder.getCallingUid()
                                + " trace: "
                                + Arrays.toString(Thread.currentThread().getStackTrace()));
            }
            mService.setMode(strOpToOp(op), uid, packageName, mode);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();