96 Commits

Author SHA1 Message Date
TreeHugger Robot
6bc0cb3306 Merge "Migrate remaining parsePackage V1 to V2" into rvc-dev am: a83fad74b4
Change-Id: I42bad76fde7dfe0470976c9ce4df36a7ca8548ff
2020-05-06 04:11:03 +00:00
Winson
3cb5610a99 Migrate remaining parsePackage V1 to V2
Uses ParsingPackageImpl to generate the PackageInfo for
PackageManager's getPackageArchiveInfo API.

This keeps the migration to v2 hidden and thus the API can
be shipped for this release and then deprecated entirely
if necessary.

Exempt-From-Owner-Approval: Has approval on previous patchsets,
    will need non-logic updates to resolve merge conflict and CP
    into rvc-dev properly

Bug: 135203078
Bug: 146575910
Bug: 153880854

Test: atest com.android.server.pm.parsing
Test: atest android.content.pm.PackageManagerTests

Merged-In: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
Change-Id: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
2020-05-05 16:35:34 -07:00
Bill Yi
22701409d4 Import translations. DO NOT MERGE
Change-Id: I392db6decce92516ee897f85a8419fbb38027149
Auto-generated-cl: translation import
2020-04-27 22:39:27 -07:00
TreeHugger Robot
eba95fad12 Merge "Fix PackageInstaller failure when called from different user" into rvc-dev am: 73a8e537ca
Change-Id: Ib5c184e852d32a2b7d84fb6f48f1fe31aece9267
2020-04-15 21:22:46 +00:00
Evan Severson
0461f6fd4d Fix PackageInstaller failure when called from different user
This change checks across all users for the calling uid when doing the
permission check.

Test: Will test in droidfood
Bug: 153868618
Change-Id: Ic599315444212119ce4cb9ac1b06147e9cf19ef3
2020-04-15 12:50:17 -07:00
Robert Horvath
32496b722b Merge "PackageInstaller: Initial focus in non-touch mode on Cancel" into rvc-dev am: aef65ab07b
Change-Id: I3d0db152a6e63fc2e253fd1475842d9cf6d17279
2020-03-26 09:23:23 +00:00
Robert Horvath
aef65ab07b Merge "PackageInstaller: Initial focus in non-touch mode on Cancel" into rvc-dev 2020-03-26 09:10:37 +00:00
Bill Yi
eddfb20b49 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: Idffeaae020eb739f047027e333830ce319e3c683
2020-03-20 14:16:29 -07:00
Robert Horvath
a4b5e96886 PackageInstaller: Initial focus in non-touch mode on Cancel
The initial focus for AlertDialogs in non-touch mode is the positive
button. However, in the PackageInstaller confirmation dialog, the
positive button is initially disabled to prevent tap jacking.
To provide users in non-touch mode with a sensible default focus, put
initial focus in non-touch mode on the cancel button.

Bug: 152026824
Test: On Android TV, with a remote:
      1. Install file explorer app
      2. Push another apk to device
      3. Use file explorer to start apk installation
      4. Verify "Cancel" button is focused
Test: Doing the above with touch does not lead to any visible focus
Change-Id: Iafec25df23c45171c450f5f42cc5da9bf0087ae4
2020-03-20 17:19:06 +01:00
Hall Liu
9866aa8b70 Rename NotificationChannel#setBlockableSystem
Rename the method to setBlockable. Also rename isBlockableSystem in the
same way.

Fixes: 151311073
Test: atest NotificationChannelTest
Change-Id: Ie25f8aed3c22b74d9ad2329863c4ffebbace03f7
2020-03-13 13:50:48 -07:00
Patrick Baumann
157d9aa2da Marks PackageInstaller forceQueryable
This change makes PackageInstaller visible to all apps on device.

Fixes: 150758101
Test: atest RequiredComponentsTest#testPackageInstallerPresent
Change-Id: Ic5eaa97513de3f57fbe7c2ce029d3b64113cee07
2020-03-04 09:16:13 -08:00
Bill Yi
72d6aae8fb Import translations. DO NOT MERGE
Change-Id: I61abeb9aad87fd0915d4fecac2c62c319ada1051
Auto-generated-cl: translation import
2020-02-16 22:24:47 -08:00
Patrick Baumann
42a87d93b7 Adds QUERY_ALL_PACKAGES permission to packageinstaller
Test: atest PackageInstallerTest
Bug: 142386643
Change-Id: Ifad512054262dcfb093163fc3dd1ab28ab632ebd
2020-02-12 19:12:38 +00:00
Bill Yi
e3accc5657 Import translations. DO NOT MERGE
Change-Id: Ifa588260f61c6dd3145dc2da7fafcb74db6bdb57
Auto-generated-cl: translation import
2020-01-19 03:21:36 -08:00
Bill Yi
bb51e2f42d Import translations. DO NOT MERGE
Change-Id: Ie62026e6ccab0c22a2bcafa80fa5cf2e9bc4b7aa
Auto-generated-cl: translation import
2019-12-24 08:48:17 -08:00
Evan Severson
5dc1e33d6f Hide title in more AlertActivities in packageinstaller
Test: Manual + verify with partner
Bug: 139278141
Change-Id: I720460843680777723f628eb4b05fce906326cf8
2019-11-19 08:57:57 -08:00
Bill Yi
dd8ed53d3a Import translations. DO NOT MERGE
Change-Id: I0301f1a914a290051a405d5795a0f7a63a17cd6d
Auto-generated-cl: translation import
2019-11-10 15:02:39 -08:00
Evan Severson
4044831837 Use ApplicationInfo.storageUuid
Test: Uninstall some apps & verify with partner
Fixes: 142856192
Change-Id: I061c52a8681a4dac42e9ce3751a8109aa3e0e60d
2019-10-28 09:48:34 -07:00
Andreea
f3bf405002 Fixed uninstall app screen not expanding properly.
Before: https://screenshot.googleplex.com/P9k547jayoy
After: https://screenshot.googleplex.com/89E21JLBjzJ

Bug: 142130446
Test: Manual test on Q builds.
Change-Id: Ie3eba56ad408016ecc84b0df811c8dd8a1e3df3d
2019-10-11 16:01:04 +00:00
TreeHugger Robot
1068adfa72 Merge "Fix packageinstaller display issue" 2019-09-12 19:09:50 +00:00
Evan Severson
2a8d7bb872 Prevent tapjacking on the packageinstaller Ok button
Test: None yet
Bug: 138443815
Change-Id: I0d5de8673d20fa3d879b0a1eba52ed0b0889eacf
2019-09-06 13:58:13 -07:00
Evan Severson
c509258bb9 Fix packageinstaller display issue
Test: Manual
Fixes: 139569219
Change-Id: I7538568510ec84fbc3c88fcc2fffaac0467172ba
2019-09-06 12:54:53 -07:00
TreeHugger Robot
9e63c33f9e Merge "Create permission manager AIDL" 2019-07-02 23:26:07 +00: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
Bill Yi
6be829aec0 Import translations. DO NOT MERGE
Change-Id: I05c9c5b4eac846680cc7411fd7aa2c8e49150262
Auto-generated-cl: translation import
2019-06-29 16:42:23 -07:00
TreeHugger Robot
5f84625a7b Merge "Remove unused resource" 2019-06-19 12:24:19 +00:00
Svetoslav Ganov
4e26a25ccc Merge "Whitelist all restricted permissions on sideload" into qt-dev am: 04cb6d1ccc am: 5700611461
am: c2d3012a9d

Change-Id: I3dcc198fac2a1bd3184e951a9f63495d1739448d
2019-06-12 09:41:10 -07:00
Svetoslav Ganov
5700611461 Merge "Whitelist all restricted permissions on sideload" into qt-dev
am: 04cb6d1ccc

Change-Id: I13556665d99450757a999d35e40d830bcbe2cf15
2019-06-12 09:28:04 -07:00
Svet Ganov
38493bd689 Whitelist all restricted permissions on sideload
Test: atest android.permission2.cts.RestrictedPermissionsTest#onSideLoadAllRestrictedPermissionsWhitelisted

Bug:134500512

Change-Id: Ia5693f6f39b30e04ad6f96f2c1f5ff7665125e52
2019-06-11 23:41:09 -07:00
Bill Yi
aba8931a53 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I69fa0a0ac28702c5c076f1233a0aa8be2d350d1e
2019-05-21 16:04:46 -07:00
Bill Yi
27546e72b7 Import translations. DO NOT MERGE
Change-Id: I35fc787b2979788f45e2d939ea1b98e0564ca636
Auto-generated-cl: translation import
2019-05-21 15:56:04 -07:00
Anton Hansson
c9239fd922 Remove unused resource
Bug: 132617220
Test: make
Change-Id: Id8303622f30abcc517bcd1034b3a2bc9b08b51d4
2019-05-13 17:43:43 +01:00
Bill Yi
6c621203d8 Import translations. DO NOT MERGE
Change-Id: I58e284d969f95b17898f94a3d9c08a09b7c466d4
Auto-generated-cl: translation import
2019-05-09 05:08:27 -07:00
Philip P. Moltmann
7af3a1cf28 Merge "Make package installer tests post submit" into qt-dev am: fc892fe742
am: 1b1f7a3ded

Change-Id: Ib617651244b492d369b6db4cd796369d8064fe25
2019-04-30 04:13:52 -07:00
Philip P. Moltmann
1b1f7a3ded Merge "Make package installer tests post submit" into qt-dev
am: fc892fe742

Change-Id: I26756f5235d715992c399a465b3274a65d5fb462
2019-04-30 03:56:12 -07:00
Philip P. Moltmann
dbcebfe14f Make package installer tests post submit
As they are UI-tests and hence to flaky for pre-submit.

Fixes: 131353722
Test: n/a
Change-Id: I7bea06bbe16717406ccd0676fb83396066959a92
2019-04-25 16:52:44 -07:00
Philip P. Moltmann
16d33c5808 Merge "Fix re-installation via package uri-s" into qt-dev am: e062b5cce4
am: a17057536d

Change-Id: Ic8fb1d1cc15844d3e64baeeb7a419ffeb7ff1962
2019-04-13 07:42:58 -07:00
Philip P. Moltmann
a17057536d Merge "Fix re-installation via package uri-s" into qt-dev
am: e062b5cce4

Change-Id: Iebb2e8fd5951bb9bc1145efb04603cafdd47881d
2019-04-13 07:29:58 -07:00
Philip P. Moltmann
259b87548c Merge changes Iabebe9cf,I5afbd60f into qt-dev am: 47be500039
am: 8fc7873fc7

Change-Id: I669633f028b0179f44db639d6bd6b75a053558bc
2019-04-12 15:35:25 -07:00
Philip P. Moltmann
8fc7873fc7 Merge changes Iabebe9cf,I5afbd60f into qt-dev
am: 47be500039

Change-Id: I4edab24a5e804815320f121cd473e155c991cab2
2019-04-12 13:31:50 -07:00
Philip P. Moltmann
26ac855b3c Fix re-installation via package uri-s
It is allowed to install a package via a "package" URI. This means that
if a package with the same name is already installed (for any user), please
(re-)install it for the current user.

This was broken as mPackageURI.getPath() does not work for such package
URIs. This call is only needed when we need to show UI, but for package
URIs we don't even new UI, hence we can move it for the "content" path.

Test: atest CtsPackageInstallTestCases
Bug: 117768093
Change-Id: I58d3abde22ae0a77aabe5068680fd0148d799776
2019-04-12 12:58:14 -07:00
Philip P. Moltmann
cd6dbf7e0b Automatically run Package Installer tests
Test: atest --test-mapping frameworks/base/packages/PackageInstaller
Bug: 123212933
Change-Id: Iabebe9cf91fcdacca2bc6d566a1072f1e84eb97f
2019-04-12 10:11:02 -07:00
Philip P. Moltmann
254c3e4bd6 Remove support to install apps from a file
Test: atest CtsPackageInstallTestCases
Bug: 123212933
Change-Id: I5afbd60f2c8db68858289edec0302b782677ded5
2019-04-12 10:10:55 -07:00
Suprabh Shukla
e3826cc786 Merge "OP_REQUEST_INSTALL_PACKAGES denied by default" into qt-dev am: aacec3d111
am: 8849216021

Change-Id: I174ae5514bbcf34eb7aae16a9a61d4e197648a15
2019-04-09 21:50:13 -07:00
Suprabh Shukla
8849216021 Merge "OP_REQUEST_INSTALL_PACKAGES denied by default" into qt-dev
am: aacec3d111

Change-Id: I7e7f922a98bef65f3fd889e2389bccee93f45fb2
2019-04-09 18:37:49 -07:00
Suprabh Shukla
acc75528ff OP_REQUEST_INSTALL_PACKAGES denied by default
Some system apps may download unknown content and the user should
be explicitly asked whether they trust these files. System apps should
explicitly use the extra NOT_UNKNOWN_SOURCE to bypass this check.

Test: Builds, boots, existing tests pass:
atest CtsPackageInstallTestCases

Locally verified they pass if CtsPackageInstallTestCases.apk was signed by
the platform cert.

Bug: 123700348
Change-Id: I2578251906f6656b83464d1c4fc4db99165841c9
2019-04-09 21:00:10 +00:00
TreeHugger Robot
7581837e06 Merge "Import translations. DO NOT MERGE" into qt-dev 2019-04-08 18:26:46 +00:00
Svetoslav Ganov
58819a079a Merge "Restricted permission mechanism - framework" into qt-dev am: 9dfc48d06e
am: 3d47c34546

Change-Id: I6dfcef6fa71e8d7dd0b2710bd565ddde3e601753
2019-04-08 08:34:57 -07:00
Svet Ganov
d8eb8b2690 Restricted permission mechanism - framework
This change adds a mechanism for restricting permissions (only runtime
for now), so that an app cannot hold the permission if it is not white
listed. The whitelisting can happen at install or at any later point.

There are three whitelists: system: OS managed with default grants
and role holders being on it; upgrade: only OS puts on this list
apps when upgrading from a pre to post restriction permission database
version and OS and installer on record can remove; installer: only
the installer on record can add and remove (and the system of course).

Added a permission policy service that sits on top of permissions
and app ops and is responsible to sync between permissions and app
ops when there is an interdependecy in any direction.

Added versioning to the runtime permissions database to allow operations
that need to be done once on upgrade such as adding all permissions held
by apps pre upgrade to the upgrade whitelist if the new permisison version
inctroduces a new restricted permission. The upgrade logic is in the
permission controller and we will eventually put the default grants there.

NOTE: This change is reacting to a VP feedback for how we would handle
SMS/CallLog restriction as we pivoted from role based approach to roles
for things the user would understand plus whitelist for everything else.
This would also help us roll out softly the storage permisison as there
is too much churm coming from developer feedback.

Exempt-From-Owner-Approval: trivial change due to APi adjustment

Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Test: atest CtsPermissionTestCases
Test: atest CtsPermission2TestCases
Test: atest RoleManagerTestCases

bug:124769181

Change-Id: Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd
2019-04-07 22:39:54 -07:00
Bill Yi
aefa3bd0d9 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I0176cd37f38f90705e335409fc3f02b3ff88bc63
2019-04-07 21:06:55 -07:00