Commit Graph

9773 Commits

Author SHA1 Message Date
Patrick Baumann
92e912e8d2 Merge "Expose grantImplicitAccess in IPackageManager" into rvc-qpr-dev am: e530998c9e am: 0e914bd102
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12294962

Change-Id: Ic11d011d8ae228c1558fab3f0dc5ebc7ea79d470
2020-09-23 20:02:28 +00:00
Patrick Baumann
0e914bd102 Merge "Expose grantImplicitAccess in IPackageManager" into rvc-qpr-dev am: e530998c9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12294962

Change-Id: I31db3a2016da589f2c0b7f4bc955a870ebc384c5
2020-09-23 18:28:16 +00:00
Patrick Baumann
e530998c9e Merge "Expose grantImplicitAccess in IPackageManager" into rvc-qpr-dev 2020-09-23 17:48:57 +00:00
Jackal Guo
1f484774e2 Merge "Prevent arbitrary installers installing apps as instant" 2020-09-23 01:16:54 +00:00
TreeHugger Robot
099a2373a7 Merge "Update BIND_INCLUDE_CAPABILITIES javadoc for R." 2020-09-22 17:40:42 +00:00
Sally Yuen
b486020186 Merge "Add Bold Text to Configuration" 2020-09-21 23:10:21 +00:00
Alex Buynytskyy
b39d13ed7f Installer digests for Incremental installations.
Bug: 160605420
Test: atest ChecksumsTest
Change-Id: I9d46c218cccf87781e9b33711c4d02d94bf824f5
2020-09-21 12:40:56 -07:00
TreeHugger Robot
1488119306 Merge "Added UserInfo.convertedFromPreCreated" into rvc-qpr-dev am: 7d2354bdc5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12495367

Change-Id: I164ccf69a41291610cf7f87f8cbbb453aa2aba2b
2020-09-21 19:20:55 +00:00
Sally
38eba02bba Add Bold Text to Configuration
Bug: 110991537
Test: atest CtsContentTestCases
Change-Id: If010da29d03d06d22bf0fc4cbc3780ed42bf5f86
2020-09-21 19:04:08 +00:00
TreeHugger Robot
7d2354bdc5 Merge "Added UserInfo.convertedFromPreCreated" into rvc-qpr-dev 2020-09-21 18:40:48 +00:00
Charles Chen
a73d039aee Merge "Make a context dervied from an UI context as an UI context" 2020-09-21 10:43:30 +00:00
Rhed Jao
aa5e39fd93 Merge "Updates more CtsContentTestCases to TEST_MAPPING" 2020-09-21 02:18:13 +00:00
Winson Chiu
189a385fd7 Merge "Add getTargetSdkVersion without AppInfo" 2020-09-18 18:18:28 +00:00
Hui Yu
21c57d7787 Update BIND_INCLUDE_CAPABILITIES javadoc for R.
Bug: 164453985
Test: make and check javadoc.
Change-Id: I91b55663f1e8d9e305be3bfb93756cf41cbc71ac
2020-09-18 11:14:27 -07:00
Rhed Jao
096b5ee6c7 Updates more CtsContentTestCases to TEST_MAPPING
Bug: 158798848
Test: atest CtsContentTestCases:android.content.om.cts
Test: atest CtsContentTestCases:android.content.res.cts
Test: atest CtsContentTestCases:android.content.pm.cts
Change-Id: Ibd1d1de550e6cd15f0f3bd0b8b3245afdfe7fb75
2020-09-18 16:42:02 +08:00
Treehugger Robot
61d3e5ca97 Merge "Clarify docs for FLAG_SYSTEM" am: 40dcbcad28 am: b4ff7c066f am: 687923e2c7 am: 8ce81bcb12 am: 2046ae1522
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426971

Change-Id: I26725df92f2f114ca1a43c6471173aaf7d20630e
2020-09-18 04:52:47 +00:00
Treehugger Robot
2046ae1522 Merge "Clarify docs for FLAG_SYSTEM" am: 40dcbcad28 am: b4ff7c066f am: 687923e2c7 am: 8ce81bcb12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426971

Change-Id: I903496a4c0b124d39643a590e8eb42b45bb458ef
2020-09-17 23:25:32 +00:00
Treehugger Robot
8ce81bcb12 Merge "Clarify docs for FLAG_SYSTEM" am: 40dcbcad28 am: b4ff7c066f am: 687923e2c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426971

Change-Id: I8b6e9e6de24d6c6332a5a224d1375ebc63c08899
2020-09-17 21:43:35 +00:00
Winson
050de3f78b Add getTargetSdkVersion without AppInfo
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
2020-09-17 10:37:11 -07:00
Felipe Leme
4c0f6907fb Added UserInfo.convertedFromPreCreated
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)
2020-09-17 06:47:26 +00:00
TreeHugger Robot
a8f4e86533 Merge "Update language to comply with Android's inclusive language guidance" into rvc-qpr-dev am: 792e2be0fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12593704

Change-Id: I31fc971801d9c30bbc61e8fbd97b5aed4d5a775a
2020-09-17 03:45:48 +00:00
TreeHugger Robot
e6ed556cce Merge "Update ContentResolver documentation." 2020-09-16 16:38:30 +00:00
Jackal Guo
e1d6549d2c Prevent arbitrary installers installing apps as instant
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
2020-09-16 09:59:48 +00:00
Songchun Fan
c7c2e0e270 Merge "[incremental/pm] register progress listener" 2020-09-16 05:02:37 +00:00
Songchun Fan
a70985945b [incremental/pm] register progress listener
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
2020-09-15 17:39:41 -07:00
Varun Shah
bdb9dd5def Update ContentResolver documentation.
Fixes: 167394574
Test: n/a
Change-Id: I3615887cd08f6dbe34a81e6fade1228111584880
2020-09-15 15:52:34 -07:00
Jeff Sharkey
4b5b0174d0 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570 am: 487d394296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: Id01f468b43fd5b2aada78608010625b392c1b647
2020-09-15 21:01:48 +00:00
Charles Munger
3bec6b94fe Clarify docs for FLAG_SYSTEM
Bug: 168557744
Change-Id: Ia27aaae7b4f60f843013bd629ebcce4c662828d2
2020-09-15 18:46:49 +00:00
Winson Chiu
40e1467fd0 Merge "Optimize (Parsing)PackageImpl implementation" 2020-09-15 16:22:37 +00:00
Louis Chang
c22364237a Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for
reference.

Bug: 162536543
Test: Treehugger
Change-Id: I6dac60aac172a8fccf4b5671107b41c5c84ccd76
Merged-In: I6dac60aac172a8fccf4b5671107b41c5c84ccd76
2020-09-15 10:23:23 +08:00
Jeff Sharkey
487d394296 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I79488866c538bf9e76d0a6429e30262978f6fdab
2020-09-15 00:13:08 +00:00
Jeff Sharkey
da7478b570 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I9b79dbf3e9983523db11599d8ae289b05aabf80c
2020-09-14 23:42:34 +00:00
Winson
c086fe9ac1 Optimize (Parsing)PackageImpl implementation
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
2020-09-14 15:06:41 -07:00
Mat Bevilacqua
8160121220 Initial commit of PowerStatsService
Bug: 164465661
Bug: 164466995
Bug: 167280723
Test: Verified PowerStatsService is functional on targets that
have ODPM data.

Change-Id: Ic555b380c566ea26bc2214374f142c5448ea2ee7
2020-09-14 20:30:49 +00:00
Patrick Baumann
7d26c8c526 Expose grantImplicitAccess in IPackageManager
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
2020-09-14 19:49:20 +00:00
Alex Buynytskyy
d15391e426 Rollforward: Digest API: allow installer to provide digests for an APK.
5d9710d5b72136b2face76b578ac120ad6ed931e

Bug: 160605420
Fixes: 168445565
Test: atest ChecksumsTest
Test: atest ApkVerityTest:com.android.apkverity.ApkVerityTest

Change-Id: Ib559ad9107996290f4ae4661ccec4dc14658a7e9
2020-09-14 16:23:40 +00:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
Slava Shklyaev
a3d1d1452a Merge "Revert "Digest API: allow installer to provide digests for an APK."" 2020-09-14 15:43:44 +00:00
Slava Shklyaev
4a102df4f2 Revert "Digest API: allow installer to provide digests for an APK."
Revert "Tests for installer-provided checksums."

Revert submission 12538860-installer-digests

Reason for revert: Droidcop: Potential culprit for b/168445565
Reverted Changes:
I112ba8594:Tests for installer-provided checksums.
I69a787bde:Digest API: allow installer to provide digests for...

Bug: 168445565
Change-Id: I2276373024bb951719cf056d28c4de0838c0519f
2020-09-14 15:25:59 +00:00
Charles Chen
9c106a411c Make a context dervied from an UI context as an UI context
fixes: 165833103
Test: atest StrictModeTest ContextAccessTest
Test: atest InputMethodServiceTest InputMethodServiceStrictModeTest

Change-Id: Ia97e1a0cc290be516d2618148600238b3273c54c
2020-09-14 14:56:00 +08:00
TreeHugger Robot
69db2f9521 Merge "Added UserInfo.convertedFromPreCreated" 2020-09-12 20:48:26 +00:00
Alex Buynytskyy
0138bf5f53 Merge "Digest API: allow installer to provide digests for an APK." 2020-09-12 03:45:19 +00:00
Alex Buynytskyy
48c717ecc1 Digest API: allow installer to provide digests for an APK.
Bug: 160605420
Test: atest ChecksumsTest

Change-Id: I69a787bde596c9841ba04772a06c227d902f721f
2020-09-11 13:00:43 -07:00
TreeHugger Robot
ce48d61c99 Merge "Fix up PackageSetting pkg and path documentation" 2020-09-10 01:37:52 +00:00
Winson
b92073c580 Fix up PackageSetting pkg and path documentation
Renames baseCodePath -> baseApkPath and codePath -> path to better
reflect their actual meanings. Their respective JavaDoc has also been
consolidated and updated.

Also explains why the pkg field can be null, as this has been the cause
of a significant number of bugs. Also hides it behind a getter to
preempt any mutation issues. Doesn't refactor existing usages. This can
be done inline with other changes that touch that code.

Bug: 164218844
Bug: 164488334

Test: atest com.android.server.pm

Change-Id: Ia254e7cebb0ab86165e5ec42e8f8bfcf8673884b
2020-09-09 16:19:44 -07:00
TreeHugger Robot
07ca993ac3 Merge "Allow "self" to also use RecognitionService" 2020-09-09 22:27:41 +00:00
TreeHugger Robot
38cc1531f3 Merge "Clean up trivial package refactor TODOs" 2020-09-09 20:28:56 +00:00
Philip P. Moltmann
56d6e0453e Allow "self" to also use RecognitionService
restoring Q behavior

Bug: 160933537
Test: TH
Change-Id: I66e5b743f1e61f744f9aad2248a9b619fd9b97f7
2020-09-09 13:24:55 -07:00