Commit Graph

10242 Commits

Author SHA1 Message Date
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
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
Adrian Roos
d68bee2746 API: Suppress existing NullableCollections lints am: 6a6aa5e23d am: 4da67dd2f6 am: 98eb82a6d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I314b97d2677f26b0a9c09a52918df49096450aea
2021-02-04 17:09:38 +00:00
Adrian Roos
98eb82a6d3 API: Suppress existing NullableCollections lints am: 6a6aa5e23d am: 4da67dd2f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I931b4ec091173789f480ecc761044a27944c4b85
2021-02-04 16:49:00 +00:00
Adrian Roos
4da67dd2f6 API: Suppress existing NullableCollections lints am: 6a6aa5e23d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2d47151b7e26e82706f2d94a13c4067fe71fc168
2021-02-04 16:19:34 +00:00
Charles Chen
9854a1e315 Migrate WindowContext to WindowContextListener mechanism
1. Use registerWindowContextListener instead of
   addWindowTokenWithOptions
2. Clean up the logic of sending the config to the client in WindowToken
3. Add a mechanism in WMS#addWindow, when a WindowContext adds a view,
   the server side will switch to register the WindowToken for the
   WindowContext.

In this way, we won't add a WindowToken until adding the fist view.
Also, we could apply an existing window token by overriding
WindowManager.LayoutParams.token.

Bug: 159767464
Bug: 153369119
Test: atest WindowContextTests WindowContextPolicyTests
Test: atest WindowContextTest
Test: atest WindowContextListenerControllerTests

Change-Id: I2396187c445306d18101706c4521edd9cf92facf
2021-02-04 23:27:03 +08:00
Brad Ebinger
2209eb473d Merge "Define FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION feature" am: 8cb6d95803 am: a30ce7ea41 am: 5bbee4a0bb am: 36ba58f32b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564832

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb4cb26ee0f619f0296e675981d36d9bbeb2de9e
2021-02-04 01:57:14 +00:00
Brad Ebinger
36ba58f32b Merge "Define FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION feature" am: 8cb6d95803 am: a30ce7ea41 am: 5bbee4a0bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564832

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65ab2d2c40512291e34f64e6ac070fbae4d20475
2021-02-04 01:42:57 +00:00
Brad Ebinger
5bbee4a0bb Merge "Define FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION feature" am: 8cb6d95803 am: a30ce7ea41
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564832

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If16559974e91b7d231485b8e73416289f629a553
2021-02-04 01:28:37 +00:00
Suprabh Shukla
f7e44ca988 Relax restrictions on appop protection level
Added appop to the set of protection flags that can be used without
combining with a base protection of 'signature' or 'internal'.

Test: Builds, boots.

Bug: 179304245
Change-Id: Ifd7f925acdb560d966905f54603f68519311d9ad
2021-02-03 17:22:08 -08:00
Brad Ebinger
8cb6d95803 Merge "Define FEATURE_TELEPHONY_IMS_SINGLE_REGISTRATION feature" 2021-02-04 00:38:15 +00:00
Qi Wu
5e8ba3c736 Limited use key: feature flags. am: cd6c58acd8 am: 56e16a0208
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552315

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I41b4c5a3272925b4bb71fbb1d57992793d1602c7
2021-02-03 18:02:09 +00:00
Qi Wu
38893fd5a1 Limited use key: feature flags. am: e8af77951b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13461619

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icf54cb83a1f40ae8b9ebdd3a217f1f1cc17652d0
2021-02-03 10:08:38 +00:00
Qi Wu
e8af77951b Limited use key: feature flags.
Add feature flags to indicate whether KeyMint only enforce
this feature in hardware with count == 1 or enforce with
any number of the count (>=1).

Bug: b/174140443
Test: compile
Change-Id: Id9c13ee91b779164bd07ff20ae2b4c0e158fdb33
2021-02-03 04:04:06 +00:00
Evgenii Stepanov
6415a1505a Implement memtagMode and nativeHeapZeroInit manifest attrs.
memtagMode allows an app to opt in to MTE in either sync or async mode.

nativeHeapZeroInit enables automatic initialization of heap memory.

Both attributes default to off and can be specified at either
application or process level.

Bug: 135772972
Bug: 177438394
Bug: 178038272
Test: CtsTaggingHostTestCases

Change-Id: I6a481a9d2363997bf954f248d08224c79f0c2afb
2021-02-02 17:38:08 -08:00
TreeHugger Robot
7ea09c109b Merge "Move GameManager to android.app package." into sc-dev am: b23f6d71ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13443303

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5bf623120a442bb847c0143ba93a0ffd671f8349
2021-02-02 19:49:37 +00:00
Hai Zhang
f61f4fb849 Pass in split permissions to ParsingPackageUtils.
Similar to passing in display metrics. We can use
ActivityThread.currentApplication() as the context for getting
PermissionManager in system server process because it will be created
early in ActivityThread.attach() before any custom logic can run, but
it becomes a problem for apps because they can run their own logic by
overriding Application.attachBaseContext() and do things there before
ActivityThread.currentApplication() becomes non-null.

So pass in the split permissions explicitly as an external dependency
for ParsingPackageUtils, and move the getPackageArchiveInfo()
implementation from PackageManager to ApplicationPackageManager to
utilize the context there. PackageParser2 can get the split
permissions internally because it's only used in system server.

Fixes: 178155985
Test: manual
Change-Id: I8213cf752e16b08328ad1150b2639da18c5d0e83
(cherry picked from commit 7b8974d375)
2021-02-02 11:42:40 -08:00
TreeHugger Robot
b23f6d71ee Merge "Move GameManager to android.app package." into sc-dev 2021-02-02 19:36:13 +00:00
Qi Wu
cd6c58acd8 Limited use key: feature flags.
Add feature flags to indicate whether KeyMint only enforce
this feature in hardware with count == 1 or enforce with
any number of the count (>=1).

Test: compile
Change-Id: Id9c13ee91b779164bd07ff20ae2b4c0e158fdb33
Merged-In: Id9c13ee91b779164bd07ff20ae2b4c0e158fdb33
2021-02-02 18:11:41 +00:00
Peiyong Lin
d1ce559f51 Merge "Implement per-app window resizing override." into sc-dev am: 277cfb354d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13438581

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I062a81166f21b5b26e769f5b0fc6ae2c31d4f3d6
2021-02-02 16:47:41 +00:00
Peiyong Lin
277cfb354d Merge "Implement per-app window resizing override." into sc-dev 2021-02-02 16:30:40 +00:00
Zimuzo Ezeozue
510f0613b2 Merge "Add PROPERTY_MEDIA_CAPABILITIES API" into sc-dev am: dacdd6fd40
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13455410

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7c4b4c20a5ec86e4f861c41dbb3d8ff4271c9abe
2021-02-02 16:06:21 +00:00
Zimuzo Ezeozue
dacdd6fd40 Merge "Add PROPERTY_MEDIA_CAPABILITIES API" into sc-dev 2021-02-02 16:05:51 +00:00
Shashwat Razdan
faf890b03c Merge "SmartspaceManager initial implementation" into sc-dev am: fc890f1fba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13438671

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I30df7e9e64b85e8cef3fad233d3aa6cfe38005b1
2021-02-02 12:47:46 +00:00
Shashwat Razdan
fc890f1fba Merge "SmartspaceManager initial implementation" into sc-dev 2021-02-02 12:31:26 +00:00
Zim
8d616b4506 Add PROPERTY_MEDIA_CAPABILITIES API
This string allows apps add a media_capabilities.xml resource to the
AndroidManifest.xml

The media_capabilities.xml file will in turn allow apps declare the
media capabilities they support, so the OS can transcode unsupported
formats to compatible formats for the app

Note, that the hard-coded string is already in use in MediaProvider
and is covered by TranscodeTest mentioned below

Test: atest TranscodeTest
Bug: 178187121
Change-Id: I46cfaefe8fb7f0bbd14896efdee61dcc4da19783
2021-02-02 10:59:11 +00:00
Adrian Roos
139eec57fa Merge changes from topic "nullablecollection" into sc-dev am: 84199909eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13435123

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib3522e2caf51bef99e141253383bf435d3ba3e96
2021-02-02 09:58:31 +00:00