There is some weirdness with the way the AlertActivity behaves when
it's populated and elements are enabled while it's not actually on
the screen. Work around this by populating the AlertActivity during
onResume() [eg. every time the activity is shown] instead of
onCreate() [eg. only the first time the activity is created].
Fixes: 172699073, 173159446
Test: Manual
Test: Start a staging install
Test: Turn off the phone screen
Test: Wait for the staging to complete
Test: Turn on the phone screen.
Test: See the install dialog has OK/Cancel buttons
Change-Id: Ia9525f20f98f42e6b2b865fa926b9707d416cde4
InstallInstalling
Otherwise the URI grant might be taken away before InstallInstalling can
open it.
Fixes: 163274739
Test: atest CtsPackageInstallTestCases
Change-Id: Ibd9ffc253358606b8ae2ea41a875fcb1a1efcb2b
(cherry picked from commit a87968d4fb)
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
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
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
Rename the method to setBlockable. Also rename isBlockableSystem in the
same way.
Fixes: 151311073
Test: atest NotificationChannelTest
Change-Id: Ie25f8aed3c22b74d9ad2329863c4ffebbace03f7
This change makes PackageInstaller visible to all apps on device.
Fixes: 150758101
Test: atest RequiredComponentsTest#testPackageInstallerPresent
Change-Id: Ic5eaa97513de3f57fbe7c2ce029d3b64113cee07
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