Add profileable opt-out to packages.list.
We now have two notions of profileable:
* profileable from shell: the user can profile the app using ADB-based
tools (e.g. Android Studio or shell) . This is off unless the app
opts in.
* profileable from platform services: trusted platform services can,
in accordance to the app installer's Terms Of Service profile the
app. This is the default unless the app opts out. This is enforced
by the profilers with information provided by the framework.
A new flag <profileable android:enable="false"/> can be used to opt out
of profiling in general. If this is not given, the app is considered
profilable by the platform, but the data will *not* be exposed to the
user via shell or adb. If profiles of the app should be given to the
user (e.g. for using Android Studio), <profileable
android:shell="true"/> can can still be used.
We write whether the app opted out or not to packages.list, to be
consumed by the profilers.
CTS-Coverage-Bug: 186720347
Test: m
Test: on userdebug: /data/system/packages.list for preinstalled, Play
Store installed app and sideloaded app.
Test: on user: atest CtsPerfettoTestCases.
Bug: 170284829
Change-Id: I8d4bbedc043976fd11a95a511bd95a05c7ced7b9
15 files changed