Skip to content
Commit 49bd9e1e authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Refactor app-op access/reject counters

The last system was too confusing and caused bugs. The new system is
easier to understand.

This still uses the key which is the combination of uidState and
op-flags. I.e. now we collect access + rejection events for the
cross-product of
- package (parameter to noteOp)
- featureId (parameter to noteOp)
- op (parameter to noteOp)
- uidState of the package the noteOp was called
- opFlags (based on which app called the noteOp and how trusted this app
was)

uidState + opFlags are usually combined into the "key" variable.

This also unifies the APIs in Op*Entry to be the same of each data-field
of an op-entry.

Note: This temporarily breaks
com.android.server.appop.AppOpsActiveWatcherTest#testIsRunning as active
ops are not yet reported. This needs to be fixed by a follow up change.

Bug: 144997947
Test: atest --test-mapping services/core/java/com/android/server/appop/
Change-Id: I9844f9886b1c032d01de51bbb46267e3244b6da6
parent 848cc353
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment