Settings doesn't actually need to know whether an application
qualifies for a role, but only whether the default app setting should
be visible for an application. Qualification and visibility differs in
cases such as FallbackHome inside Settings which is a qualifying home
activity but should never be shown in default apps UI.
Fixes: 138636320
Test: manual
Change-Id: I216195c64a7b106e2769b11c1a998741a77fdce2
Split the single method for granting/revoking key access into two
methods.
Bug: 139091816
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyGrant
Change-Id: I495f35419a5dd1c12e18703f11dd4216a310430d
The class is abstract and marked as a SystemApi, but there's real
way to use it while compiling against the system_sdk unless the
constructor is also public.
Test: make update-api
Test: make
Bug: 138589409
Change-Id: Id1fe158ec55b299325bfbc16ab1ea33cd53fc123
ContentProviderOperation has long supported basic operations like
insert(), update(), and delete(), but it was never extended to
support the general-purpose call() method.
This change adds support for call(), including configuration of the
extras Bundle using back-references to other operations. In
addition, the output Bundle from call() can be used for
back-references from other operations.
Clean up how back-references are handled internally; we now store
either a literal value in each slot, or an explicit BackReference
instance which we can "instanceof" check to resolve when needed.
Also add withExceptionAllowed() capability, which can be used to
catch and report the failure of a single operation while allowing
any subsequent operations to proceed. Adds various nullability
annotations to reflect the behavior of all existing logic.
Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1744bf8fc1ad048aa96460d487c2867c4c81d7b3
No behavior changes. This paves the way for a future CL that is
will be adding a handful of new APIs.
Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1a6f53e79009ba88b13844a6c8ca8c09e33ee5b2
Previously this flag was in FeatureFlag for Settings, as only Settings
was using this flag. Now, we also need to use this feature flag while
migrating bugreports(from other callers such as Power buttons) to use the API.
In order to avoid flag duplication, adding it here, as Settings can
still access this feature flag.
Bug: 136548292
Test: Settings can still access this feature flag as before
Test: Builds and bugreports generated from Settings use the API flow
when the flag is turned on
Change-Id: Ia7409fc821e1438382e9b59c523ab72de519e861
Make the constructor for AttestedKeyPair public so instances of it can
be created for testing.
Bug: 138409426
Test: That it compiles
Change-Id: Iab8fbf1ad2293a91347701eb67631a8f3a3bd3fa
Specific min match is required for each country.
Test: atest PhoneNumberUtilsTest
Change-Id: I7f9e9ad824d44f2ebf8367beb6ec337e3eb3a8ad
Merged-In: I7f9e9ad824d44f2ebf8367beb6ec337e3eb3a8ad
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Bug:134246556
(cherry picked from commit d65aafc748)
Specific min match is required for each country.
Test: atest PhoneNumberUtilsTest
Change-Id: I7f9e9ad824d44f2ebf8367beb6ec337e3eb3a8ad
Merged-In: I7f9e9ad824d44f2ebf8367beb6ec337e3eb3a8ad
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Bug:134246556
Add a DevicePolicyManager method for granting (or revoking) access to a
key for a specific package.
This prevents apps from having to call KeyChain.choosePrivateKeyAlias to
get a grant for the alias.
The motivation for this change is that apps that run as a background
service do not have an Activity to pass into
KeyChain.choosePrivateKeyAlias any more as they are not allowed to
interact with users.
That creates a situation where even though the Device Policy Client
would silently grant the requesting app access to a KeyChain key, the
app still has to provide an Activity.
With this change, the DPC can pre-grant the app access to a key such
that the app does not need to call KeyChain.choosePrivateKeyAlias and
can instead just call KeyChain.getPrivateKey
BUG: 137921026
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyGrant
Change-Id: I37a75e1f802e223740eb41f055224baba9aa3b3a
Get configs using the prefix of components like gps, wifi or ims.
Add a new ims class for configs related to ims stack.
Bug: 132286782
Test: Build
Change-Id: Ib20ac3b3c55156913284268439102fba7e96dad7