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
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
Also migrate MediaProvider logging to more general-purpose location
on the ContentProvider.Transport, where we can log exact input/output
values to aid debugging.
Bug: 124347872
Test: manual
Change-Id: I6aba60879ded4e0892d2d1cdd717c23cebaaabd8
Both dump() and reverseDump() only need a single PrintWriter parameter.
This patch adds overloaded versions of these methods with that single
parameter. Callers can slowly migrate to these simpler methods over
time.
Test: Compiled.
Change-Id: I503df2af1d8115f715238f94551343fda1e951cb
The design of aod image wallpaper has changed and we don't need this
implementation any more so we remove it from feature flags.
Bug: 118470430
Bug: 123617158
Test: Manually
Change-Id: I4d48a8b6b8146b754c1d1f48c35855190219d8a9
This api is to log BinaryPushStateChanged.
Experiment id is added as a binary blob that is not expected to be
accessed on device side.
This cl is mainly for API.
Will add follow up cls for persisting train info on disk and make puller
for it.
Will address sepolicy in follow up cls.
Bug: 119633962
Bug: 119685453
Test: will add gts
Change-Id: I68b4246cf7e8079155e16121ca37a312b35a5328
Also add a prototype for a future system-api accessible metrics file
that will be auto-generated from atoms.proto
Test: - ./out/host/linux-x86/bin/statsd_testdrive -p com.google.android.permissoncontroller 170
- triggered permission request
Bug: 123594188, 123663448
Change-Id: Icede6ff1f12ca79ebad6267c045a4fb3a9955402
In ag/5859897 we started tracking source styles for each TypedValue.
It is also useful to keep track of source layouts if the attribute
was resolved against a layout (attribute set in XML layout inside
of <View> tag).
Test: atest CtsContentTestCases:android.content.res.cts.TypedArrayTest
Bug: 111439551
Change-Id: Ie6bc6ecd9a22b536a2f3288263b896f9cec67d38
The current implementation of the ProtoOutputStream compresses the
buffer in order to return its correct size.
For some use cases the compression is too expensive and it is more
useful to have a faster but overestimated size to a precise but slower
one.
This implementation adds a `getRawSize` method which returns the buffer
size without compressing it. If the buffer has already been compressed
the returned size is the same as the one from the `getSize`. If the
buffer is not yet compressed the size may diverge.
This implementation will be used to support a ring buffer for window
transitions on the Window Manager.
Bug: 123535780
Test: Check the getSize method from the EncodedBuffer and the getRawSize
from the ProtoOutputStream.
Change-Id: Ied24742a14b76980afdf6d6d22d67ade15ba7aad
Test: Automated tests should pass. Menu should render at correct size, shape, and position for 0-9 action items.
Bug: 121385065
Change-Id: I3448e7e333ea8fdaeb09a241249ce7521920169e
Adding a quota mechanism for deferring alarms based on their standby
buckets.
Number of times an app can receive alarms in an hour is now capped by a
maximum depending on their standby bucket, with the frequency getting
more restricted as the buckets move higher.
Restricting presubmit test to only run when AlarmManagerService changed,
as some tests can take a while to complete.
Test: atest android.util.LongArrayQueueTest
atest CtsAlarmManagerTestCases:AppStandbyTests
atest FrameworksMockingServicesTests:AlarmManagerServiceTest
Bug: 122974477
Change-Id: Icbd5bbb8aeef91b543d09acee553fd0aa3a23f30