Commit Graph

10366 Commits

Author SHA1 Message Date
Joanne Chung
779ea7feb3 Merge "Allow translation cts can add itself into allowlist for content capture" into sc-dev 2021-03-08 04:08:19 +00:00
Jeff Sharkey
6595eabb43 Merge "Support for a Context to "renounce" permissions." into sc-dev 2021-03-07 19:05:26 +00:00
Tim Van Patten
3c4b8d977b Merge "GameManager: Add Public API" into sc-dev 2021-03-06 07:17:14 +00:00
Tim Van Patten
7f2f873b59 GameManager: Add Public API
Add the public API to GameManager:
- getGameMode()

Bug: b/178860939
Test: atest CtsGameManagerTestCases
Test: atest GameManagerTests
Test: atest GameManagerServiceTests
Test: atest GameManagerServiceSettingsTests
Change-Id: Ie6030e4ec796c9ecf2c756f24f00e445572accda
2021-03-05 19:59:28 -07:00
Jeff Sharkey
ba2974c8a9 Support for a Context to "renounce" permissions.
Different logical components within an app may have no intention of
interacting with data or services that are protected by specific
permissions.

The new overload added in this change provides the initial mechanism
for a logical component to indicate a set of permissions that should
be treated as "renounced".  Interactions performed through the
returned Context will ideally be treated as if the renounced
permissions have not actually been granted to the application,
regardless of their actual grant status.

This is a low-risk change from a security standpoint, since it can
only reduce the set of permissions that might have been granted to
an app; it can never be used to expand the set of permissions.

Note that this change only provides an initial implementation which
only applies to local permission checks within the app; future
changes will begin wiring this up across process boundaries.

Bug: 181812281
Test: atest CtsContentTestCases:android.content.cts.ContextTest
Change-Id: I96439e5344c85300fb6a0f03e572746c3c96ee95
2021-03-05 18:51:20 -07:00
Svetoslav Ganov
e41ad67f66 Merge "Add APIs for creating an attribution context" into sc-dev 2021-03-06 00:37:44 +00:00
TreeHugger Robot
397e520f79 Merge "Shortcut integration with AppSearch (part 4)" into sc-dev 2021-03-05 23:31:59 +00:00
Pinyao Ting
945823240a Shortcut integration with AppSearch (part 4)
To prevent starving binder thread over synchrounous operation, following
changes were made in this CL:
1, Create oneway apis in aidl
2. Annotation to ensure existing api call are running in WorkerThread

Bug: 180558621
NoNonSdkCheck: ShortcutService is for internal use, not a public api.
It should have been put in block-list in the first place.
Test: no change in functionality, covered by existing unit/cts tests
Change-Id: I17ecbaa7f2da30babec9fd58af7f07d5c0594054
2021-03-05 23:31:25 +00:00
Treehugger Robot
0d7618a835 Merge "Update OWNER for team's files under content" am: 1b2163d9e8 am: 4de3cb8fae am: 393cc313f0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620579

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie3b2e9ca75dbe9d1d2ecfffe371900df011ec5be
2021-03-05 22:36:32 +00:00
Svet Ganov
232636b32e Add APIs for creating an attribution context
Test: Follow up CL (tracked in the bug below)

bug:158792096

Change-Id: Iecc9e5e52ce130df0fedee18050e2779c4e5eef3
2021-03-05 20:11:32 +00:00
Treehugger Robot
1b2163d9e8 Merge "Update OWNER for team's files under content" 2021-03-05 18:07:37 +00:00
Joanne Chung
f01f6bc59f Update OWNER for team's files under content
Update for AutofillOptions, ContentCaptureOptions, LocusId.

Bug: 177641730
Test: n/a
Change-Id: I88ed9b0e79255c42d57968882750733e414b7767
2021-03-05 12:56:53 +08:00
Jeff Chang
238ab956c1 Merge "Set documentLaunchMode to alias activity" into sc-dev 2021-03-05 02:51:24 +00:00
Winson Chiu
933bea0ee8 Merge changes I28bc7390,I2b248726,Ia7b7acff,Ia81866d2,I5b0deac6, ... into sc-dev
* changes:
  Rename to DomainVerificationUserState
  Rename to DomainVerificationInternalUserState
  Expose getDomainVerificationUserSelection as public API
  Fix setDomainVerificationLinkHandlingAllowed docs
  Rename get -> queryValidVerificationPackageNames
  Make DomainVerificationManager a final class
2021-03-04 16:57:00 +00:00
Joanne Chung
f876b91446 Allow translation cts can add itself into allowlist for content capture
The UiTranslationManager APIs need the token that report by the
content capture, we need to have a test ContentCaptureService for
translation cts to test UiTranslationManager. So we also allow
translation cts can add itself into allow list.

Bug: 179047265
Test: atest CtsContentCaptureServiceTestCases
Test: atest CtsTranslationTestCases to make sure the service can be
connected
Change-Id: I15874ce6fc68dbb5fba0a51cf74899d2dec9bae1
2021-03-04 11:18:25 +00:00
Rajeev Kumar
2c293a43a3 Merge changes I0bd9becd,I1f2967dc into sc-dev
* changes:
  Add new component usage event (2/2)
  Add new component usage event (1/2)
2021-03-04 04:32:52 +00:00
Ryan Lin
880fdaf4cf Merge "Add new application category for accessibility" into sc-dev 2021-03-04 02:18:22 +00:00
Kevin Han
e022510fc1 Add new component usage event (2/2)
Report component usage when a service is bound if the service is bound
from an external package and the binding is considered usage.

Explicitly exempt JobService bindings from this usage definition.

Bug: 175829712
Test: adb shell dumpsys usagestats <package-name>
Test: manual test
Change-Id: I0bd9becd209ddc77b55f3102e7b03c4e2269ef4f
2021-03-03 18:14:34 -08:00
Winson
0af5b335ab Rename to DomainVerificationUserState
Better reflects the fact that the map no longer contains only the
selection state, but the domain state in general for the user.

Bug: 181637637

Test: none, naming refactor

Change-Id: I28bc73906f764d83c258fa10e23f2821e9482419
2021-03-03 16:39:29 -08:00
Xin Li
1af6a12e98 Merge "Merge RQ2A.210305.007" 2021-03-03 21:41:39 +00:00
Patrick Baumann
8ee2b99d71 Merge "Parcel queriesProviders in ParsingPackageImpl" 2021-03-03 18:19:56 +00:00
TreeHugger Robot
2f74b666a3 Merge "Avoid running RegisteredServicesCache tasks on main thread" into sc-dev 2021-03-03 02:29:51 +00:00
Evan Severson
33792c94ea Merge "Update permissions OWNERS files" am: 391145ab85 am: d35d84c8fc am: 69abbcb203
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611821

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7d0c9e41b15a62c547df2ca1fb2bca37c5ab7d43
2021-03-02 22:32:49 +00:00
Evan Severson
69abbcb203 Merge "Update permissions OWNERS files" am: 391145ab85 am: d35d84c8fc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611821

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5c35ddb5368616f4fc2932d305d8ff851ddea8a1
2021-03-02 21:51:14 +00:00
Evan Severson
d35d84c8fc Merge "Update permissions OWNERS files" am: 391145ab85
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1611821

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I99f1eefce42cc8717be7c9834b685e53dec813ce
2021-03-02 21:40:58 +00:00
Alex Buynytskyy
967b81014f Merge "Remove INCREMENTAL_VERSION and add version to INCREMENTAL feature." into sc-dev 2021-03-02 21:24:41 +00:00
Jeongsik Mun
8f35d505ba Avoid running RegisteredServicesCache tasks on main thread
Since RegisteredServicesCache tasks from SyncManager and AccountManager
run on the main thread of SystemServer, It could cause draining
the main thread and end up with ANR when receiving a lot of broadcasts
or notifying changes through a listener.

This CL changes a few things to avoid running it on main thread.
1. RegisteredServicesCache uses BackgroundThread by default for
receiving broadcasts and a listener, instead of main thread.
2. AccountManager uses its own handler for a listener.

Bug: 171907687
Test: atest SyncManagerTest CtsSyncManagerTest AccountManagerServiceTest
Change-Id: I838c15b797b46fd58bb3c6ce9ee444a4737775d8
2021-03-02 21:12:27 +00:00
Winson
5333c7557a Expose getDomainVerificationUserSelection as public API
This is now visible to all apps to get the verified status of domains
which they declare. Because this is already restricted by app
visibility, opening up the API with no changes should be sufficient.

The permission requirement was also removed, since normals apps will
not have it.

This will only expose a relevant status when used with the changes at
Ib14049e397154616f84a2264167ac30659cd81c9.

Bug: 180955393

CTS-Coverage-Bug: 179382047

Change-Id: Ia7b7acffe41ac435f9bda98cd4e0ee422c8df328
2021-03-02 12:24:16 -08:00
Winson
234cda7d59 Fix setDomainVerificationLinkHandlingAllowed docs
Updated with changes to the toggle behavior.

Bug: 181100855

Test: none, docs

Change-Id: Ia81866d2c3362b092aa3e75137c9e9e1020a9527
2021-03-02 12:24:16 -08:00
Winson
2b0e2cee2e Rename get -> queryValidVerificationPackageNames
Bug: 181100855

CTS-Coverage-Bug: 179382047

Test: none, API rename

Change-Id: I5b0deac6bb06b7c70fac8960c661d84309c98a91
2021-03-02 12:24:16 -08:00
Winson
6a4df7f5e2 Make DomainVerificationManager a final class
Makes testing a little more difficult, but mirrors the other system
service classes.

Bug: 181101101

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

Change-Id: I39a3c2160943a0a6c77fe792446ed2f1407fb0e0
2021-03-02 12:24:15 -08:00
Evan Severson
391145ab85 Merge "Update permissions OWNERS files" 2021-03-02 19:46:59 +00:00
Evan Severson
13fd14252b Update permissions OWNERS files
Test: None
Change-Id: I039bf12c65b0cd509a6772d89b96821b98ff318c
2021-03-02 10:37:41 -08:00
Alex Buynytskyy
78c789d33f Remove INCREMENTAL_VERSION and add version to INCREMENTAL feature.
This is addressing the API feedback.

Bug: 181015045
Fixes: 181015045
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I3ea745a4f0f0a0d9ae90f0625dfce61a8649a76d
2021-03-02 10:26:20 -08:00
Ryan Mitchell
3381ea741e Merge "Don't use ApkAssets::GetPath for equality checks" into sc-dev 2021-03-02 18:07:06 +00:00
Ryan Mitchell
ef53843630 Don't use ApkAssets::GetPath for equality checks
With the introduction of ResourcesProviders, not all ApkAssets have
paths on disk. Theme::SetTo and various AssetManager methods use the
path to perform equality checking on ApkAssets. This equality check
will be performed on the debug string of an ApkAssets if it does not
have a path on disk. This causes ApkAssets with the same debug name
(like "<empty>") to be seen as the same ApkAssets. Rather than using
path, the pointer to the ApkAssets should be used for equality checking
since ResourcesManager caches and reuses ApkAssets when multiple
AssetManagers request the same assets.

Bug: 177101983
Test: atest CtsResourcesLoaderTests
Change-Id: I11f6a2a3a7cc8febe3f976236792f78e41cf07e6
2021-03-02 18:06:49 +00:00
Galia Peycheva
fd98c576c7 Merge changes from topic "add-runtime-blur-disabling" into sc-dev
* changes:
  Create listener for dynamic blurEnabled changes
  Make WM.LP.blurBehindRadius a setter+getter
2021-03-02 04:45:06 +00:00
Pinyao Ting
4a08dabf99 Merge "Shortcut integration with AppSearch (Part 2)" into sc-dev 2021-03-01 23:10:11 +00:00
Galia Peycheva
6e842a730c Create listener for dynamic blurEnabled changes
This CL exposes an API to let apps know when the blur has been enabled
or disabled dynamically.

This could be due to battery saving mode turned on, tunnel mode being
used, minimal post processing requested, etc.

This adds a WindowManager.addCrossWindowBlurEnabledListener, which allows
apps to add/remove a listener for blur enabled state changes. The
listeners are registered in a CrossWindowBlurListeners, which receives
updates from WindowManagerService when blurEnabled changes.
CrossWindowBlurListeners only registers a remote listener if the client
initializes it. I.e. if the app is not interested in blurs, the
CrossWindowBlurListeners won't get initialized and won't register a
remote listener.

WindowManagerService holds a RemoteCallbackList, which holds listeners
for each client process and notifies them when there are updates. If any
of the listeners' process dies, the entry is removed from the list.

Bug: 177524486
Test: m
CTS-Coverage-Bug: 179990440
Change-Id: I3fe8f2d2008171d6b069e8ee6f3b47e5b5d60cfa
2021-03-01 22:23:22 +01:00
Michael Groover
057fc812a9 Merge "Report UnsafeIntentLaunchViolation for unfiltered extras copy" into sc-dev 2021-03-01 21:15:00 +00:00
Pinyao Ting
47d1a02267 Shortcut integration with AppSearch (Part 2)
In order to move shortcuts from memory into AppSearch, we need to move
the bookkeeping states associated with ShortcutInfo into AppSearch as
well. This CL updates the schema to reflect the necessary chagnes.

Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2 ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5 ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8 ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
Change-Id: Iaafaf6b81504b3f80c05b7f4a996b1b5b6beaeb7
2021-03-01 12:56:51 -08:00
Kholoud Mohamed
76545798d7 Merge "Expose a testAPI in CrossProfileApps" into sc-dev 2021-03-01 19:37:15 +00:00
kholoud mohamed
baa7b228fa Expose a testAPI in CrossProfileApps
Exposed canConfigureInteractAcrossProfiles as
a testAPI.

Test: confirmed the API is callable in CTS tests.
Bug: 180328483
Change-Id: I7c2b5ae986ca8ce6771d814bf7a3568b9896e82f
2021-03-01 15:20:07 +00:00
Winson Chiu
6b57f8489d Merge "Add OWNERS for pm.verify.domain" am: 1736ad8bfe am: b87d41ab87 am: 472f02851f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1606753

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib249a8b692299bbe86922b17be39469de4960a33
2021-03-01 08:12:27 +00:00
Michael Groover
96a995dce0 Report UnsafeIntentLaunchViolation for unfiltered extras copy
Android 12 introduced a new StrictMode check to report an unsafe Intent
launch; initially this was intended to warn developers when a launched
Intent could potentially have originated from an external source. This
commit updates this check to also report when an Intent is being
launched with potentially unfiltered data; that is data that was
copied without sanitation / validation from a parceled Intent or
Bundle. When a violation is reported for unfiltered data the developer
should replace the #putExtras call with individual calls to #putExtra
to only include the items expected in the extras.

Bug: 181374760
Test: atest StrictModeTest
Change-Id: Id2b6baf439716367f4709d03832ceb601f9f009e
2021-02-26 18:27:16 -08:00
Evgenii Stepanov
0ab80262df Merge "Implement memtagMode and nativeHeapZeroInit manifest attrs." am: d600f5067a am: ac811c4025
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556655

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4987b360e6ca7d6f60b50c233f60db555c98d1d1
2021-02-26 21:16:44 +00:00
Evgenii Stepanov
ac811c4025 Merge "Implement memtagMode and nativeHeapZeroInit manifest attrs." am: d600f5067a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556655

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9c84f162736af927f6cac041f4200dc3ab2b8efa
2021-02-26 20:50:30 +00:00
Evgenii Stepanov
d600f5067a Merge "Implement memtagMode and nativeHeapZeroInit manifest attrs." 2021-02-26 20:11:10 +00:00
Pinyao Ting
f11257a6db Merge "Shortcut integration with AppSearch (Part 1)" into sc-dev 2021-02-26 19:25:30 +00:00
Winson Chiu
472f02851f Merge "Add OWNERS for pm.verify.domain" am: 1736ad8bfe am: b87d41ab87
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1606753

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie4dce6d50b8df36cb368519cbf1fad7c7054c7a6
2021-02-26 19:11:28 +00:00