Commit Graph

8093 Commits

Author SHA1 Message Date
TreeHugger Robot
f10a78ceaf Merge changes from topic "perm_query"
* changes:
  Move add/remove permission
  Move permission info queries
2019-07-03 19:46:44 +00:00
Todd Kennedy
6ffc5a6eee Move add/remove permission
Bug: 135279435
Test: atest android.content.pm.cts.PackageManagerTest
Change-Id: I40a6d592031483a6dfe61906f6fa011c91910328
2019-07-03 10:14:19 -07:00
Todd Kennedy
1d29b4af0b Move permission info queries
Now begins the parade of methods that can be migrated to the
permission manager service and be removed from the package
manager service.

We will still need to maintain some sub-set of APIs in the
package manager service due to unsupported app usage. When
we finally no longer support these AIDL methods, they can
be removed from package manager service.

Bug: 135279435
Test: Manual. Builds and runs
Change-Id: If12609ffdaeb75445d3ec9bcc7f946b8829ba769
2019-07-03 10:14:09 -07:00
TreeHugger Robot
9e63c33f9e Merge "Create permission manager AIDL" 2019-07-02 23:26:07 +00:00
Dmitry Dementyev
35355827e5 Merge "Revert "Do not load xml metadata for unchanged packages in RegisteredServicesCache"" into qt-dev am: 660c234e9a am: a51df29cf5
am: 0a5a744df7

Change-Id: Ic1386954d8c0be43525919e1ef0719dd5cc7c85c
2019-07-02 14:25:55 -07:00
Todd Kennedy
8f135982a8 Create permission manager AIDL
Today, the package manager largely routes any permission related
method to the PermissionManagerService. But, PermissionManagerService
is a service in name only. Instead, we will make the
PermissionManagerService a real service and direct API calls directly
to it.

We will likely need to maintain all of the public permission APIs
that already exist on PackageManager. However, the public -> private
implementation will go directly to PermissionManagerService.

Bug: 135279435
Test: Manual. Device boots
Change-Id: Ia4992ba6d1f4b9050db98c7d7647d51a5d45fcbe
2019-07-02 13:17:05 -07:00
Dmitry Dementyev
0a5a744df7 Merge "Revert "Do not load xml metadata for unchanged packages in RegisteredServicesCache"" into qt-dev am: 660c234e9a
am: a51df29cf5

Change-Id: Iabaa05958523390aa6cba6c2da33411f3d621e7f
2019-07-02 12:39:45 -07:00
Dmitry Dementyev
40431ae1bc Revert "Do not load xml metadata for unchanged packages in RegisteredServicesCache"
This reverts commit 8094880025.

Reason for revert: changed services order
Test: manual
Bug: 136261465

Change-Id: I2f78f0dbbace212309b87f779efad020cf255196
2019-07-02 03:59:17 +00:00
Nikita Ioffe
ec67395d7d Rename ApexInfo.package{Name,Path} to module{Name,Path}
This should resolve the confusion between internal name of APEXes that
comes from apex_manifest.json and packageName that comes from
AndroidManifest.xml.

Follow-up CLs:
* Rename package to module for all apexservice binder APIs.
* Rename package to module in apexd codebase.

Test: atest apexservice_test
Test: atest CtsStagedInstallHostTestCases
Bug: 132428457
Change-Id: If0bd3d368c7373ab0028211a8a4246a9821893af
2019-07-01 12:20:18 +01:00
Andrew Sapperstein
3fa7bd5c62 Merge "Allow granting URI permissions to com.android.settings.module_licenses." into qt-dev am: 9dd0c5628b am: f08f33b97b
am: d31df7f72e

Change-Id: I2a68d073c8c8b588fb87efa07e364aa735d98261
2019-06-28 11:07:13 -07:00
Andrew Sapperstein
f08f33b97b Merge "Allow granting URI permissions to com.android.settings.module_licenses." into qt-dev
am: 9dd0c5628b

Change-Id: Ia58094614151af83aadd36bb04e0389050dd05be
2019-06-28 10:28:00 -07:00
Andrew Sapperstein
9dd0c5628b Merge "Allow granting URI permissions to com.android.settings.module_licenses." into qt-dev 2019-06-28 16:56:04 +00:00
Mathew Inwood
46f7f16a4d Merge "Restore some greylist entries." into qt-dev am: f76bdce6e0 am: 13ffa87a6d
am: 89f02cc81c

Change-Id: Ib5bc4e76d81ad69f7c3293e6cb72393e1aee7ed9
2019-06-28 09:36:40 -07:00
Mathew Inwood
13ffa87a6d Merge "Restore some greylist entries." into qt-dev
am: f76bdce6e0

Change-Id: I320e33be57b8124ff7c132a67c8981d53802f8f5
2019-06-28 07:43:43 -07:00
TreeHugger Robot
bcc1a887ba Merge "Use "commit" for rollbacks instead of "execute"." 2019-06-28 14:14:43 +00:00
Richard Uhler
f498dabccc Use "commit" for rollbacks instead of "execute".
Fix a couple lingering references to "executing" rollbacks. We've long
since switched to the terminology "commit", to highlight that a staged
rollback that has been committed will not take effect until the device
reboots.

Fixes: 136044234
Test: atest RollbackTest
Change-Id: Ic364778c253ff59af8206824a66df72569ab1307
2019-06-28 10:30:10 +00:00
Mathew Inwood
3a75f264a8 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
2019-06-28 10:15:37 +01:00
Richard Uhler
798b859b2b Add TestApi to block the RollbackManagerHandlerThread.
To eliminate flakiness when testing timeout conditions for
RollbackTest.testEnableRollbackTimeoutFailsRollback.

Test: atest RollbackTest.testEnableRollbackTimeoutFailsRollback in a loop
Bug: 134373106
Change-Id: I01f3e769711ffa51fa714ff4bc81e70887f427ad
2019-06-26 10:51:23 +01:00
Andrew Sapperstein
93f5ed6c18 Allow granting URI permissions to com.android.settings.module_licenses.
Exempts this new ContentProvider for providing mainline module licenses.

Also sets ApplicationInfo.publicSourceDir for APEXes.

Bug: 135183006
Test: open module licenses, click app, verify file opens
Change-Id: Iec4f1de198525f7cd176a52d8448a2c71b6aabc0
2019-06-24 18:24:52 -07:00
Amith Yamasani
582bedd9d9 Merge "Expose BIND_NOT_PERCEPTIBLE service flag" into qt-dev am: 41d0b1abc8 am: 29c3068cb4
am: 6fb1afce50

Change-Id: Ie4b878d3fa6ae8c0619b10fe8d87a06c3b182ca4
2019-06-20 09:10:41 -07:00
Amith Yamasani
29c3068cb4 Merge "Expose BIND_NOT_PERCEPTIBLE service flag" into qt-dev
am: 41d0b1abc8

Change-Id: I209930a67dfc89cf4c5178ad21452e624122df7f
2019-06-19 22:53:06 -07:00
Amith Yamasani
5016a7891a Expose BIND_NOT_PERCEPTIBLE service flag
Using this flag when binding to a service will
allow the bound process to be held at a low
oom_adj of 250, so that it can be expunged to
reclaim memory if a more user-visible app needs
it.

Use for bindings such as job services and other
connections that the caller can easily recover
from and restart if necessary.

Adjust the lmk thresholds to use this oom_adj
as one of the levels, so they're killed before
perceptible apps (such as foreground services).

Bug: 135219821
Test: CtsAppTestCases
      Manually check notification listener oom_adj
      and dumpsys activity services output

Change-Id: I9f6d0891d842e4d12f7995b9b1a8f57b0903a16d
2019-06-19 14:40:57 -07:00
Kweku Adams
091fa30767 Remove @Deprecated && @removed package fields.
They were tagged as @removed in Nougat and Oreo.

Bug: 135214188
Test: Android builds
Change-Id: Id52c23d02e2c4b7781c9b138ac2cf29cbf70c09c
2019-06-17 16:25:51 -07:00
Narayan Kamath
4e68ac48ba Merge "Move legacy obb data migration to a handler thread." into qt-dev am: 6d371e092e am: 0794b46b43
am: 55e4fadccd

Change-Id: If91cbfd44196187a4b6ff97878bf4c8ef7dc5139
2019-06-13 02:45:02 -07:00
Narayan Kamath
55e4fadccd Merge "Move legacy obb data migration to a handler thread." into qt-dev am: 6d371e092e
am: 0794b46b43

Change-Id: I0b4bd3128c8dafbec78b739ba51921d03e50d0a1
2019-06-13 02:40:04 -07:00
Narayan Kamath
21ab5c0e34 Merge "Move legacy obb data migration to a handler thread." into qt-dev
am: 6d371e092e

Change-Id: I4505e845d2d85a5b8fd9f4c13c29f1ba5adcc690
2019-06-13 02:34:07 -07:00
Narayan Kamath
157dd1dc40 Move legacy obb data migration to a handler thread.
The operation can potentially take a long time to complete
depending on the volume of data to be copied, so move it off
the ActivityManager handler thread that needs to be available
for other operations.

Bug: 134570017
Test: manual; set a 1 minute sleep in migrate_legacy_obb_data.sh

Change-Id: I3d2c52e8b012ed71c53810e6919d11be9a97cc6c
2019-06-12 13:40:15 +01:00
Winson
01045f5d08 Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev am: d703395fcb am: 7347c0f704
am: 02c612552f

Change-Id: I0e4fbc7d7c7e208d0eb7c029f5dc1ee57afd1ab0
2019-06-10 13:33:41 -07:00
Winson
02c612552f Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev am: d703395fcb
am: 7347c0f704

Change-Id: If3f0a0e539ced53c291b67b2a750004583f26840
2019-06-10 13:28:35 -07:00
Winson
5d53d4b564 Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev
am: d703395fcb

Change-Id: I10e09a0bc15d9f4782ac9d91878becb9046581c3
2019-06-10 13:22:46 -07:00
TreeHugger Robot
d703395fcb Merge "Expose PermissionManager as TestApi and fix SplitPermissionInfo equality" into qt-dev 2019-06-10 20:12:57 +00:00
Winson
f27394ee70 Expose PermissionManager as TestApi and fix SplitPermissionInfo equality
Bug: 129200416
Bug: 129200610

Test: atest SplitPermissionsTest

Change-Id: I98795944e6440e5b7ebba134bd7735a6f78ebc4f
2019-06-07 15:09:06 -07:00
Mårten Kongstad
5a4af40e45 Merge "OMS: add TEST_MAPPING" into qt-dev am: f49c18e1a9 am: 50c5ea184f
am: 66e4dd1649

Change-Id: I7693eb76b3440afb62c00f6d6ddcd1699c8a52a4
2019-06-06 14:10:36 -07:00
Mårten Kongstad
50c5ea184f Merge "OMS: add TEST_MAPPING" into qt-dev
am: f49c18e1a9

Change-Id: I159abb9b55a6885fcb3d28fe2fcc275cc632dd78
2019-06-06 13:54:59 -07:00
TreeHugger Robot
f49c18e1a9 Merge "OMS: add TEST_MAPPING" into qt-dev 2019-06-06 20:44:49 +00:00
Adam Bookatz
97aec9789d Merge "loadUnbadgedItemIcon doesn't crash from getUserIcon" into qt-dev am: 14a34b9efb am: aaa16c0734
am: 5429fd5e37

Change-Id: I345a035d702d699777f5a651664a8a9801ee68b8
2019-06-06 11:28:10 -07:00
Adam Bookatz
aaa16c0734 Merge "loadUnbadgedItemIcon doesn't crash from getUserIcon" into qt-dev
am: 14a34b9efb

Change-Id: I96167fe68786a5269d2178d74c3bb4ffa1afca1c
2019-06-06 11:05:58 -07:00
Tyler Gunn
306e9ee0a1 Merge "Update NEW_OUTGOING_CALL broadcast deprecation docs." am: f089867d9b am: 52f65867d2 am: 755f4a8345
am: a3afd26f9f

Change-Id: Id4cd261f7c6b6e9c21f6a4c626cb08f50e663fc0
2019-06-05 21:18:06 -07:00
Tyler Gunn
755f4a8345 Merge "Update NEW_OUTGOING_CALL broadcast deprecation docs." am: f089867d9b
am: 52f65867d2

Change-Id: Ia91a950690930329bc66427af7289ec6f9fc6f42
2019-06-05 20:28:36 -07:00
Bookatz
9313af68c2 loadUnbadgedItemIcon doesn't crash from getUserIcon
AppicationPackageManager.loadUnbadgedItemIcon would call
UserManager.getUserIcon if the icon was supposed to represent
switching to another the parent user (from a work profile).
However, that call requires extra permissions which may not be
available, which would cause a crash. The work profile doesn't
generally have permission to see the parent's icon, so rather
than showing the actual icon, a generic user icon is shown instead.

Bug: 134177607
Test: Manual confirmation: create a work profile and try to share a
picture (from Photos) to the personal profile.

Change-Id: Id79ca50b8e0a26593addbacf1a0ea709a2bc4da2
2019-06-05 03:03:24 +00:00
Treehugger Robot
f089867d9b Merge "Update NEW_OUTGOING_CALL broadcast deprecation docs." 2019-06-04 18:37:48 +00:00
Dario Freni
376c35b896 Merge "Verify staged APKs pre-reboot." into qt-dev am: e5e876265c am: f1d9180e68
am: 6a0bf91690

Change-Id: Ib5e770d018275ca332fc9a5b5ca38461e3635a66
2019-05-31 21:57:30 -07:00
Dario Freni
f1d9180e68 Merge "Verify staged APKs pre-reboot." into qt-dev
am: e5e876265c

Change-Id: Id30f05784a99abbe2a4d4d21c8fc9b04f2b61525
2019-05-31 19:16:16 -07:00
TreeHugger Robot
e5e876265c Merge "Verify staged APKs pre-reboot." into qt-dev 2019-06-01 00:25:51 +00:00
Gavin Corkery
e1c5497726 Merge "Perform user data back up in post install stage" into qt-dev am: 5b9e00273b am: 909ced209c
am: 86f9858534

Change-Id: I88cea0985a7cd13dbaf1768385a89e7ce2e038a6
2019-05-31 09:39:54 -07:00
Gavin Corkery
86f9858534 Merge "Perform user data back up in post install stage" into qt-dev am: 5b9e00273b
am: 909ced209c

Change-Id: Ie792af7ab6c1bf182eacb8fd402ab56741e6f897
2019-05-31 09:23:24 -07:00
Gavin Corkery
9b87b9a6dd Merge "Perform user data back up in post install stage" into qt-dev
am: 5b9e00273b

Change-Id: I7b45401aeaf34855921f25a2c00c9af1a1a25035
2019-05-31 09:18:06 -07:00
Gavin Corkery
5b9e00273b Merge "Perform user data back up in post install stage" into qt-dev 2019-05-31 16:10:13 +00:00
Dario Freni
f141aab4ed Verify staged APKs pre-reboot.
Test: adb install --staged file.apk on taimen-eng target; adb
install-multi-package file1.apex file2.apex file3.apk file4.apk
Test: atest StagedRollbackTest
Bug: 123753157
Change-Id: I41121b73c0db8ca55bafd2f57cba73bb3b940149
2019-05-31 14:55:08 +01:00
Gavin Corkery
ab5ee411e5 Perform user data back up in post install stage
Currently the backup of user data is done in the enable rollback stage,
during which there is no guarantee that the package being backed up is
not currently running. Moving the backup to the post install stage will
guarantee that the package is not running.

Test: atest RollbackTest
Test: atest StagedRollbackTest
Bug: 124032231
Change-Id: I4b42a0c5ade1645585d1d6f698637df950d05c72
2019-05-31 10:26:56 +01:00