* changes:
Do not show rationale when permission is restricted
Add role allowlist for restricted permissions
Add documentation to APIs using non-inclusive lanuage
Treat background mic/camera normally
Introduce new permissionFlag
Split camera and microphone for background modes
Add background microphone and camera permission
This commit introduces the TimeManager API class. It is intended to
provide access to the time and time zone detector services, which
historically have had their own (internal) API classes to access them.
This commit contains various fixes to the listener handling logic
noticed while testing the APIs.
The first APIs on TimeManager are being exposed for use by SetUp Wizard,
which requires System APIs.
The APIs enable the calling app to determine the capabilities for /
config of the current user that affect time zone detection and then
alter them.
The primary usecase:
The rules for who can do what and when for time zone detection are
becoming more complicated, and device and user capabilities will be
affected by compile time constants, device config (resources) and device
hardware. By exposing this API, the complex logic can be encoded in one
place (the system server), rather than duplicating them in multiple
client apps.
These APIs are also intended for use by SettingsUI (and the various form
factor versions of that), but settings apps do not currently require
them to be marked with @SystemApi.
Bug: 159891384
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Test: atest android.app.time
Change-Id: I9b59099748e2391c180e124edf83fa521beb1b51
This API allows the test to create
contention on AM, PM and/or WM locks.
Test: a prototype lock contention test
Bug: 168630376
Change-Id: I656b6b412d517cb3b3b16367d8712f78ccbc33d8
The new permission flag is for restricted permissions which the
installer is not able to exempt.
Test: Install test app
Bug: 158311343
Change-Id: I7340948690ea69750ef479d1b8f0ac8a6177c98c
For quickly checking an app's targetSdkVersion without building and
returning an entire ApplicationInfo object.
Bug: 164459559
Test: atest android.content.pm.cts.PackageManagerTest#testGetInfo
Change-Id: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
This attribute is useful to identify (on bugreports) whether a
user was created "from scratch" or converted from a pre-created user.
Test: adb shell cmd user list --all -v
Test: adb shell dumpsys user
Test: atest UserControllerTest UserManagerServiceUserInfoTest
Fixes: 165703573
Change-Id: Iee9df636db5677b4d968d49bb5f5b3fbb9a7f02d
Merged-In: Iee9df636db5677b4d968d49bb5f5b3fbb9a7f02d
(cherry picked from commit c5986436a9779bbe9068609062fb231aff37e1d4)
To this end, we enforce that only system installer could create the
install session when the install as instant flag is set.
Bug: 74401586
Test: atest SessionTest#confirmInstantInstallationFails
Test: atest InstallSessionTransferTest
Test: atest CtsSignedConfigHostTestCases
Test: Play could install instant apps
Test: adb install --instant works
Change-Id: Icb8088a5773a7b47ebfe47b7630e7b89f01a9563
Incremental Serivce periodically polls loading progress and sends to
Package Manager Service. Package Manager provides APIs for other
interested parties to listen to the loading progress.
BUG: 165841827
Test: unit test
Change-Id: I44b9e17c2240b9efe53bc09fc728b6671f1f7dfe
To speed up recurring ApplicationInfo creation, this caches
the the appInfoFlags/appInfoPrivateFlags at parse time, since
they're immutable at that point. This saves having to calculate
it hundreds of times for all the packages in getInstalledPackages
or similar.
This also saves the base app data directories for the system user,
or user 0, interning the strings since they're shared across
packages with the same volume UUID. A better solution would
cache these paths during boot scan and re-use the strings directly
rather than re-building and relying on interning, but there was
no good mechanism for that.
This decreases string append computation time and compromises
between persistent memory and performance.
This also compacts boolean fields into a bitset, decreasing
the amount persisted in both the object memory and the Parcelable
output.
In combination these changes result in a net decrease in memory
usage, although the difference is neglible, on the order of
~4KB for 181 packages or ~22B a package. The increase in speed is
roughly 2/3rds saved off the total time of generateWithComponents.
An important note is that hideAsParsed/hideAsFinal are now
required to be called because they now calculate the derived
fields to be cached.
Bug: 153656459
Test: atest CrossProfileAppsServiceImplRoboTest
Test: atest PackageManagerComponentLabelIconOverrideTest
Test: atest PackageParserTest
Test: atest UserSystemPackageInstallerTest
Test: atest DexoptUtilsTest
Test: atest com.android.server.pm.parsing
Test: atest PackageInfoUserFieldsTest
Test: atest com.android.server.pm.ScanTests
Test: atest android.content.pm.cts.PackageManagerTest
Change-Id: I977edb9dec720893ccb1ce5b9df33733c408d3c1
Bug: 164465661
Bug: 164466995
Bug: 167280723
Test: Verified PowerStatsService is functional on targets that
have ODPM data.
Change-Id: Ic555b380c566ea26bc2214374f142c5448ea2ee7
This change exposes the method to grant implicit visibility access via
IPackageManager and as a hidden API in PackageManager. This variant of
the method takes a recipient UID and the authority that it should see
and limits access to only the contacts provider on device.
Bug: 158688602
Test: PackageManagerTests
Change-Id: I0050593e4aa734af1a69a40a60746f7cf0ea72df