Loading core/java/android/app/AppOpsManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -7731,8 +7731,8 @@ public class AppOpsManager { && Objects.equals(mAttributionTag, that.mAttributionTag) && mVirtualDeviceId == that.mVirtualDeviceId && Objects.equals(mMessage, that.mMessage) && Objects.equals(mShouldCollectAsyncNotedOp, that.mShouldCollectAsyncNotedOp) && Objects.equals(mShouldCollectMessage, that.mShouldCollectMessage); && mShouldCollectAsyncNotedOp == that.mShouldCollectAsyncNotedOp && mShouldCollectMessage == that.mShouldCollectMessage; } @Override Loading services/core/java/com/android/server/appop/AppOpsService.java +5 −5 Original line number Diff line number Diff line Loading @@ -3458,7 +3458,7 @@ public class AppOpsService extends IAppOpsService.Stub { final UidState uidState = ops.uidState; if (isOpRestrictedLocked(uid, code, packageName, attributionTag, virtualDeviceId, pvr.bypass, false)) { attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, notedCount); scheduleOpNotedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, AppOpsManager.MODE_IGNORED); return new SyncNotedAppOp(AppOpsManager.MODE_IGNORED, code, attributionTag, Loading @@ -3483,7 +3483,7 @@ public class AppOpsService extends IAppOpsService.Stub { if (DEBUG) Slog.d(TAG, "noteOperation: uid reject #" + uidMode + " for code " + switchCode + " (" + code + ") uid " + uid + " package " + packageName + " flags: " + AppOpsManager.flagsToString(flags)); attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, notedCount); scheduleOpNotedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, uidMode); // TODO(b/333931259): Remove extra logging after this issue is diagnosed. Loading @@ -3507,7 +3507,7 @@ public class AppOpsService extends IAppOpsService.Stub { if (DEBUG) Slog.d(TAG, "noteOperation: reject #" + mode + " for code " + switchCode + " (" + code + ") uid " + uid + " package " + packageName + " flags: " + AppOpsManager.flagsToString(flags)); attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, notedCount); scheduleOpNotedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, mode); // TODO(b/333931259): Remove extra logging after this issue is diagnosed. Loading Loading @@ -4122,7 +4122,7 @@ public class AppOpsService extends IAppOpsService.Stub { + packageName + " flags: " + AppOpsManager.flagsToString(flags)); } attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, 1); scheduleOpStartedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, uidMode, startType, attributionFlags, attributionChainId); Loading @@ -4146,7 +4146,7 @@ public class AppOpsService extends IAppOpsService.Stub { + packageName + " flags: " + AppOpsManager.flagsToString(flags)); } attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, 1); scheduleOpStartedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, mode, startType, attributionFlags, attributionChainId); Loading services/core/java/com/android/server/appop/AttributedOp.java +3 −2 Original line number Diff line number Diff line Loading @@ -160,11 +160,12 @@ final class AttributedOp { * @param uidState UID state of the app noteOp is called for * @param flags OpFlags of the call */ public void rejected(@AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags) { public void rejected(@AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags, int rejectedCount) { rejected(System.currentTimeMillis(), uidState, flags); mAppOpsService.mHistoricalRegistry.incrementOpRejectedCount(parent.op, parent.uid, parent.packageName, tag, uidState, flags); parent.packageName, tag, uidState, flags, rejectedCount); } /** Loading services/core/java/com/android/server/appop/HistoricalRegistryInterface.java +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public interface HistoricalRegistryInterface { */ void incrementOpRejectedCount(int op, int uid, @NonNull String packageName, @Nullable String attributionTag, @AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags); @AppOpsManager.OpFlags int flags, int rejectCount); /** * Read historical ops from both aggregated and discrete events based on input filter. Loading services/core/java/com/android/server/appop/HistoricalRegistrySql.java +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public class HistoricalRegistrySql implements HistoricalRegistryInterface { @Override public void incrementOpRejectedCount(int op, int uid, @NonNull String packageName, @Nullable String attributionTag, int uidState, int flags) { @Nullable String attributionTag, int uidState, int flags, int rejectCount) { } Loading Loading
core/java/android/app/AppOpsManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -7731,8 +7731,8 @@ public class AppOpsManager { && Objects.equals(mAttributionTag, that.mAttributionTag) && mVirtualDeviceId == that.mVirtualDeviceId && Objects.equals(mMessage, that.mMessage) && Objects.equals(mShouldCollectAsyncNotedOp, that.mShouldCollectAsyncNotedOp) && Objects.equals(mShouldCollectMessage, that.mShouldCollectMessage); && mShouldCollectAsyncNotedOp == that.mShouldCollectAsyncNotedOp && mShouldCollectMessage == that.mShouldCollectMessage; } @Override Loading
services/core/java/com/android/server/appop/AppOpsService.java +5 −5 Original line number Diff line number Diff line Loading @@ -3458,7 +3458,7 @@ public class AppOpsService extends IAppOpsService.Stub { final UidState uidState = ops.uidState; if (isOpRestrictedLocked(uid, code, packageName, attributionTag, virtualDeviceId, pvr.bypass, false)) { attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, notedCount); scheduleOpNotedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, AppOpsManager.MODE_IGNORED); return new SyncNotedAppOp(AppOpsManager.MODE_IGNORED, code, attributionTag, Loading @@ -3483,7 +3483,7 @@ public class AppOpsService extends IAppOpsService.Stub { if (DEBUG) Slog.d(TAG, "noteOperation: uid reject #" + uidMode + " for code " + switchCode + " (" + code + ") uid " + uid + " package " + packageName + " flags: " + AppOpsManager.flagsToString(flags)); attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, notedCount); scheduleOpNotedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, uidMode); // TODO(b/333931259): Remove extra logging after this issue is diagnosed. Loading @@ -3507,7 +3507,7 @@ public class AppOpsService extends IAppOpsService.Stub { if (DEBUG) Slog.d(TAG, "noteOperation: reject #" + mode + " for code " + switchCode + " (" + code + ") uid " + uid + " package " + packageName + " flags: " + AppOpsManager.flagsToString(flags)); attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, notedCount); scheduleOpNotedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, mode); // TODO(b/333931259): Remove extra logging after this issue is diagnosed. Loading Loading @@ -4122,7 +4122,7 @@ public class AppOpsService extends IAppOpsService.Stub { + packageName + " flags: " + AppOpsManager.flagsToString(flags)); } attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, 1); scheduleOpStartedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, uidMode, startType, attributionFlags, attributionChainId); Loading @@ -4146,7 +4146,7 @@ public class AppOpsService extends IAppOpsService.Stub { + packageName + " flags: " + AppOpsManager.flagsToString(flags)); } attributedOp.rejected(uidState.getState(), flags); attributedOp.rejected(uidState.getState(), flags, 1); scheduleOpStartedIfNeededLocked(code, uid, packageName, attributionTag, virtualDeviceId, flags, mode, startType, attributionFlags, attributionChainId); Loading
services/core/java/com/android/server/appop/AttributedOp.java +3 −2 Original line number Diff line number Diff line Loading @@ -160,11 +160,12 @@ final class AttributedOp { * @param uidState UID state of the app noteOp is called for * @param flags OpFlags of the call */ public void rejected(@AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags) { public void rejected(@AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags, int rejectedCount) { rejected(System.currentTimeMillis(), uidState, flags); mAppOpsService.mHistoricalRegistry.incrementOpRejectedCount(parent.op, parent.uid, parent.packageName, tag, uidState, flags); parent.packageName, tag, uidState, flags, rejectedCount); } /** Loading
services/core/java/com/android/server/appop/HistoricalRegistryInterface.java +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public interface HistoricalRegistryInterface { */ void incrementOpRejectedCount(int op, int uid, @NonNull String packageName, @Nullable String attributionTag, @AppOpsManager.UidState int uidState, @AppOpsManager.OpFlags int flags); @AppOpsManager.OpFlags int flags, int rejectCount); /** * Read historical ops from both aggregated and discrete events based on input filter. Loading
services/core/java/com/android/server/appop/HistoricalRegistrySql.java +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public class HistoricalRegistrySql implements HistoricalRegistryInterface { @Override public void incrementOpRejectedCount(int op, int uid, @NonNull String packageName, @Nullable String attributionTag, int uidState, int flags) { @Nullable String attributionTag, int uidState, int flags, int rejectCount) { } Loading