Skip to content
Commit af189e33 authored by Svet Ganov's avatar Svet Ganov
Browse files

Slice and dice app ops - framework

Appops can be peformed by an app on its behalf and also on
behalf of another app, i.e. an app can perform a proxy op
and blame the work on another app. The proxy mechanims is
for apps doing work on behalf of other apps where GCore is
one example since the app doing the work needs to check if
the caller has access to the functionality - specifically
the app op backing a runtime permission in case the calling
app does not support runtime permissions.

Apps being able to blame work on other apps is a problem now
that we would be using historical op data to show permission
usage in the UI as apps can start blaming each other to gain
a competitive advantage.

To address the issue we are adding APIs for querying portions
of the app op data - last and historical. One can now get
the ops for work the app did for itself, work the app blamed
on other apps if the app is trusted, work the app blamed on
other apps if the app is not trusted, work other trusted apps
blamed on the app, work other untrusted apps blamed on the app.
A trusted app is one holding the permisison to update app op
stats which is privileged.

The data slicing API allow us to show in the UI only the trusted
poriton of the data which is work the app did for itself, work
trusted apps balmed on the app, and work the app if untrusted
blamed on other apps.

Test: atest CtsAppOpsTestCases

bug:111061782

Change-Id: I9a2bcaea272cb06f38ba742cf601a6dc3b287d5e
parent f6410681
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