Loading services/core/java/com/android/server/AppOpsService.java +18 −2 Original line number Diff line number Diff line Loading @@ -1346,8 +1346,24 @@ public class AppOpsService extends IAppOpsService.Stub { return; } if (!client.mStartedOps.remove(op)) { Slog.wtf(TAG, "Operation not started: uid" + op.uid + " pkg=" + op.packageName + " op=" + op.op); // We finish ops when packages get removed to guarantee no dangling // started ops. However, some part of the system may asynchronously // finish ops for an already gone package. Hence, finishing an op // for a non existing package is fine and we don't log as a wtf. final long identity = Binder.clearCallingIdentity(); try { if (LocalServices.getService(PackageManagerInternal.class).getPackageUid( resolvedPackageName, 0, UserHandle.getUserId(uid)) < 0) { Slog.i(TAG, "Finishing op=" + AppOpsManager.opToName(code) + " for non-existing package=" + resolvedPackageName + " in uid=" + uid); return; } } finally { Binder.restoreCallingIdentity(identity); } Slog.wtf(TAG, "Operation not started: uid=" + op.uid + " pkg=" + op.packageName + " op=" + AppOpsManager.opToName(op.op)); return; } finishOperationLocked(op, /*finishNested*/ false); Loading Loading
services/core/java/com/android/server/AppOpsService.java +18 −2 Original line number Diff line number Diff line Loading @@ -1346,8 +1346,24 @@ public class AppOpsService extends IAppOpsService.Stub { return; } if (!client.mStartedOps.remove(op)) { Slog.wtf(TAG, "Operation not started: uid" + op.uid + " pkg=" + op.packageName + " op=" + op.op); // We finish ops when packages get removed to guarantee no dangling // started ops. However, some part of the system may asynchronously // finish ops for an already gone package. Hence, finishing an op // for a non existing package is fine and we don't log as a wtf. final long identity = Binder.clearCallingIdentity(); try { if (LocalServices.getService(PackageManagerInternal.class).getPackageUid( resolvedPackageName, 0, UserHandle.getUserId(uid)) < 0) { Slog.i(TAG, "Finishing op=" + AppOpsManager.opToName(code) + " for non-existing package=" + resolvedPackageName + " in uid=" + uid); return; } } finally { Binder.restoreCallingIdentity(identity); } Slog.wtf(TAG, "Operation not started: uid=" + op.uid + " pkg=" + op.packageName + " op=" + AppOpsManager.opToName(op.op)); return; } finishOperationLocked(op, /*finishNested*/ false); Loading