If extraction is run on a set of pixels whose count is less than the
number of max colors, then colors.length < max colors, and accesses
to colors[index] inside the for loop throw an ArrayOutOfBoundsException.
Test: add widget to home screen, reduce size of widget to small area.
observe crash. `mp core services` with fix, observe that crash no longer
occurs. `mp core services` again without fix, verify crash occurs after
boot.
Fixes: 181130209
Change-Id: I60bf1ab39f7a69f2fb0745049fd46d2f0b53a12c
Revert "Specify temp-allowlist reasonCode."
Revert submission 13705302-setTemporaryAppWhitelistDuration(long duration)
Reason for revert: This CL breaks com.android.server.pm.test.verify.domain.DomainVerificationProxyTest. It was submitted via a bad TreeHugger bypass.
Reverted Changes:
I705b97e33:setTemporaryAppWhitelistDuration(long duration) is...
Ide879bafb:Specify temp-allowlist reasonCode.
Change-Id: I13f90beaaff484e4abdcc61bb026685bd0cb16f2
The BackupAgent of an application may run before package post
installation, so the permission state must be ready by then. So
instead of calling onPackageInstalled() in post install, we can revert
to calling it in updateSettingsInternalLI() as in R (before
ag/13144022 which introduced the regression).
This changes the grant permissions etc to be done before package
post-installation, but this might be actually a correct change as
application code may expect permissions, and we are already doing it
like this in installExistingPackageAsUser() so this change is making
it consistent.
Fixes: 175932103
Test: manual
Test: Wipe and restore a backup and ensure Keep is no longer crashing.
Test: presubmit
Change-Id: Ie2e0dbd7a1a8454f9935527b9c303c26010ff592
Adjusts the logic for selecting a domain, removing the selection for
other applications once a domain is verified or overridden by another
application being selected.
To this end, exposes a new Domain class with verified/selected booleans
to encapsulate the state, returned in the initial response for the
Settings screen API. This avoids the usage of the
getDomainVerificationSet API, so that can be restricted to only the
domain verification agent in a future change.
Also introduces the concept of a DomainOwner, which represents a single
package who has been granted any positive level of approval to open
a domain.
Bug: 177923646
CTS-Coverage-Bug: 179382047
Test: atest com.android.server.pm.verify.domain
Test: TODO with Settings changes
Change-Id: Ib14049e397154616f84a2264167ac30659cd81c9
Because domain verification itself filters instant apps, and isn't
aware of the allow instant apps toggle that PackageManagerService
holds onto, PMS should filter the set of ResolveInfo candidates before
DomainVerificationService gets them.
This way it can avoid resolving to an instant app that would later be
blocked and thus fail resolution entirely.
Bug: 180628950
Test: manual, see steps in bug
Change-Id: I37ba986bfafd26f6633ff1b6e355a76b4c92552c