Commit Graph

10267 Commits

Author SHA1 Message Date
TreeHugger Robot
f07f50aa00 Merge "Fix screen size with compatibility override scale" into sc-dev am: 40ad781251
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13544385

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7bf0d4eb554a9d40c2415c17adb112b05abec349
2021-02-11 16:51:15 +00:00
TreeHugger Robot
40ad781251 Merge "Fix screen size with compatibility override scale" into sc-dev 2021-02-11 16:39:15 +00:00
Kholoud Mohamed
dec632dc1d Merge "Expose PM#setKeepUninstalledPackages as TestAPI" into sc-dev am: bf3934e0af
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13518116

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic438e436b3cf880155fabd113d39a037ae11f8d4
2021-02-11 13:58:59 +00:00
TreeHugger Robot
bf732c6a2f Merge "Introduce SystemVibratorManager" into sc-dev am: ba4fa60b35
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13417831

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7a90cc6f795169a1a84907b8374e83c827f565c
2021-02-11 13:58:15 +00:00
Kholoud Mohamed
bf3934e0af Merge "Expose PM#setKeepUninstalledPackages as TestAPI" into sc-dev 2021-02-11 13:56:46 +00:00
TreeHugger Robot
ba4fa60b35 Merge "Introduce SystemVibratorManager" into sc-dev 2021-02-11 13:12:18 +00:00
TreeHugger Robot
9038560d26 Merge "DataLoader lifecycle." into sc-dev am: 8b8c4301ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13509737

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib72de1661a1d29a5798a708e2b64c67a3e658ca2
2021-02-11 11:07:04 +00:00
Lais Andrade
55a0aebe7f Introduce SystemVibratorManager
Add default system implementation of vibrator manager service that uses
IVibratorManagerService to access the device vibrators.

Change implementation of SystemVibrator to use VibratorManagerService
and delete local service VibratorService.

Introduce missing public APIs for VibratorManager and Vibrator.getId.

Bug: 167946816
Test: VibratorManagerServiceTest, VibratorTest, VibrationEffectTest
Change-Id: I55cdeb72c7ca39ccf0c7b2fda60b16de1031801e
2021-02-11 09:26:21 +00:00
Alex Buynytskyy
b19ee3ebd8 DataLoader lifecycle.
- restarting DataLoaders for not fully downloaded mounts,
- exponential backoff retry on DataLoader restart.

Bug: 173223115
Bug: 160634487
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I5a93fd515ef0fec09452ce7bb4cd79fbd283d45f
2021-02-11 08:47:27 +00:00
TreeHugger Robot
c0f1dd8710 Merge "Add support for knownSigner permission protection flag" into sc-dev am: 08ca0311b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13504004

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I315bdf457c8da8648f085e148c72e0e720c3d3b8
2021-02-11 01:58:10 +00:00
Mady Mellor
713fa317c7 Merge "Bubble API: intent extra for bubbled activities" into sc-dev am: b91377962d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13418961

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I633dc748615a47855419c9421fd611462afd8e85
2021-02-11 01:56:26 +00:00
TreeHugger Robot
08ca0311b5 Merge "Add support for knownSigner permission protection flag" into sc-dev 2021-02-11 01:48:45 +00:00
Mady Mellor
b91377962d Merge "Bubble API: intent extra for bubbled activities" into sc-dev 2021-02-11 00:35:56 +00:00
Michael Groover
27eef5cfcd Add support for knownSigner permission protection flag
This commit adds support for a new permission protection flag that
allows a permission declaration to also include an array resource of
trusted signing certificate digests. A permission declared with this
new knownSigner permission flag will be granted to a requesting app
if that app's current signer, or any of the previous signers in its
lineage, are in the declared trusted signing certificate set.

Bug: 172970984
Test: atest SigningDetailsTest
Test: atest PkgInstallSignatureVerificationTest
Change-Id: I54ff2ac720c3a1828d0606426197f7f0e0d0d4b5
2021-02-10 14:49:17 -08:00
Roland Levillain
a7f6e5ea40 Merge changes from topic "cherrypick-android_util-a0ae5zk4cb" into sc-dev
* changes:
  [Mainline] android.system package APIs migration
  Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of libcore
2021-02-10 18:23:48 +00:00
Ryan Mitchell
37bd04719b Merge changes I0539656f,I4c9f29da,Iac679828 into sc-dev am: 1c319ea03f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13429326

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I921eb0faef872a5611c5d156ccb6eb14cfe11da9
2021-02-10 18:16:22 +00:00
kholoud mohamed
a0e1d714f2 Expose PM#setKeepUninstalledPackages as TestAPI
This is needed to enable the new testing infrastructure to
reinstall removed packages between test runs as part of state
resetting.

Bug: 179682115
Test: confirmed that cts tests can call the API
Change-Id: Idc093fb387694096b0bf81472dd71387d3c85e85
2021-02-10 17:35:16 +00:00
Riddle Hsu
4fe90c0fe9 Fix screen size with compatibility override scale
The values in dp shouldn't be changed because the density is
already scaled.

Also add unit tests to ensure that the override scale from
CompatModePackages applies to window and surface.

Bug: 168419799
Test: atest DisplayContentTeasts#testCompatOverrideScale
Change-Id: I4b99b123d4beb33cc3d97eb07e506d8a60fcc5e3
2021-02-11 00:57:34 +08:00
Daulet Zhanguzin
af3da459b7 Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of
libcore

Bug: 154796679
Bug: 179703584
Test: Treehugger
Change-Id: I06aa9df929abb94f1d9354f57087a973be597a43
Merged-In: I06aa9df929abb94f1d9354f57087a973be597a43
(cherry picked from commit 734ab4902b)
2021-02-10 12:24:06 +00:00
Ryan Mitchell
6a2ca782d4 OverlayManager Fabricated RROs
Adds registering and unregistering of FabricatedOverlay to the OMS.
The process that creates the fabricated overlays owns it and is the
only process allowed to unregister it.

When a fabricated overlay is registered, overlay settings for it are
initialized in all users. When a fabricated overlay is unregistered,
it is disabled and removed from all users. When a new user is created,
it will be able to use the fabricated overlay as well.

On boot, fabricated overlays that are not referenced in overlay
settings will be deleted.

When the package that created the fabricated overlay is uninstalled,
its fabricated overlays are also unregistered.

Bug: 172471315
Test: atest OverlayDeviceTests
Change-Id: I0539656f4c919246b13129579b0286c08a398dc2
2021-02-09 20:13:50 -08:00
Ryan Mitchell
5c8ba79373 Query overlays using package and name
Fabricated RROs identifiers are made using package name and overlay name
combinations. In the future, packages with multiple <overlay> tags will
use overlay name to distinguish between the tags.

This changes the OMS to manage overlays through OverlayIdentifiers.
The identifier is a overlay package and name combination. The name field
is optional so overlays without an overlay name can be managed.

This change simplifies the logic required to update the set of target
packages affected by overlay changes.

Bug: 172471315
Test: OverlayDeviceTests
Test: OverlayImpl tests
Change-Id: Iac679828d7480e5c7a2c1fe4ea8b73401d8d487f
2021-02-09 20:13:47 -08:00
TreeHugger Robot
2a6c4af5c5 Merge "Add overlayPaths to ApplicationInfo" into sc-dev am: 419f4eeb6c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13429374

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I03e3d6597d8a1f329faab00b8ad018b0124bff57
2021-02-09 17:16:48 +00:00
TreeHugger Robot
419f4eeb6c Merge "Add overlayPaths to ApplicationInfo" into sc-dev 2021-02-09 17:05:34 +00:00
Mady Mellor
1ecb1ccb9a Bubble API: intent extra for bubbled activities
Apps need a better way to check if their shortcut or
pending intent is bubbled, to do this we'll add an intent
extra on the bubbled activity that they may check.

- updated doc around bubbles for how to check the extra
- applied flag on activity for intent & shortcut

Bug: 171220648
Test: atest NotificationManagerTest (see CTS CL)
Change-Id: Iba97a0058e1e4fc33c4df32a3f258ff350ad04e2
2021-02-08 14:04:18 -08:00
TreeHugger Robot
1abe8afc70 Merge "Add MEDIA_COMMUNICATION_SERVICE in Context.ServiceName" into sc-dev am: ead7d81ed4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13506507

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0166942514d1c17058af9e89eca880237602e248
2021-02-08 08:50:13 +00:00
Ryan Mitchell
da9ee1406e Add overlayPaths to ApplicationInfo
RROs have historically been APK packages. We now have the ability to
generate RROs on-the-fly. These "fabricated" RROs are not APKs.
ApplicationInfo#resourceDirs documentation states that it only contains
paths to packages. To prevent changing the behavior of resourceDirs
until we can deprecate and remove it, a new overlayPaths field has been
added to ApplicationInfo. This new field contains APK overlay paths as
well as non-APK overlay paths.

Bug: 172471315
Test: boot enable/disable overlays and examine overlays working as well
      as package manager dumpsys
Change-Id: I78c5eeef73b7d8bada61edc0f64a12a3cdc1ce16
2021-02-08 00:28:58 -08:00
TreeHugger Robot
ead7d81ed4 Merge "Add MEDIA_COMMUNICATION_SERVICE in Context.ServiceName" into sc-dev 2021-02-08 08:15:46 +00:00
Hyundo Moon
05766bfb98 Add MEDIA_COMMUNICATION_SERVICE in Context.ServiceName
Bug: 175511943
Test: Builds successfully
Change-Id: I3065e3fa57339bd81e5e5f5ade1493edd12324c5
2021-02-08 11:12:18 +09:00
TreeHugger Robot
3d9d45f5f4 Merge "enable query for shortcuts pinned by any launcher" into sc-dev am: 0d7402f8c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13500387

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iea522c4c2834961f2f13f4d95d00962fbccd83f5
2021-02-06 08:26:20 +00:00
TreeHugger Robot
0d7402f8c7 Merge "enable query for shortcuts pinned by any launcher" into sc-dev 2021-02-06 07:49:38 +00:00
Suprabh Shukla
4a88e2c61f Merge "Relax restrictions on appop protection level" into sc-dev am: e5cb2b87a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13473684

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc3d6d497630166902d1908718402bd60cc3f015
2021-02-06 01:33:53 +00:00
Suprabh Shukla
e5cb2b87a4 Merge "Relax restrictions on appop protection level" into sc-dev 2021-02-06 00:56:29 +00:00
Pinyao Ting
2a2be3cc45 enable query for shortcuts pinned by any launcher
Bug: 171393184
Test: manual
Change-Id: Id9e6ec39067d240e66348812db9eaabd26932c13
2021-02-06 00:08:33 +00:00
TreeHugger Robot
22b0ec5064 Merge "Changing IntentSender to become a listener." into sc-dev am: 1ac8aa5aa4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13481589

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I46121d6de95ecb53487ce71b9215e1258a37ebc8
2021-02-05 17:38:09 +00:00
TreeHugger Robot
1ac8aa5aa4 Merge "Changing IntentSender to become a listener." into sc-dev 2021-02-05 17:27:10 +00:00
Charles Chen
185483b2da Merge changes from topic "window_context_2.0" into sc-dev am: 582247eef0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13435721

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic993a19f7cca3f10693d8313ab8d51a6a544cc19
2021-02-05 05:46:24 +00:00
Charles Chen
582247eef0 Merge changes from topic "window_context_2.0" into sc-dev
* changes:
  Apply WindowContext 2.0 for InputMethodMenuController
  Migrate WindowContext to WindowContextListener mechanism
2021-02-05 04:53:09 +00:00
Alex Buynytskyy
6f80c512a4 Changing IntentSender to become a listener.
Listener is more secure as nobody can send a broadcast with invalid
digests.

Bug: 160605420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I5f6ec3f0fa975d274d456d11d57be61d0b245e80
2021-02-05 00:16:51 +00:00
Evgenii Stepanov
d89fe74bd9 Merge "Implement memtagMode and nativeHeapZeroInit manifest attrs." into sc-dev am: 804a79e7b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13430583

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35c8c63bbd4d5e6452e822e0d76e5f2f8df801d8
2021-02-04 20:05:24 +00:00
Evgenii Stepanov
804a79e7b0 Merge "Implement memtagMode and nativeHeapZeroInit manifest attrs." into sc-dev 2021-02-04 19:55:49 +00:00
Winson Chiu
60c73c783f Merge changes from topic "domain-verify-sc-dev" into sc-dev am: bb85ae960f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13438570

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieb1c263de3b6fd931102d4a6bfb01aa070a25ab0
2021-02-04 18:43:19 +00:00
Winson
ee612e99fe Address domain verification API comments
Changes package to pm.verify.domain, removes throwing InvalidDomainSet,
cleans up permissions, and renames DomainVerificationSet ->
DomainVerificationInfo.

Bug: 163565712
CTS-Coverage-Bug: 179382047

Test: atest com.android.server.pm.test.verify.domain

Change-Id: I5d60c227f0e529fe27c1844ada97716933a533b0
2021-02-04 10:27:01 -08:00
Winson
3c7113a401 Remove legacy IntentFilterVerificationManager
Completely deletes all the code for v1 of domain verification,
delegating everything to the new DomainVerificationService.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 171251883

Test: none, removal of effectively dead code

Change-Id: Ib222ccd46019c1c28b402c0f68466077b62871c1
2021-02-04 10:27:00 -08:00
Winson
0af8c46c2f Migrate legacy intent filter verification settings
These legacy settings need to be migrated once to the new domain
verification API, so this pulls the parsing out of the legacy classes
into a DomainVerificationLegacySettings.

This does NOT handle serializing the legacy settings. It's assumed
that migration is a one-time best effort attempt, and that dropping
the legacy settings is an acceptable fallback.

The old setting was a result of an unexplained and unintuitive user
path, set through ResolverActivity, and so it's not clear whether we
should migrate at all.

Worst case, the user can always re-do their preferences.

NOTE: This change should only be merged if merged together with the
change that removes the legacy code. It's invalid to run these
separately, as this change breaks the legacy manager class. These are
only separate to make review easier, to separate their concerns.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 171251883

Test: TODO

Change-Id: Iefde9f2cd8ab73cb5f592abc7d2163dd7d244789
2021-02-04 10:27:00 -08:00
Winson
346d2769b0 Add DomainVerificationProxyV1
Backporting the new per-domain state to the old v1 intent filter
verification agent API.

Uses a new STATE_LEGACY_FAILURE to track the failedDomains returned by
the v1 verification agent, to support per-domain state with the old API.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 170321181

Test: TBD in later change when proxies are combined

Change-Id: I2953f7e0100d425dcb806c607fdeae101803d8f4
2021-02-04 10:27:00 -08:00
Winson
0cab12964e Use new always open during PMS Activity resolution
Implements the behavior of either delegating to an approved app for
a web domain, or the browsers, removing the "always ask" and "never"
options for applications.

This also considers cross profile intents, and will allow those to be
shown if the other profile has an approved handler.

This also migrates instant app state to the new behavior. Instant apps
will now be granted completely immutable autoVerify approval, to
preserve their automatic opening behavior. The user would have to
disable the app in settings similar to an auto approved system app.

This is flagged through USE_DOMAIN_VERIFICATION_V2. For now, both v1
and v2 run entirely parallel, until the v1 APIs are removed in a
follow up.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 163564991

Test: TODO

Change-Id: I1a90f6b2b9bf2f108c5dc1b944985bc150c405a7
2021-02-04 10:27:00 -08:00
Winson
fa302df9d9 Add DomainVerificationShell and boot broadcast
Support for mutating internal state using pm shell commands.

Also wires up the boot broadcast now that the ability to verify all
unverified packages has been added.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 163565712

Test: TODO

Change-Id: I809436c6b8ff04cdc68430303859d2d7f40d9557
2021-02-04 10:27:00 -08:00
Winson
477f87d56b Add DomainVerificationManager
Contains the core SDK @SystemApi portion of the domain verification
APIs, including the state codes and get/set methods for package/user
state.

Set methods are gated by corresponding permissions, but get methods
were left available as general @SystemApi in case someone finds a use
case for them.

Adds a new exception which allows the manager to be more specific in
what caused a failure.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 163565712

Test: none, just API interfaces, will be tested with implementation

Change-Id: I86802fe4b88a8a0f63a1798944c5d8c3a3bab09b
2021-02-04 10:26:58 -08:00
Winson
2641e601cc Add domain verification API classes
Includes the request class sent to the verification agent and the 2
data classes returned by the to-be-added DomainVerificationManager.

Exempt-From-Owner-Approval: Already approved by owners on main branch

Bug: 163565712
CTS-Coverage-Bug: 179382047

Test: atest DomainVerificationCoreApiTest

Change-Id: If9f1b987f0d06c930f6c44b58af101b83947acb9
2021-02-04 10:26:57 -08:00
Adrian Roos
d8a467feae API: Suppress existing NullableCollections lints am: 6a6aa5e23d am: 4da67dd2f6 am: 98eb82a6d3 am: d68bee2746
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ida07307b3f987a651b4fb9eaf95ea5f5396da94d
2021-02-04 17:25:46 +00:00