An upcoming change will add another library that needs to be
added for backwards compatibility. Merging the tests for those into the
existing test class makes it much harder to see and the tests start to
overlap, i.e. some tests will test more than one aspect which makes
maintenance more difficult and debugging more complex.
This splits the test methods in PackageBackwardCompatibilityTest out
into separate tests for the different PackageSharedLibraryUpdater
implementations into their own classes and simply tests that the
PackageBackwardCompatibility class uses the correct implementations.
This allows each PackageSharedLibraryUpdater to provide comprehensive
tests for their own behavior without affecting tests for the other
classes.
The OrgApacheHttpLegacyUpdaterTest only runs if the
OrgApacheHttpLegacyUpdater class is on the classpath. That is done
using OptionalClassRunner which is a custom JUnit Runner that runs the
tests in a class iff a specific class is present. Otherwise, it behaves
as if the class had a single test that made an invalid assumption.
Tested by building with and without REMOVE_OAHL_FROM_BCP=true and then
running the following:
adb install -r -g out/target/product/marlin/testcases/FrameworksCoreTests/FrameworksCoreTests.apk &&
adb shell am instrument -w -e class android.content.pm.PackageBackwardCompatibilityTest,android.content.pm.AndroidTestRunnerSplitUpdaterTest,android.content.pm.OrgApacheHttpLegacyUpdaterTest,android.content.pm.RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 18027885
Test: as above
Change-Id: Idd1a343d234a57d518010c5a79030cbd7682e0c1
* changes:
Added the reply draft as an extra to the content intent
Launching notification settings correctly inline
Launching Notification animations inline
This CL will support the followings.
- installing a RRO package for framework from /product/overlay
- installing apps from /product/app
- installing priv-apps from /product/priv-app
- installing permissions from
/product/etc/[default-permissions|permissions|sysconfig]
Bug: 64195575
Test: `mm` under frameworks/base/tests/[libs|privapp]-permissions
adb sync && adb reboot
adb shell cmd package list libraries
=> confirmed com.android.test.libs.product library
adb shell cmd package dump \
com.android.framework.permission.privapp.tests.product
=> confirmed that the package is a priv-app
And I moved vendor/overlay/framework-res__auto_generated_rro.apk into
system/product/overlay/ on sailfish, and I confirmed that the RRO was
installed properly.
Change-Id: I16175933cebd9ec665d190cc5d564b5414a91827
* changes:
libandroidfw: Improve performance of AssetManager2
libandroidfw: Add ApplyStyle and SetConfiguration benchmark
Make idiomatic use of ApkAssets and AssetManager
Replace AssetManager with AssetManager2 implementation
This allows for an SyncAdapter to defer all onPerformSync calls (and the
admission check for those) until the adapter is ready to accept those
calls.
Test: atest android.content.cts.AccountAccessSameCertTest
atest android.content.cts.ContentResolverSyncTestCase
atest android.content.cts.DeferSyncTest
atest com.android.cts.content.CtsSyncAccountAccessOtherCertTestCases
Set up a user and work account and waited until their gmail
synced.
Bug: 72459220
Change-Id: I8f9ab735d64189578ccdd1c3e1d7b7c5383b8ee9
When ro.apk_verity.mode is on, full apk verification is only skipped if
the apk already has verity enabled in the file system, and if the apk
contains the Merkle tree root hash we need.
Since the configuration in the file system is duplicated from the apk
(including the offset and size of Signing Block and the Merkle tree),
in order to prevent offline attacker from changing it, we need to
measure the observed configuration and make sure it matches the kernel's
view.
Test: observed package manager's requeset to installd (only) for updated
priv apps.
Bug: 30972906
Change-Id: I33531a3f6148232b777ea8bfd02f13700649e317
•Add FLAG_STRONGBOX when the generator spec requires it.
•Throw StrongBoxUnavailableException when the request
fails due to HARDWARE_UNAVAILABLE.
•Add PackageManager.FEATURE_STRONGBOX_KEYSTORE
Test: KeyStore CTS tests under development on an emulator
Bug: 63931634
Change-Id: I42d32b22981e43e504d30e5657d21ac555c71ebe
Previously, the panel would still collapse when launching
the notification settings. We're now looking at the
newly returned result of the activity launch instead to
determine if we should collapse.
Bug: 69168591
Test: launch settings activity from notification guts, observe no collapsing
Change-Id: I414e7f4a9fd22d4f0b46437bfdb94e5c0f6cce58
Move away from using deprecated addAssetPath methods
and cache the instances of ApkAssets created.
Test: CTS passes
Change-Id: I257c72261a97e4aa802abb46dc1f44d80e1d42ad
The boot image profile is available only on userdebug and eng builds and
combines the boot classpath and system server classpath.
Also, update ArtManager API to use Executors instead of Handlers.
Test: gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496
Change-Id: Ie501947a659d644acbde04fb46157dd0c7944e81
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.
All the profile operations will now work on a specific profile name rather
than assuming a default global name.
Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.
Test: manual (dexopt apps, merge profiles, clear profiles)
gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496
Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
This feature requires a device to have at least one camera that
supports the new MOTION_TRACKING capability.
This capability represents a minimal set of features to make feature
tracking applications able to work acceptably well.
Test: Builds
Bug: 63629224
Change-Id: I776dad2b706259191ddb1570be7bb30051cc773f
Allows a uid that uploads a statsd config to additionally
register a BroadcastSubscriber with statsd. If statsd
detects an anomaly (according to the config's Alert),
statsd can inform a BroadcastSubscriber provided in the config.
The config uses a subscriberId (just an int) to identify the
BroadcastSubscriber. It then uses StatsManager.setBroadcastSubscriber
to associate that subscriberId with a given PendingIntent.
Then, when the anomaly is detected, statsd sends a broadcast
using that PendingIntent, alerting whoever was specified by
the config/setBroadcastSubscriber.
Bug: 70356901
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
Change-Id: I4d9ea9a6c8a85e61fadfd99c1513c55abbadd5e9
For now, system apps will be exempt from hidden API access checks.
Pass the appropriate flag to dexopt.
Test: manual
Bug: 64382372
Bug: 72305689
Change-Id: I5676ffa3a5ba680bf5f6bab0b62f0acf4a933097
This CL is an intermediate step to enable the use of profiles shipped in
the dex metadata files.
The preparation consist of:
- creating the current profile
- merging the profile from the dex metadata file (if present) into the
reference profile
and happens:
- after the application data directory is created, to capture system
apps.
- post-install (right before we dexopt), to capture any new code paths
Test: manual (install apps and splits, take OTA)
Bug: 30934496
Change-Id: Id36474ab629ad3ffafd24381d30e3d88ac02d576
With the addition of APK Signature Scheme v3, the platform now can
support key rotation by using the proof-of-rotation provided by the
new scheme. Create a new API which allows checking of the entire
provided history of an APK's signing certificates, not just the
current signer. This should allow for changes of APK signing
certificates without fear of losing access to resources that would
have been provided under the old signing certificate.
Change getPackageInfo(GET_SIGNATURES) to return the oldest signing
certificate in the chain so that apps which do programmatic checks,
but are not updated to use the new API, still get the same information
they would have gotten had there been no rotation.
Bug: 64686581
Test: Builds, boots.
Change-Id: I8982fd4cce60f5d85a6180d157a6e2a661b1a6d7
This makes the runtime handling of the org.apache.http.legacy library
conditional based on a build flag REMOVE_OAHL_FROM_BCP.
When REMOVE_OAHL_FROM_BCP=true:
* The framework-oahl-backward-compatibility is added to the
bootclasspath instead of org.apache.http.legacy.
* Any APK that targets pre-P has org.apache.http.legacy added to their
library list.
Otherwise:
* The org.apache.http.legacy library is added to the bootclasspath.
* Any APK that explicitly specifies that it depends on the
org.apache.http.legacy library has the library removed as the classes
are available at runtime.
Tested both cases by building with or without the build flag, flashing,
setting up, adding an account, adding a trusted place. Adding an account
failed when REMOVE_OAHL_FROM_BCP=true.
adb install -r -g out/target/product/marlin/testcases/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -w -e class android.content.pm.PackageBackwardCompatibilityTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 18027885
Bug: 72375096
Test: as above
Change-Id: Ie88fb79da76d3cbbd27eaf820c872191ecba2b17
* changes:
libandroidfw: Improve performance of AssetManager2
libandroidfw: Add ApplyStyle and SetConfiguration benchmark
Make idiomatic use of ApkAssets and AssetManager
Replace AssetManager with AssetManager2 implementation
APK Signature Scheme v3 enables APK signing key rotation by allowing
an APK to embed a proof-of-rotation structure linking past signing
certificates to the current one. This information needs to be exposed
to the system before it can be used to make authorization decisions.
Bug: 64686581
Test: Builds and boots.
Change-Id: I49961f92fcec141d73b36197147d5d8fa64c149e