We've finished all the underlying work to support adoptable storage
on FBE devices, so remove the code that was disabling it by default.
Introduce feature flag to make it easier to detect devices that
support adoptable storage.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 29923055, 25861755, 33252673, 37289651
Change-Id: I3630d690c9e66c7e41e316a4263ea2eb1e752ad3
This change documents that some system services are not available
to instant apps due to the restricted security sandbox they run in.
Also ensure that if target SDK is P WallpaperManager is null if the
backing system service cannot be looked up to be consistent with
the way other system services behave.
Test: Manual
Fixes: 70984822
Fixes: 69848394
Change-Id: I9aae884d5840c92136c7d713fac87e7732dc2642
This change adds a special flag when binding to a service to request
instant apps to be considered as well (assuming the caller has the
permission to see instant apps). This flag is scoped only for the
platform to use and is intended only for development and testing.
Specifically, we have a class of CTS tests that has tests plus service
in the same APK (accessibility, printing, autofill, any other plugin
based sub-system).
Instead of doing the tediuous work split all these into one APK with
tests and one with the services where the latter exposes a remote
interface to the former, we will be adding shell commands to the
dedicated sub-system to allow temporary binding to plugins provided
by instant apps. The goal is not validating the plugin behavious,
rather a working plugin is required to test app side funcionality.
This change adds a shell command to allow the a11y manager serivce
to bind to plugins provided by instant apps. This is required to
be able to run relevant CTS test cases in instant mode.
Test: cts-tradefed run cts-dev -m CtsAccessibilityTestCases
cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases
Bug: 70978575
Change-Id: Ifced735a9a6e495747372dd8b00fdd64933a09c7
There are currently two conceptual operations performed by PackageParser
while parsing APKs: collecting certificates and verifying them.
ApkSignatureVerifier relies on the systemDir flag to indicate whether or
not it should do a full verification of a package, but this only applies
when verifying V1 (jar signed) APKs. This distinction should be explicitly
made. This creates cleaner code and also saves time when verifying V2
signed systemDir APKs.
Bug: 64686581
Test: Builds, boots, passes
android.appsecurity.cts.PkgInstallSignatureVerificationTest.
Change-Id: Ie8a0f8cad3dd8f70da791f2f1f4516e84e2ae4d0
Make it clear that the framework versions of
Fragments and Loaders should be replaced with their
identically named versions in the Support Library.
Reference the recent work on Lifecycle as an example
of a Support Library only change that should motivate
developers to switch to the Support Library
equivalents.
Test: Reviewed new Javadoc
BUG: 70336450
Change-Id: I93151fa0a316bba824c2e55f80f7de9d30bed3c6
With this change, whenever apps start an activity in another profile
using CrossProfileApps.startMainActivity, an animation will be enforced.
For now, we are showing the "open task" animation.
We may put something fancier if we have time in P.
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test - com.android.cts.devicepolicy.CrossProfileAppsHostsideTest
Test: atest services/tests/servicestests/src/com/android/server/pm/crossprofile/CrossProfileAppsServiceImplTest.java
Bug: 70799822
Change-Id: I03525080151c6112633108419d69d64e76a511f3
This is a first step at a larger goal of moving instant app
verifications from parsing logic into install logic.
Test: manual - install v1 and v2 instant app and static lib
Test: android.appsecurity.cts.PkgInstallSignatureVerificationTest passes.
Change-Id: Iab50b91a6fb8ef014b573bb9f733d30c1aa6022f
Bug: 68860689
Provided more thorough description of static shortcut options,
integrated shortcut limits section with the "updating shortcuts"
example, added more links to narrative documentation.
Test: make ds-docs -j8
Bug: 64727234
Change-Id: I70c16082e3e85a31b501c8e313d93200d827c7f4
ag/3340390 changed untrusted value to systemDir while going through
code review, flipping the meaning of the variable, but this was not
reflected in the call site. As a result, systemDir apps are the
only ones being fully verified, which is the opposite of what we want.
Test: Builds, eventually CTS.
Change-Id: I585ac65c957f0d8db6c73f003d3a3eb2b79c8883
After discussion in API council, our new best-practices are to have
developers provide an Executor to dispatch callbacks/listeners on,
instead of the previous guidance of using a Handler.
Define Context.getMainExecutor() to easily obtain an Executor
associated with the main thread of application. This allows new
APIs to require a @NonNull Executor. Also define a new
@CallbackExecutor auto-doc annotation that explains background and
points developers at new Context method above.
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.cts.ContextTest#testMainLooper
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.cts.ContextTest#testMainExecutor
Bug: 70348426
Change-Id: I536892bcd80fcfba1bb1ddf67648c08a26d7ddd2
API to allow some classloader control over instantiation of
items from application's manifest. Unlike the first attempt
this does not encourage developers to extend Application, it simply
provides a small surface to allow control over the creation of objects
like Activities, Services, Receivers, and Providers.
Test: manual
Bug: 70623879
Change-Id: Idcab7c60f54ce3f4575ac29dcdcae321cf458bf3
PackageParser shoudln't really need to know the gory details of APK
verification, it should just get back the blobs it needs to do its
job. Move the package verification into its own class which is
*almost* exclusively responsible for verifying app signatures. This
is in preparation for adding APK signature scheme v3, which will add
yet another way to do this.
Bug: 64686581
Test: Builds 'n' boots without issue.
Test: android.appsecurity.cts.PkgInstallSignatureVerificationTest passes.
Change-Id: Ieb76b2353bd44ffdb83e7b894e5ad720d1697dc7
As part of deprecation policy enforcement for android apps, minimum
supported targetSdkVersion will be 17. Apks targeting values lower that
one set in PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION will fail to install.
PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION is currently set to 0 and
will be set to 17 in a following cl.
Installation of deprecated apks can be forced using adb install
--force-sdk flag.
More details in http://go/android-platform-deprecation-policy.
Test: tests are in complementary Cts cl.
Bug: 63926630
Change-Id: I8e55bdebf1fb2cfd951e2c6703ccc87b8d4e9a09
Add a feature flag for EMBMS
Modify validation in ServiceInfo constructor
Change return signature of some download methods to better reflect
synchronous errors
Test: run cts tests
Change-Id: I42ee748ba29ba62becf23c5487310cd1e7a397da
Behaves pretty much the same as @IntDef, but now supports "suffix"
in addition to "prefix" when matching constants.
Test: manual docs output looks sane
Bug: 70406696
Change-Id: I35064b0f9f36f1f13ccdb40302d818a004014f15
The flag is used in CTS.
Bug: 70332172
Test: cts-tradefed run commandAndExit cts-dev -m CtsPermission2TestCases
-t
android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered
Change-Id: Iba4ce1475991249980cc6a403037f4dd7bf722e5