History log of /frameworks/base/core/tests/coretests/src/android/content/pm/AndroidTestBaseUpdaterTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a3b692113c8c196349399857b6659774a6ef3bea 25-Jan-2018 Paul Duffin <paulduffin@google.com> Conditionally remove android.test.base from bootclasspath

This makes the runtime handling of the android.test.base library
conditional based on a build flag REMOVE_ATB_FROM_BCP.

When REMOVE_ATB_FROM_BCP=true:
* The framework-atb-backward-compatibility is added to the
bootclasspath instead of android.test.base.
* Any APK that targets pre-P (or has a dependency on android.test.runner)
has android.test.base added to their library list.

Otherwise:
* The android.test.base library is added to the bootclasspath.
* Any APK that explicitly specifies that it depends on the
android.test.base library has the library removed as the classes
are available at runtime.

Added android.test.base to platform libraries so it can be used when
not on the bootclasspath.

Tested both cases by building with or without the build flag, flashing,
setting up, adding an account, adding a trusted place.

Also, tested that all combinations of REMOVE_ATB_FROM_BCP and
REMOVE_OAHL_FROM_BCP work.

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,android.content.pm.RemoveUnnecessaryAndroidTestBaseLibraryTest,android.content.pm.AndroidTestBaseUpdaterTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 30188076
Test: as above
Change-Id: I4b9d8a5bed6787cd334c2b13a458bbc0efc3f3b6
/frameworks/base/core/tests/coretests/src/android/content/pm/AndroidTestBaseUpdaterTest.java