diff options
| author | Soonil Nagarkar <sooniln@google.com> | 2021-02-12 08:57:10 -0800 |
|---|---|---|
| committer | Soonil Nagarkar <sooniln@google.com> | 2021-02-19 13:17:59 -0800 |
| commit | ab220fee70b1005d85f9db60b5149919a73dd0f4 (patch) | |
| tree | 2e3c1c82528429f5888ff04c477b3c5014757d77 /core/java | |
| parent | 0aa410feb934e7dd0af298d05071a88230461cb8 (diff) | |
Added attribution tag to note listener
Add attribution tag information for listeners on noteOps().
Bug: 180111317
Test: none
Change-Id: I39ae9af893b8c81b1d832c4c3dc876f16ffc301f
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 20 | ||||
| -rw-r--r-- | core/java/com/android/internal/app/IAppOpsNotedCallback.aidl | 2 | ||||
| -rw-r--r-- | core/java/com/android/internal/app/IAppOpsStartedCallback.aidl | 2 |
3 files changed, 14 insertions, 10 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index b85b1861aa02..3f0ca44b7c08 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -6530,14 +6530,15 @@ public class AppOpsManager { public interface OnOpNotedListener { /** * Called when an op was noted. - * * @param code The op code. * @param uid The UID performing the operation. * @param packageName The package performing the operation. + * @param attributionTag The attribution tag performing the operation. * @param flags The flags of this op * @param result The result of the note. */ - void onOpNoted(int code, int uid, String packageName, @OpFlags int flags, @Mode int result); + void onOpNoted(int code, int uid, String packageName, String attributionTag, + @OpFlags int flags, @Mode int result); } /** @@ -6570,14 +6571,15 @@ public class AppOpsManager { * Called when an op was started. * * Note: This is only for op starts. It is not called when an op is noted or stopped. - * * @param op The op code. * @param uid The UID performing the operation. * @param packageName The package performing the operation. + * @param attributionTag The attribution tag performing the operation. * @param flags The flags of this op * @param result The result of the start. */ - void onOpStarted(int op, int uid, String packageName, @OpFlags int flags, @Mode int result); + void onOpStarted(int op, int uid, String packageName, String attributionTag, + @OpFlags int flags, @Mode int result); } AppOpsManager(Context context, IAppOpsService service) { @@ -7160,8 +7162,9 @@ public class AppOpsManager { } cb = new IAppOpsStartedCallback.Stub() { @Override - public void opStarted(int op, int uid, String packageName, int flags, int mode) { - callback.onOpStarted(op, uid, packageName, flags, mode); + public void opStarted(int op, int uid, String packageName, String attributionTag, + int flags, int mode) { + callback.onOpStarted(op, uid, packageName, attributionTag, flags, mode); } }; mStartedWatchers.put(callback, cb); @@ -7227,8 +7230,9 @@ public class AppOpsManager { } cb = new IAppOpsNotedCallback.Stub() { @Override - public void opNoted(int op, int uid, String packageName, int flags, int mode) { - callback.onOpNoted(op, uid, packageName, flags, mode); + public void opNoted(int op, int uid, String packageName, String attributionTag, + int flags, int mode) { + callback.onOpNoted(op, uid, packageName, attributionTag, flags, mode); } }; mNotedWatchers.put(callback, cb); diff --git a/core/java/com/android/internal/app/IAppOpsNotedCallback.aidl b/core/java/com/android/internal/app/IAppOpsNotedCallback.aidl index cb280cd14180..f3759e091ed6 100644 --- a/core/java/com/android/internal/app/IAppOpsNotedCallback.aidl +++ b/core/java/com/android/internal/app/IAppOpsNotedCallback.aidl @@ -18,5 +18,5 @@ package com.android.internal.app; // Iterface to observe op note/checks of ops oneway interface IAppOpsNotedCallback { - void opNoted(int op, int uid, String packageName, int flags, int mode); + void opNoted(int op, int uid, String packageName, String attributionTag, int flags, int mode); } diff --git a/core/java/com/android/internal/app/IAppOpsStartedCallback.aidl b/core/java/com/android/internal/app/IAppOpsStartedCallback.aidl index b0cb2a8ceb64..3a108e7e1d94 100644 --- a/core/java/com/android/internal/app/IAppOpsStartedCallback.aidl +++ b/core/java/com/android/internal/app/IAppOpsStartedCallback.aidl @@ -18,5 +18,5 @@ package com.android.internal.app; // Iterface to observe op starts oneway interface IAppOpsStartedCallback { - void opStarted(int op, int uid, String packageName, int flags, int mode); + void opStarted(int op, int uid, String packageName, String attributionTag, int flags, int mode); } |
