summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2021-04-21 03:02:22 +0000
committerSvet Ganov <svetoslavganov@google.com>2021-04-21 08:06:35 +0000
commit8b1aad623e1b557abbd697fe7e245a9217ad27b7 (patch)
treef0fb9e0c3ca6b79545ecd3e52a22f66efe8b9382 /core/java/android
parenta4a7cd0634fedb01fd8b23ac3a7206d24131e45f (diff)
Pipe start op throught app ops policy and delegate
bug: 185504196 Test: atest CtsAppOpsTestCases atest CtsPermissionTestCases atest CtsPermission2TestCases atest CtsPermission3TestCases atest CtsPermission4TestCases atest CtsPermission5TestCases Change-Id: I5869a3e9719830f59624519f2d54f0765119cf5f
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/AppOpsManagerInternal.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/app/AppOpsManagerInternal.java b/core/java/android/app/AppOpsManagerInternal.java
index 6af4d9364ad2..341b9c5143c1 100644
--- a/core/java/android/app/AppOpsManagerInternal.java
+++ b/core/java/android/app/AppOpsManagerInternal.java
@@ -26,6 +26,7 @@ import android.util.SparseIntArray;
import com.android.internal.app.IAppOpsCallback;
import com.android.internal.util.function.HeptFunction;
import com.android.internal.util.function.HexFunction;
+import com.android.internal.util.function.NonaFunction;
import com.android.internal.util.function.OctFunction;
import com.android.internal.util.function.QuadFunction;
import com.android.internal.util.function.TriFunction;
@@ -101,8 +102,31 @@ public abstract class AppOpsManagerInternal {
Boolean, SyncNotedAppOp> superImpl);
/**
+ * Allows overriding start operation behavior.
+ *
+ * @param token The client state.
+ * @param code The op code to start.
+ * @param uid The UID for which to note.
+ * @param packageName The package for which to note. {@code null} for system package.
+ * @param attributionTag the attribution tag.
+ * @param startIfModeDefault Whether to start the op of the mode is default.
+ * @param shouldCollectAsyncNotedOp If an {@link AsyncNotedAppOp} should be collected
+ * @param message The message in the async noted op
+ * @param shouldCollectMessage whether to collect messages
+ * @param superImpl The super implementation.
+ * @return The app op note result.
+ */
+ SyncNotedAppOp startOperation(IBinder token, int code, int uid,
+ @Nullable String packageName, @Nullable String attributionTag,
+ boolean startIfModeDefault, boolean shouldCollectAsyncNotedOp,
+ @Nullable String message, boolean shouldCollectMessage, @NonNull NonaFunction<
+ IBinder, Integer, Integer, String, String, Boolean, Boolean, String,
+ Boolean, SyncNotedAppOp> superImpl);
+
+ /**
* Allows overriding start proxy operation behavior.
*
+ * @param token The client state.
* @param code The op code to start.
* @param attributionSource The permission identity of the caller.
* @param startIfModeDefault Whether to start the op of the mode is default.