Loading services/core/java/com/android/server/appop/AppOpsService.java +12 −5 Original line number Original line Diff line number Diff line Loading @@ -1749,7 +1749,14 @@ public class AppOpsService extends IAppOpsService.Stub { */ */ private @Mode int checkOperationUnchecked(int code, int uid, @NonNull String packageName, private @Mode int checkOperationUnchecked(int code, int uid, @NonNull String packageName, boolean raw) { boolean raw) { boolean isPrivileged = verifyAndGetIsPrivileged(uid, packageName); boolean isPrivileged; try { isPrivileged = verifyAndGetIsPrivileged(uid, packageName); } catch (SecurityException e) { Slog.e(TAG, "checkOperation", e); return AppOpsManager.opToDefaultMode(code); } synchronized (this) { synchronized (this) { if (isOpRestrictedLocked(uid, code, packageName, isPrivileged)) { if (isOpRestrictedLocked(uid, code, packageName, isPrivileged)) { Loading Loading @@ -1939,8 +1946,8 @@ public class AppOpsService extends IAppOpsService.Stub { try { try { isPrivileged = verifyAndGetIsPrivileged(uid, packageName); isPrivileged = verifyAndGetIsPrivileged(uid, packageName); } catch (SecurityException e) { } catch (SecurityException e) { Slog.e(TAG, "Cannot startOperation", e); Slog.e(TAG, "noteOperation", e); return AppOpsManager.MODE_IGNORED; return AppOpsManager.MODE_ERRORED; } } synchronized (this) { synchronized (this) { Loading Loading @@ -2117,8 +2124,8 @@ public class AppOpsService extends IAppOpsService.Stub { try { try { isPrivileged = verifyAndGetIsPrivileged(uid, packageName); isPrivileged = verifyAndGetIsPrivileged(uid, packageName); } catch (SecurityException e) { } catch (SecurityException e) { Slog.e(TAG, "Cannot startOperation", e); Slog.e(TAG, "startOperation", e); return AppOpsManager.MODE_IGNORED; return AppOpsManager.MODE_ERRORED; } } synchronized (this) { synchronized (this) { Loading Loading
services/core/java/com/android/server/appop/AppOpsService.java +12 −5 Original line number Original line Diff line number Diff line Loading @@ -1749,7 +1749,14 @@ public class AppOpsService extends IAppOpsService.Stub { */ */ private @Mode int checkOperationUnchecked(int code, int uid, @NonNull String packageName, private @Mode int checkOperationUnchecked(int code, int uid, @NonNull String packageName, boolean raw) { boolean raw) { boolean isPrivileged = verifyAndGetIsPrivileged(uid, packageName); boolean isPrivileged; try { isPrivileged = verifyAndGetIsPrivileged(uid, packageName); } catch (SecurityException e) { Slog.e(TAG, "checkOperation", e); return AppOpsManager.opToDefaultMode(code); } synchronized (this) { synchronized (this) { if (isOpRestrictedLocked(uid, code, packageName, isPrivileged)) { if (isOpRestrictedLocked(uid, code, packageName, isPrivileged)) { Loading Loading @@ -1939,8 +1946,8 @@ public class AppOpsService extends IAppOpsService.Stub { try { try { isPrivileged = verifyAndGetIsPrivileged(uid, packageName); isPrivileged = verifyAndGetIsPrivileged(uid, packageName); } catch (SecurityException e) { } catch (SecurityException e) { Slog.e(TAG, "Cannot startOperation", e); Slog.e(TAG, "noteOperation", e); return AppOpsManager.MODE_IGNORED; return AppOpsManager.MODE_ERRORED; } } synchronized (this) { synchronized (this) { Loading Loading @@ -2117,8 +2124,8 @@ public class AppOpsService extends IAppOpsService.Stub { try { try { isPrivileged = verifyAndGetIsPrivileged(uid, packageName); isPrivileged = verifyAndGetIsPrivileged(uid, packageName); } catch (SecurityException e) { } catch (SecurityException e) { Slog.e(TAG, "Cannot startOperation", e); Slog.e(TAG, "startOperation", e); return AppOpsManager.MODE_IGNORED; return AppOpsManager.MODE_ERRORED; } } synchronized (this) { synchronized (this) { Loading