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

Commit ffc64ac3 authored by Hai Zhang's avatar Hai Zhang Committed by Gerrit Code Review
Browse files

Merge "AppOpsService: Don't log stack traces for isolated processes"

parents c9af6cf3 008a6604
Loading
Loading
Loading
Loading
+25 −5
Original line number Diff line number Diff line
@@ -2797,7 +2797,11 @@ public class AppOpsService extends IAppOpsService.Stub {
        try {
            pvr = verifyAndGetBypass(uid, packageName, null);
        } catch (SecurityException e) {
            if (Process.isIsolated(uid)) {
                Slog.e(TAG, "Cannot setMode: isolated process");
            } else {
                Slog.e(TAG, "Cannot setMode", e);
            }
            return;
        }

@@ -3252,7 +3256,11 @@ public class AppOpsService extends IAppOpsService.Stub {
        try {
            pvr = verifyAndGetBypass(uid, packageName, null);
        } catch (SecurityException e) {
            Slog.e(TAG, "checkOperation", e);
            if (Process.isIsolated(uid)) {
                Slog.e(TAG, "Cannot checkOperation: isolated process");
            } else {
                Slog.e(TAG, "Cannot checkOperation", e);
            }
            return AppOpsManager.opToDefaultMode(code);
        }

@@ -3458,7 +3466,11 @@ public class AppOpsService extends IAppOpsService.Stub {
                attributionTag = null;
            }
        } catch (SecurityException e) {
            Slog.e(TAG, "noteOperation", e);
            if (Process.isIsolated(uid)) {
                Slog.e(TAG, "Cannot noteOperation: isolated process");
            } else {
                Slog.e(TAG, "Cannot noteOperation", e);
            }
            return new SyncNotedAppOp(AppOpsManager.MODE_ERRORED, code, attributionTag,
                    packageName);
        }
@@ -3974,7 +3986,11 @@ public class AppOpsService extends IAppOpsService.Stub {
                attributionTag = null;
            }
        } catch (SecurityException e) {
            Slog.e(TAG, "startOperation", e);
            if (Process.isIsolated(uid)) {
                Slog.e(TAG, "Cannot startOperation: isolated process");
            } else {
                Slog.e(TAG, "Cannot startOperation", e);
            }
            return new SyncNotedAppOp(AppOpsManager.MODE_ERRORED, code, attributionTag,
                    packageName);
        }
@@ -4148,7 +4164,11 @@ public class AppOpsService extends IAppOpsService.Stub {
                attributionTag = null;
            }
        } catch (SecurityException e) {
            if (Process.isIsolated(uid)) {
                Slog.e(TAG, "Cannot finishOperation: isolated process");
            } else {
                Slog.e(TAG, "Cannot finishOperation", e);
            }
            return;
        }