* changes:
Rename to DomainVerificationUserState
Rename to DomainVerificationInternalUserState
Expose getDomainVerificationUserSelection as public API
Fix setDomainVerificationLinkHandlingAllowed docs
Rename get -> queryValidVerificationPackageNames
Make DomainVerificationManager a final class
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
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
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
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
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
This is addressing the API feedback.
Bug: 181015045
Fixes: 181015045
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I3ea745a4f0f0a0d9ae90f0625dfce61a8649a76d
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
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
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
Exposed canConfigureInteractAcrossProfiles as
a testAPI.
Test: confirmed the API is callable in CTS tests.
Bug: 180328483
Change-Id: I7c2b5ae986ca8ce6771d814bf7a3568b9896e82f
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
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
The following changes in UserManager are required for ongoing
improvements to CTS/GTS infrastructure.
- Exposed the following as testAPIs:
* isGuestUserEphemeral
* createUser
* preCreateUser
* createProfileForUser
* createRestrictedProfile
* getUsers
* getUserType
- Added permissions to the following APIs:
* CREATE_USERS for getUserName
* INTERACT_ACROSS_USERS for getProfileParent
- Added CREATE_USERS permission to the documentation of
getUsers and the APIs that call it.
Test: Confirmed that a CTS test can call these APIs
Bug: 178695365
Change-Id: Id9105db3bfefb926139715b728acedefd2a5ca3e
If the domains in each data class exceed 32 KB, serializes them using
writeBlob so that they get passed through shared memory rather than
the Binder transaction.
Bug: 177553185
Test: atest DomainVerificationCoreApiTest
Change-Id: I0dd4bd140c8b847eb604d8e42272ca5be5690731
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
Merged-In: I6a481a9d2363997bf954f248d08224c79f0c2afb
Also make them ungrantable. These permissions only exist so that
RECORD_AUDIO and CAMERA are true foreground permissions.
Test: atest CtsPermission{1,3}TestCases
Attempt to grant the permissions
Bug: 158311343
Change-Id: I383883a67acee9a0fb4ade5ca34092c29f8ac254
Can't change the enum values as they are a part of public API (and enum-zero is not a warning apparently).
Fixes: 179836890
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I4d59410ec3476298cc98fdcc9584468b1debcb41
The alias activity doesn't have the documentLaunchMode information.
So, an new activity instance was created while starting the alias
activity of a documentLaunchMode “intoExisting” activity even with
the same Uri.
This CL updates the documentLaunchMode from target activity to alias
activity.
Bug: 128526493
Test: atest ActivityStarterTests
1. Launch an intoExisting activity with data uri
2. Launch an alisa activity with data uri.
3 Check if launch the existing activity
Change-Id: I256e1db99363bd5950ebe01aeec2d37c7eba4722