As long as you are using {@link android.support.test.runner.AndroidJUnitRunner}, the test
+ * As long as you are using {@link androidx.test.runner.AndroidJUnitRunner}, the test
* runner automatically calls {@link Activity#finish()} for the {@link Activity} launched when
* the test finished. You do not need to explicitly call {@link Activity#finish()}.
*
@@ -112,7 +113,7 @@ public final class TestActivity extends Activity {
/**
* Launches {@link TestActivity} with the given initialization logic for content view.
*
- * As long as you are using {@link android.support.test.runner.AndroidJUnitRunner}, the test
+ *
As long as you are using {@link androidx.test.runner.AndroidJUnitRunner}, the test
* runner automatically calls {@link Activity#finish()} for the {@link Activity} launched when
* the test finished. You do not need to explicitly call {@link Activity#finish()}.
*
diff --git a/tests/inputmethod/src/android/view/inputmethod/cts/util/TestUtils.java b/tests/inputmethod/src/android/view/inputmethod/cts/util/TestUtils.java
index 1f86ccd888e3519ff8b5b6026498ad4caaac0cec..51fcdbb4ac2373261f3f57cc165ad9ae8b9baad1 100644
--- a/tests/inputmethod/src/android/view/inputmethod/cts/util/TestUtils.java
+++ b/tests/inputmethod/src/android/view/inputmethod/cts/util/TestUtils.java
@@ -17,8 +17,9 @@
package android.view.inputmethod.cts.util;
import android.app.Instrumentation;
+
import androidx.annotation.NonNull;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
diff --git a/tests/jank/Android.mk b/tests/jank/Android.mk
index df7aa54faccd5a2a1af6e1d95203e05ca69f45c7..2ce4a98ceb86937ed64c05834508bf90f8d25231 100644
--- a/tests/jank/Android.mk
+++ b/tests/jank/Android.mk
@@ -29,10 +29,10 @@ LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util \
- ctstestrunner \
+ compatibility-device-util-axt \
+ ctstestrunner-axt \
ub-uiautomator \
- ub-janktesthelper \
+ androidx.test.janktesthelper \
junit
LOCAL_JAVA_LIBRARIES := android.test.base.stubs
diff --git a/tests/jank/AndroidManifest.xml b/tests/jank/AndroidManifest.xml
index f7b3232f950dd215a34fef3e2b480f85f9f9b8d4..faeedab671d931525b7ed6ef307b20a746376154 100644
--- a/tests/jank/AndroidManifest.xml
+++ b/tests/jank/AndroidManifest.xml
@@ -24,7 +24,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/pdf/Android.mk b/tests/pdf/Android.mk
index c0955aa6d8a58861c3f891fca7e08468cc44dddc..49efd03d8e41b3e9a3bbee6e19cbf217c53ad5ea 100644
--- a/tests/pdf/Android.mk
+++ b/tests/pdf/Android.mk
@@ -23,10 +23,10 @@ LOCAL_MULTILIB := both
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs
LOCAL_STATIC_JAVA_LIBRARIES += \
- android-support-test \
+ androidx.test.rules \
mockito-target-minus-junit4 \
- compatibility-device-util \
- ctstestrunner \
+ compatibility-device-util-axt \
+ ctstestrunner-axt \
androidx.annotation_annotation \
junit
diff --git a/tests/pdf/AndroidManifest.xml b/tests/pdf/AndroidManifest.xml
index deb2c88c4d0f2ca1f2693298835c79f0ff142a03..2d65f1cf62e3ffe865d7e500edd3a42cbdbc5a71 100644
--- a/tests/pdf/AndroidManifest.xml
+++ b/tests/pdf/AndroidManifest.xml
@@ -25,7 +25,7 @@
-
diff --git a/tests/sample/src/android/sample/cts/SampleJUnit4DeviceTest.java b/tests/sample/src/android/sample/cts/SampleJUnit4DeviceTest.java
index c8863b3dc6b508fbe9fa163ba8c5dd43bb3fe9d4..3aa0cb022d8aa4b4cb453a72202f09895f116450 100755
--- a/tests/sample/src/android/sample/cts/SampleJUnit4DeviceTest.java
+++ b/tests/sample/src/android/sample/cts/SampleJUnit4DeviceTest.java
@@ -15,19 +15,15 @@
*/
package android.sample.cts;
+import android.sample.SampleDeviceActivity;
+
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Assert;
-import org.junit.runner.RunWith;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-
-import android.app.Activity;
-import android.sample.SampleDeviceActivity;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
-import android.test.ActivityInstrumentationTestCase2;
+import org.junit.runner.RunWith;
/**
* A simple compatibility test which tests the SharedPreferences API.
diff --git a/tests/sensor/Android.mk b/tests/sensor/Android.mk
index e636af8cb9e17790dde95c2b821e9b81c1ae14ca..4ceea0f86bda69d8d19e45296307043fa222fcbd 100644
--- a/tests/sensor/Android.mk
+++ b/tests/sensor/Android.mk
@@ -25,7 +25,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt
LOCAL_JAVA_LIBRARIES := platform-test-annotations android.test.base.stubs
@@ -79,8 +79,8 @@ LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
LOCAL_MULTILIB := both
LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util \
- ctstestrunner \
+ compatibility-device-util-axt \
+ ctstestrunner-axt \
cts-sensors-tests \
LOCAL_JNI_SHARED_LIBRARIES := libcts-sensors-ndk-jni
diff --git a/tests/sensor/AndroidManifest.xml b/tests/sensor/AndroidManifest.xml
index 0c33e0d38521917056e799f782c8ef92b9e6fc0b..48afe9c2ccfdcb8b52f7bf1317fa0a43ace6dcf2 100644
--- a/tests/sensor/AndroidManifest.xml
+++ b/tests/sensor/AndroidManifest.xml
@@ -27,7 +27,7 @@
-
-
diff --git a/tests/signature/intent-check/src/android/signature/cts/intent/IntentTest.java b/tests/signature/intent-check/src/android/signature/cts/intent/IntentTest.java
index 477c78166b6b23bec2732461c3d03b88c9fb3f6e..af5c4b937e522801bd6c78ede727e9f608aa66ec 100644
--- a/tests/signature/intent-check/src/android/signature/cts/intent/IntentTest.java
+++ b/tests/signature/intent-check/src/android/signature/cts/intent/IntentTest.java
@@ -22,12 +22,12 @@ import static android.signature.cts.CurrentApi.SYSTEM_REMOVED_API_FILE;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.signature.cts.ApiDocumentParser;
-import android.signature.cts.JDiffClassDescription;
import android.signature.cts.JDiffClassDescription.JDiffField;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.compatibility.common.util.DynamicConfigDeviceSide;
import org.junit.Assert;
diff --git a/tests/simplecpu/Android.mk b/tests/simplecpu/Android.mk
index 618a9bcadb09189bb348177d94df3cbf0ea57ea6..e6713d4e417be293e2047367613a0f8a27547788 100644
--- a/tests/simplecpu/Android.mk
+++ b/tests/simplecpu/Android.mk
@@ -21,7 +21,7 @@ LOCAL_MODULE_TAGS := tests
# Include both the 32 and 64 bit versions
LOCAL_MULTILIB := both
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt ctstestrunner-axt
LOCAL_JNI_SHARED_LIBRARIES := libctscpu_jni
diff --git a/tests/simplecpu/AndroidManifest.xml b/tests/simplecpu/AndroidManifest.xml
index 4b5febfb0e998e0467f8cb24cc402611ee5b830e..22b7dfae9d9339dbb69159511da29109005c7e18 100644
--- a/tests/simplecpu/AndroidManifest.xml
+++ b/tests/simplecpu/AndroidManifest.xml
@@ -23,7 +23,7 @@
-
diff --git a/tests/systemAppTest/test/Android.mk b/tests/systemAppTest/test/Android.mk
index e15d2597988a51e8bd6fec4b45019f8055243cea..0c9401999de0399e9fa26e77a7c2acede7eebb65 100644
--- a/tests/systemAppTest/test/Android.mk
+++ b/tests/systemAppTest/test/Android.mk
@@ -24,7 +24,7 @@ LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_PATH := $(TARGET_OUT_APPS_PRIVILEGED)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt compatibility-device-util-axt
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/accounts/Android.mk b/tests/tests/accounts/Android.mk
index d81670749f6c8e6b424696f00b1b7eb97fb39bdc..c559252734173dc7327623366bb08a20ecc76344 100644
--- a/tests/tests/accounts/Android.mk
+++ b/tests/tests/accounts/Android.mk
@@ -22,7 +22,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
- CtsAccountTestsCommon ctstestrunner platform-test-annotations
+ CtsAccountTestsCommon ctstestrunner-axt platform-test-annotations
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/tests/accounts/AndroidManifest.xml b/tests/tests/accounts/AndroidManifest.xml
index ec3d42df0adb9e50f1985399c3979360f7e96dec..a31b77aa3f81a3412867760f97ecb593b0223cb0 100644
--- a/tests/tests/accounts/AndroidManifest.xml
+++ b/tests/tests/accounts/AndroidManifest.xml
@@ -63,7 +63,7 @@
-
{
diff --git a/tests/tests/accounts/src/android/accounts/cts/AccountManagerUnaffiliatedAuthenticatorTests.java b/tests/tests/accounts/src/android/accounts/cts/AccountManagerUnaffiliatedAuthenticatorTests.java
index ebd6a13bed83ec7e17fbdcfd1df499ac6fa7d2a3..a11de75166f869d10993fe70e31dbf3c8abb3628 100644
--- a/tests/tests/accounts/src/android/accounts/cts/AccountManagerUnaffiliatedAuthenticatorTests.java
+++ b/tests/tests/accounts/src/android/accounts/cts/AccountManagerUnaffiliatedAuthenticatorTests.java
@@ -46,7 +46,7 @@ import java.util.HashMap;
* adb shell am instrument
* -e debug false -w
* -e class android.accounts.cts.AccountManagerUnaffiliatedAuthenticatorTests
- * android.accounts.cts/android.support.test.runner.AndroidJUnitRunner
+ * android.accounts.cts/androidx.test.runner.AndroidJUnitRunner
*/
public class AccountManagerUnaffiliatedAuthenticatorTests extends AndroidTestCase {
diff --git a/tests/tests/alarmclock/Android.mk b/tests/tests/alarmclock/Android.mk
index 5d5c4e4caa2bd3eba34438b6bbfa1b6ddf53cbb6..feb5792ecb7f5e183b5aa5689aa647182755a0e5 100644
--- a/tests/tests/alarmclock/Android.mk
+++ b/tests/tests/alarmclock/Android.mk
@@ -21,7 +21,7 @@ LOCAL_MODULE_TAGS := optional
# and when built explicitly put it in the data partition
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := CtsAlarmClockCommon ctstestrunner compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := CtsAlarmClockCommon ctstestrunner-axt compatibility-device-util-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/tests/alarmclock/AndroidManifest.xml b/tests/tests/alarmclock/AndroidManifest.xml
index c0193ddb7e275d19e2a6f77eb69cbabf6e18bc2c..15b47c4fd0edf0b072ef8829fb20c06e830a4f2b 100644
--- a/tests/tests/alarmclock/AndroidManifest.xml
+++ b/tests/tests/alarmclock/AndroidManifest.xml
@@ -37,7 +37,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/tests/carrierapi/src/android/carrierapi/cts/ApnDatabaseTest.java b/tests/tests/carrierapi/src/android/carrierapi/cts/ApnDatabaseTest.java
index 28afabc72a3930b7973e99d22a6e6f4dcac9bc9a..91ba3fc99367f8840c4a5bc008fcf5d432aede1d 100644
--- a/tests/tests/carrierapi/src/android/carrierapi/cts/ApnDatabaseTest.java
+++ b/tests/tests/carrierapi/src/android/carrierapi/cts/ApnDatabaseTest.java
@@ -15,6 +15,12 @@
*/
package android.carrierapi.cts;
+import static junit.framework.TestCase.assertEquals;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.pm.PackageManager;
@@ -22,10 +28,11 @@ import android.database.Cursor;
import android.database.sqlite.SQLiteException;
import android.net.Uri;
import android.provider.Telephony.Carriers;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -34,11 +41,6 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
-import static junit.framework.TestCase.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
/**
* Build, install and run the tests by running the commands below:
* make cts -j64
diff --git a/tests/tests/carrierapi/src/android/carrierapi/cts/NetworkScanApiTest.java b/tests/tests/carrierapi/src/android/carrierapi/cts/NetworkScanApiTest.java
index 77d2f82279727eeac0fc923f24a47358ce87da91..fc66dc58631ca67ea177c3c666ceafdda4e1f121 100644
--- a/tests/tests/carrierapi/src/android/carrierapi/cts/NetworkScanApiTest.java
+++ b/tests/tests/carrierapi/src/android/carrierapi/cts/NetworkScanApiTest.java
@@ -15,14 +15,19 @@
*/
package android.carrierapi.cts;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.os.Parcel;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+import android.telephony.AccessNetworkConstants;
import android.telephony.CellInfo;
import android.telephony.CellInfoGsm;
import android.telephony.CellInfoLte;
@@ -30,27 +35,21 @@ import android.telephony.CellInfoWcdma;
import android.telephony.NetworkScan;
import android.telephony.NetworkScanRequest;
import android.telephony.RadioAccessSpecifier;
-import android.telephony.AccessNetworkConstants;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyScanManager;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
/**
* Build, install and run the tests by running the commands below:
* make cts -j64
diff --git a/tests/tests/colormode/Android.mk b/tests/tests/colormode/Android.mk
index ad1a9c5b141f5c024d7115828563f3f470ec7052..1bce247588de0577ef7be8cb322e8d3cff981707 100644
--- a/tests/tests/colormode/Android.mk
+++ b/tests/tests/colormode/Android.mk
@@ -24,7 +24,7 @@ LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/colormode/AndroidManifest.xml b/tests/tests/colormode/AndroidManifest.xml
index 4c65c59944653a063787fbbe1321c6e94c5285e7..48971af0ded14d92af504b053d94ea57a5410783 100644
--- a/tests/tests/colormode/AndroidManifest.xml
+++ b/tests/tests/colormode/AndroidManifest.xml
@@ -28,7 +28,7 @@
-
-
diff --git a/tests/tests/contactsproviderwipe/src/android/provider/cts/contactsproviderwipe/ContactsContract_Wipe.java b/tests/tests/contactsproviderwipe/src/android/provider/cts/contactsproviderwipe/ContactsContract_Wipe.java
index 1981853fd917710083ea582ed3e1aefe3dcf1964..294735c1a58da9e33805aa435bf25948f995a2e8 100644
--- a/tests/tests/contactsproviderwipe/src/android/provider/cts/contactsproviderwipe/ContactsContract_Wipe.java
+++ b/tests/tests/contactsproviderwipe/src/android/provider/cts/contactsproviderwipe/ContactsContract_Wipe.java
@@ -32,11 +32,12 @@ import android.platform.test.annotations.AppModeFull;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Intents;
import android.provider.ContactsContract.ProviderStatus;
-import android.support.test.InstrumentationRegistry;
import android.test.AndroidTestCase;
import android.text.TextUtils;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
diff --git a/tests/tests/content/Android.mk b/tests/tests/content/Android.mk
index 616f898465524f9ec5e279cc06db4e30a3bd7788..4b7415d3045d293b31edf45a97006bafaeb95245 100644
--- a/tests/tests/content/Android.mk
+++ b/tests/tests/content/Android.mk
@@ -30,8 +30,8 @@ LOCAL_JNI_SHARED_LIBRARIES := libnativecursorwindow_jni libnativehelper_compat_l
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs android.test.mock
LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util \
- ctstestrunner \
+ compatibility-device-util-axt \
+ ctstestrunner-axt \
services.core \
junit \
truth-prebuilt \
@@ -40,7 +40,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
LOCAL_STATIC_ANDROID_LIBRARIES := androidx.legacy_legacy-support-v4
# Use multi-dex as the compatibility-common-util-devicesidelib dependency
-# on compatibility-device-util pushes us beyond 64k methods.
+# on compatibility-device-util-axt pushes us beyond 64k methods.
LOCAL_JACK_FLAGS := --multi-dex native
LOCAL_DX_FLAGS := --multi-dex
diff --git a/tests/tests/content/AndroidManifest.xml b/tests/tests/content/AndroidManifest.xml
index 20baa2deb09b97d29010494aaf7c075dc637032c..3f2391523c0829bf6a0f905a7c7594b1fef6d63a 100644
--- a/tests/tests/content/AndroidManifest.xml
+++ b/tests/tests/content/AndroidManifest.xml
@@ -310,7 +310,7 @@
-
-
+
diff --git a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.mk b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.mk
index 01df0b5bc10d0dc511a9a2e837a2d5ec9f97bb0a..959fab56ce71d19234586571c4e3674d926f93c1 100644
--- a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.mk
+++ b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.mk
@@ -21,8 +21,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
- ctstestrunner \
+ androidx.test.rules \
+ ctstestrunner-axt \
accountaccesslib
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/AndroidManifest.xml b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/AndroidManifest.xml
index e1fd828f78337e89df4ce8a0dd67dfc2fa95d4d1..67d20f9c92af4f89f435f5b75879bdf98f801937 100644
--- a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/AndroidManifest.xml
+++ b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/AndroidManifest.xml
@@ -35,7 +35,7 @@
diff --git a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java
index 58d8c4e424e977199f5f65296cf807900d411520..de52e738c0ae7a208cb35dec59cb0a527c1071ae 100644
--- a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java
+++ b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/src/com/android/cts/content/CtsSyncAccountAccessOtherCertTestCases.java
@@ -38,17 +38,17 @@ import android.app.ActivityManager;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.res.Configuration;
import android.content.SyncRequest;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
+import android.content.res.Configuration;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
import android.util.Log;
-import android.view.KeyEvent;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/tests/content/lib/accountaccess/Android.mk b/tests/tests/content/lib/accountaccess/Android.mk
index 2832452a1580082cea68926c9a787a144bb60dee..134eb40441d6f26f72148602c7a141709a1fec0c 100644
--- a/tests/tests/content/lib/accountaccess/Android.mk
+++ b/tests/tests/content/lib/accountaccess/Android.mk
@@ -24,6 +24,6 @@ LOCAL_MODULE := accountaccesslib
LOCAL_STATIC_JAVA_LIBRARIES := mockito-target \
ub-uiautomator \
- compatibility-device-util
+ compatibility-device-util-axt
include $(BUILD_STATIC_JAVA_LIBRARY)
\ No newline at end of file
diff --git a/tests/tests/content/lib/accountaccess/src/com.android.cts.content/Utils.java b/tests/tests/content/lib/accountaccess/src/com.android.cts.content/Utils.java
index e6b7430eb0421562aa2ddc9b356d344c5cf326c5..6a858337cfd06d1c791a1e08d1c4433a350baa53 100644
--- a/tests/tests/content/lib/accountaccess/src/com.android.cts.content/Utils.java
+++ b/tests/tests/content/lib/accountaccess/src/com.android.cts.content/Utils.java
@@ -15,11 +15,12 @@ import android.net.NetworkInfo;
import android.os.Bundle;
import android.os.Process;
import android.os.SystemClock;
-import androidx.annotation.NonNull;
-import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.UiDevice;
import android.util.Log;
+import androidx.annotation.NonNull;
+import androidx.test.InstrumentationRegistry;
+
import com.android.compatibility.common.util.SystemUtil;
import java.io.IOException;
diff --git a/tests/tests/content/src/android/content/cts/AccountAccessSameCertTest.java b/tests/tests/content/src/android/content/cts/AccountAccessSameCertTest.java
index 95af4ca18c4a0c7f01d7f6de7ecfc21781a17364..00ca747647b2528fdd7189029258f59f96699a0d 100644
--- a/tests/tests/content/src/android/content/cts/AccountAccessSameCertTest.java
+++ b/tests/tests/content/src/android/content/cts/AccountAccessSameCertTest.java
@@ -30,8 +30,9 @@ import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
import android.content.AbstractThreadedSyncAdapter;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
import com.android.cts.content.AlwaysSyncableSyncService;
import com.android.cts.content.FlakyTestRule;
diff --git a/tests/tests/content/src/android/content/cts/ClipDescriptionTest.java b/tests/tests/content/src/android/content/cts/ClipDescriptionTest.java
index bd9756e417f77c7c017581bad68678defcde55ac..35831bbeaef5bdc0a3bcc1e18666b272ef54eab3 100644
--- a/tests/tests/content/src/android/content/cts/ClipDescriptionTest.java
+++ b/tests/tests/content/src/android/content/cts/ClipDescriptionTest.java
@@ -21,10 +21,11 @@ import static org.junit.Assert.fail;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.annotation.UiThreadTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/content/src/android/content/cts/ClipboardManagerTest.java b/tests/tests/content/src/android/content/cts/ClipboardManagerTest.java
index c5a7d7dc069d4e22a95a7114596e462498014e2f..31d63ee28a0d4e754e7421893012aa685bea1daa 100644
--- a/tests/tests/content/src/android/content/cts/ClipboardManagerTest.java
+++ b/tests/tests/content/src/android/content/cts/ClipboardManagerTest.java
@@ -31,8 +31,9 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/tests/content/src/android/content/cts/DeferSyncTest.java b/tests/tests/content/src/android/content/cts/DeferSyncTest.java
index 457da109df9f43df195c8e7b0aac985025fe9b95..29a6ecf376ac719fd68dce062da3948552c72b6f 100644
--- a/tests/tests/content/src/android/content/cts/DeferSyncTest.java
+++ b/tests/tests/content/src/android/content/cts/DeferSyncTest.java
@@ -39,8 +39,9 @@ import static org.mockito.Mockito.when;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentResolver;
import android.os.Bundle;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
import com.android.cts.content.AlwaysSyncableSyncService;
import com.android.cts.content.FlakyTestRule;
diff --git a/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java b/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java
index 29c533c9aa9131f12ab9b8f6a95ebf90a447a033..cfa218984f08ece967799247c687e21adbfeb437 100644
--- a/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/ApplicationInfoTest.java
@@ -21,12 +21,9 @@ import static android.content.pm.ApplicationInfo.CATEGORY_PRODUCTIVITY;
import static android.content.pm.ApplicationInfo.CATEGORY_UNDEFINED;
import static android.content.pm.ApplicationInfo.FLAG_MULTIARCH;
import static android.content.pm.ApplicationInfo.FLAG_SUPPORTS_RTL;
-import static android.os.Process.FIRST_APPLICATION_UID;
-import static android.os.Process.LAST_APPLICATION_UID;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -38,10 +35,11 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Parcel;
import android.os.Process;
import android.os.UserHandle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.util.StringBuilderPrinter;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/content/src/android/content/pm/cts/InstallSessionParamsUnitTest.java b/tests/tests/content/src/android/content/pm/cts/InstallSessionParamsUnitTest.java
index e9c61ea18b3ee8cf7c4333e661cc48d7947ed19e..92721ef00a70c4c2299f9a6899cc9f50ab78b58c 100644
--- a/tests/tests/content/src/android/content/pm/cts/InstallSessionParamsUnitTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/InstallSessionParamsUnitTest.java
@@ -38,9 +38,10 @@ import android.content.pm.PackageInstaller.SessionInfo;
import android.content.pm.PackageInstaller.SessionParams;
import android.graphics.Bitmap;
import android.net.Uri;
-import android.support.test.InstrumentationRegistry;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
diff --git a/tests/tests/content/src/android/content/pm/cts/InstallSessionTransferTest.java b/tests/tests/content/src/android/content/pm/cts/InstallSessionTransferTest.java
index dd456685b0604d04cec6c53d33b1f5ea49fbf2dc..b93f8580582611e896baff498ea8b3e799b6e597 100644
--- a/tests/tests/content/src/android/content/pm/cts/InstallSessionTransferTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/InstallSessionTransferTest.java
@@ -33,8 +33,9 @@ import android.content.pm.PackageInstaller.SessionParams;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
import libcore.io.Streams;
diff --git a/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java b/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java
index a1845d7abbb4f1a140a42ff0a9fb411687cec9b1..6998103eb846b5c1f41cfc227168a3662f22c039 100644
--- a/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java
+++ b/tests/tests/content/src/android/content/res/cts/AssetManagerTest.java
@@ -21,25 +21,24 @@ import static org.junit.Assert.fail;
import android.content.Context;
import android.content.cts.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
import android.content.cts.util.XmlUtils;
import android.content.res.AssetFileDescriptor;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.TypedValue;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
import java.io.BufferedReader;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
diff --git a/tests/tests/content/src/android/content/res/cts/AssetManager_AssetInputStreamTest.java b/tests/tests/content/src/android/content/res/cts/AssetManager_AssetInputStreamTest.java
index 32db7899252f897dc81fc0601d0e8f300b1df37b..a94551c2e41e3db368dee42d87d3b65cf884df8a 100644
--- a/tests/tests/content/src/android/content/res/cts/AssetManager_AssetInputStreamTest.java
+++ b/tests/tests/content/src/android/content/res/cts/AssetManager_AssetInputStreamTest.java
@@ -19,18 +19,19 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
-
import android.content.res.AssetManager;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+
@SmallTest
public class AssetManager_AssetInputStreamTest {
private static final byte[] EXPECTED_BYTES = "OneTwoThreeFourFiveSixSevenEightNineTen".getBytes(
diff --git a/tests/tests/database/Android.mk b/tests/tests/database/Android.mk
index 51d18a578a5877515aea439970d9cfed4ecabbdf..8b38c082374bb9c02a94b492b564950aac02f97b 100644
--- a/tests/tests/database/Android.mk
+++ b/tests/tests/database/Android.mk
@@ -23,8 +23,8 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-common \
- ctstestrunner \
- ctstestrunner \
+ ctstestrunner-axt \
+ ctstestrunner-axt \
ub-uiautomator \
junit
diff --git a/tests/tests/database/AndroidManifest.xml b/tests/tests/database/AndroidManifest.xml
index 145ed7b221a4e3c6450f5a8c8962a729750d2659..49e2f3eee1079a3cc6a78a4230f067662501bde3 100644
--- a/tests/tests/database/AndroidManifest.xml
+++ b/tests/tests/database/AndroidManifest.xml
@@ -24,7 +24,7 @@
-
-
diff --git a/tests/tests/dpi/Android.mk b/tests/tests/dpi/Android.mk
index 960bed892bcf4841b6ebd8757b2be0616f3fb36f..a4c331529ade3386bb4579e9730e209c8fb44490 100644
--- a/tests/tests/dpi/Android.mk
+++ b/tests/tests/dpi/Android.mk
@@ -17,7 +17,7 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner junit compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt junit compatibility-device-util-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/tests/dpi/AndroidManifest.xml b/tests/tests/dpi/AndroidManifest.xml
index 32576f298fab1ab3e364b23b86f90f2af853c781..5457d92a6272d52b646066f4f6e06d29aca56869 100644
--- a/tests/tests/dpi/AndroidManifest.xml
+++ b/tests/tests/dpi/AndroidManifest.xml
@@ -27,7 +27,7 @@
android:configChanges="orientation" />
-
{
diff --git a/tests/tests/dpi2/Android.mk b/tests/tests/dpi2/Android.mk
index f36678141b417cd3a8a742b43feb4d8085a013d5..ec7b751701bdf52073f5831bd31e4e6889f8e160 100644
--- a/tests/tests/dpi2/Android.mk
+++ b/tests/tests/dpi2/Android.mk
@@ -18,7 +18,7 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# We use the DefaultManifestAttributesTest from the android.cts.dpi package.
-LOCAL_STATIC_JAVA_LIBRARIES := android.cts.dpi ctstestrunner junit
+LOCAL_STATIC_JAVA_LIBRARIES := android.cts.dpi ctstestrunner-axt junit
LOCAL_JAVA_LIBRARIES := android.test.base.stubs
diff --git a/tests/tests/dpi2/AndroidManifest.xml b/tests/tests/dpi2/AndroidManifest.xml
index f3d5be00f855739efa0ab68138027fe129f4f2b2..28b5579de01fc359147f02912b9d5da0c889fd14 100644
--- a/tests/tests/dpi2/AndroidManifest.xml
+++ b/tests/tests/dpi2/AndroidManifest.xml
@@ -27,7 +27,7 @@
properly for the screen size attributes. -->
-
-
-
+ android:name="androidx.test.runner.AndroidJUnitRunner" />
\ No newline at end of file
diff --git a/tests/tests/dynamic_linker/com/android/dynamiclinker/DynamicLinkerTest.java b/tests/tests/dynamic_linker/com/android/dynamiclinker/DynamicLinkerTest.java
index f0d7c4b3fbafbdf8b993728edd5e5c6e3cbf8210..f2e19fec186f62936166f0eca716386334dca793 100644
--- a/tests/tests/dynamic_linker/com/android/dynamiclinker/DynamicLinkerTest.java
+++ b/tests/tests/dynamic_linker/com/android/dynamiclinker/DynamicLinkerTest.java
@@ -16,8 +16,9 @@
package com.android.dynamiclinker;
+import androidx.test.InstrumentationRegistry;
+
import junit.framework.TestCase;
-import android.support.test.InstrumentationRegistry;
public class DynamicLinkerTest extends TestCase {
diff --git a/tests/tests/effect/Android.mk b/tests/tests/effect/Android.mk
index adf2baae96787ca171d8a6fa29d813022eeede85..f2fcc94c9727e17cfe3c12b7c14f1b82c4efaf8c 100644
--- a/tests/tests/effect/Android.mk
+++ b/tests/tests/effect/Android.mk
@@ -24,7 +24,7 @@ LOCAL_MODULE_TAGS := optional
# When built, explicitly put it in the data partition.
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/effect/AndroidManifest.xml b/tests/tests/effect/AndroidManifest.xml
index 81f3bbf4ce3a8bb837c21f174da805c47e99453e..5323fe6b688442147484d0dce17795e7d9e8cda7 100644
--- a/tests/tests/effect/AndroidManifest.xml
+++ b/tests/tests/effect/AndroidManifest.xml
@@ -22,7 +22,7 @@
-
diff --git a/tests/tests/externalservice/service/Android.mk b/tests/tests/externalservice/service/Android.mk
index 8563cb121bcda2d45fbe0012e183509d711e0477..400891e5ddced1f1f1e5da95af211d82e819d166 100644
--- a/tests/tests/externalservice/service/Android.mk
+++ b/tests/tests/externalservice/service/Android.mk
@@ -23,8 +23,8 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
CtsExternalServiceCommon \
- ctstestrunner \
- compatibility-device-util \
+ ctstestrunner-axt \
+ compatibility-device-util-axt \
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/graphics/Android.mk b/tests/tests/graphics/Android.mk
index 9030a13159811ee34d3c6629411c97bacadc1dd1..d3d10469e0e138e394588f86803a961e9d640a19 100644
--- a/tests/tests/graphics/Android.mk
+++ b/tests/tests/graphics/Android.mk
@@ -23,11 +23,11 @@ LOCAL_MULTILIB := both
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
LOCAL_STATIC_JAVA_LIBRARIES += \
- android-support-test \
+ androidx.test.rules \
mockito-target-minus-junit4 \
- compatibility-device-util \
- ctsdeviceutillegacy \
- ctstestrunner \
+ compatibility-device-util-axt \
+ ctsdeviceutillegacy-axt \
+ ctstestrunner-axt \
androidx.annotation_annotation \
junit
diff --git a/tests/tests/graphics/AndroidManifest.xml b/tests/tests/graphics/AndroidManifest.xml
index 76552a1ecd767efe2e7328f8186a1f90ddf6dd55..afca571568541590c5055d717d77e55125b4c643 100644
--- a/tests/tests/graphics/AndroidManifest.xml
+++ b/tests/tests/graphics/AndroidManifest.xml
@@ -56,7 +56,7 @@
-
-
-
diff --git a/tests/tests/jni/Android.mk b/tests/tests/jni/Android.mk
index f0ebe63e2d0ebf6dcc0327ff375e9597a9356830..916f55e07e897deb6e43d426fa22ea1b41066bc9 100644
--- a/tests/tests/jni/Android.mk
+++ b/tests/tests/jni/Android.mk
@@ -30,7 +30,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner android-support-test
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt androidx.test.rules
LOCAL_JNI_SHARED_LIBRARIES := \
libjni_test_dlclose \
diff --git a/tests/tests/jni/AndroidManifest.xml b/tests/tests/jni/AndroidManifest.xml
index 2724573967fd69907dc03ee2af670a610be6a237..a3f71fa5db59c3272ba8fc7dff6b29117b73b7c2 100644
--- a/tests/tests/jni/AndroidManifest.xml
+++ b/tests/tests/jni/AndroidManifest.xml
@@ -23,7 +23,7 @@
-
-
-
-
-
diff --git a/tests/tests/libcorelegacy22/Android.mk b/tests/tests/libcorelegacy22/Android.mk
index d2468c34b0a6dff1b353a4d5594f66c219c2af27..0295b898e33d4c13e3394a5a178f6fca017a090d 100644
--- a/tests/tests/libcorelegacy22/Android.mk
+++ b/tests/tests/libcorelegacy22/Android.mk
@@ -21,7 +21,7 @@ LOCAL_MODULE_TAGS := optional
# and when built explicitly put it in the data partition
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/libcorelegacy22/AndroidManifest.xml b/tests/tests/libcorelegacy22/AndroidManifest.xml
index 131613e6957da3370eda33529231bceaac23e29f..98478e44440f8b30f7feb9f866888efd828cec6c 100644
--- a/tests/tests/libcorelegacy22/AndroidManifest.xml
+++ b/tests/tests/libcorelegacy22/AndroidManifest.xml
@@ -24,7 +24,7 @@
-
-
-
-
diff --git a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
index 6301258d2d8f69a26e3e39b390319c2b2a5d6707..9e6c5993e81a91485a791c72b0fa5449a153abc7 100644
--- a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
+++ b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
@@ -23,17 +23,15 @@ import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.graphics.SurfaceTexture;
-import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.hardware.display.DisplayManager;
import android.hardware.display.VirtualDisplay;
import android.media.MediaCodec;
import android.media.MediaCodec.BufferInfo;
import android.media.MediaCodecInfo;
-import android.media.MediaCodecInfo.CodecCapabilities;
-import android.media.MediaCodecInfo.CodecProfileLevel;
import android.media.MediaCodecList;
import android.media.MediaFormat;
+import android.media.cts.R;
import android.opengl.GLES11Ext;
import android.opengl.GLES20;
import android.opengl.Matrix;
@@ -43,15 +41,12 @@ import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.Parcel;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.test.AndroidTestCase;
-import android.util.AttributeSet;
import android.util.Log;
import android.util.Size;
import android.view.Display;
import android.view.Surface;
-import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
@@ -60,9 +55,8 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TableLayout;
import android.widget.TableRow;
-import android.widget.TextView;
-import android.media.cts.R;
+import androidx.test.filters.SmallTest;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -70,7 +64,6 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.List;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
diff --git a/tests/tests/media/src/android/media/cts/HeifWriterTest.java b/tests/tests/media/src/android/media/cts/HeifWriterTest.java
index 1104f9b6ba57a18a74c8db0d4438a2c8d87b86e5..30c972eefec531dd15be09fe2e1a44fe94db462c 100644
--- a/tests/tests/media/src/android/media/cts/HeifWriterTest.java
+++ b/tests/tests/media/src/android/media/cts/HeifWriterTest.java
@@ -16,6 +16,13 @@
package android.media.cts;
+import static androidx.heifwriter.HeifWriter.INPUT_MODE_BITMAP;
+import static androidx.heifwriter.HeifWriter.INPUT_MODE_BUFFER;
+import static androidx.heifwriter.HeifWriter.INPUT_MODE_SURFACE;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
@@ -30,29 +37,15 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.os.Process;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.test.AndroidTestCase;
import android.util.Log;
-import static androidx.heifwriter.HeifWriter.INPUT_MODE_BITMAP;
-import static androidx.heifwriter.HeifWriter.INPUT_MODE_BUFFER;
-import static androidx.heifwriter.HeifWriter.INPUT_MODE_SURFACE;
-
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.heifwriter.HeifWriter;
import com.android.compatibility.common.util.MediaUtils;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
diff --git a/tests/tests/media/src/android/media/cts/MediaBrowser2Test.java b/tests/tests/media/src/android/media/cts/MediaBrowser2Test.java
index 4c10cf9fc963b518d2214f1338f5e18de6158dde..9ced5b1f3402e15463ca125e490b1be08a0c8924 100644
--- a/tests/tests/media/src/android/media/cts/MediaBrowser2Test.java
+++ b/tests/tests/media/src/android/media/cts/MediaBrowser2Test.java
@@ -39,18 +39,19 @@ import android.media.MediaLibraryService2.MediaLibrarySession;
import android.media.MediaLibraryService2.MediaLibrarySession.MediaLibrarySessionCallback;
import android.media.MediaMetadata2;
import android.media.MediaSession2;
-import android.media.SessionCommand2;
import android.media.MediaSession2.CommandButton;
-import android.media.SessionCommandGroup2;
import android.media.MediaSession2.ControllerInfo;
+import android.media.SessionCommand2;
+import android.media.SessionCommandGroup2;
import android.media.SessionToken2;
import android.os.Bundle;
import android.os.Process;
import android.os.ResultReceiver;
+
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import junit.framework.Assert;
diff --git a/tests/tests/media/src/android/media/cts/MediaCasTest.java b/tests/tests/media/src/android/media/cts/MediaCasTest.java
index 97cdcdd79fbf77626f430d5e310759157633d28c..692542debb2a6a8b7e93060826b60ab4a8c0eb04 100644
--- a/tests/tests/media/src/android/media/cts/MediaCasTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCasTest.java
@@ -26,12 +26,12 @@ import android.media.MediaCodec;
import android.media.MediaDescrambler;
import android.os.Handler;
import android.os.HandlerThread;
-import android.os.Looper;
import android.platform.test.annotations.RequiresDevice;
-import android.support.test.filters.SmallTest;
import android.test.AndroidTestCase;
import android.util.Log;
+import androidx.test.filters.SmallTest;
+
import java.lang.ArrayIndexOutOfBoundsException;
import java.nio.ByteBuffer;
import java.util.Arrays;
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecListTest.java b/tests/tests/media/src/android/media/cts/MediaCodecListTest.java
index 648cf2627b3e51f6b4a7a7e2c92f477cf6522994..311c7914912747ce6a69223dde2500553a00dff7 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecListTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecListTest.java
@@ -19,18 +19,18 @@ package android.media.cts;
import android.content.pm.PackageManager;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
-import android.media.MediaCodecInfo.CodecProfileLevel;
-import android.media.MediaCodecInfo.CodecCapabilities;
import android.media.MediaCodecInfo.AudioCapabilities;
-import android.media.MediaCodecInfo.VideoCapabilities;
+import android.media.MediaCodecInfo.CodecCapabilities;
import android.media.MediaCodecInfo.EncoderCapabilities;
+import android.media.MediaCodecInfo.VideoCapabilities;
import android.media.MediaCodecList;
import android.media.MediaFormat;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.test.AndroidTestCase;
import android.util.Log;
+import androidx.test.filters.SmallTest;
+
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecTest.java b/tests/tests/media/src/android/media/cts/MediaCodecTest.java
index a4e3a19550c8858704f6fc3beff91da30234e445..f30e0c9c854d688369c58affae9f485586eff7b3 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecTest.java
@@ -16,7 +16,6 @@
package android.media.cts;
-import android.media.cts.R;
import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
import android.media.MediaCodec;
@@ -25,23 +24,25 @@ import android.media.MediaCodec.CodecException;
import android.media.MediaCodec.CryptoInfo;
import android.media.MediaCodec.CryptoInfo.Pattern;
import android.media.MediaCodecInfo;
+import android.media.MediaCodecInfo.CodecCapabilities;
+import android.media.MediaCodecInfo.CodecProfileLevel;
import android.media.MediaCodecList;
import android.media.MediaCrypto;
import android.media.MediaDrm;
import android.media.MediaExtractor;
import android.media.MediaFormat;
-import android.media.MediaCodecInfo.CodecCapabilities;
-import android.media.MediaCodecInfo.CodecProfileLevel;
+import android.media.cts.R;
import android.opengl.GLES20;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.PersistableBundle;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.test.AndroidTestCase;
import android.util.Log;
import android.view.Surface;
+import androidx.test.filters.SmallTest;
+
import com.android.compatibility.common.util.MediaUtils;
import java.io.BufferedInputStream;
diff --git a/tests/tests/media/src/android/media/cts/MediaController2Test.java b/tests/tests/media/src/android/media/cts/MediaController2Test.java
index 721ddf7f2a9665f15201bea05c9e24b37edda038..755801dcc2dd155ad2107624c3392551c127adb1 100644
--- a/tests/tests/media/src/android/media/cts/MediaController2Test.java
+++ b/tests/tests/media/src/android/media/cts/MediaController2Test.java
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import android.app.PendingIntent;
-import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaController2;
@@ -36,11 +35,11 @@ import android.media.MediaMetadata2;
import android.media.MediaPlayerBase;
import android.media.MediaPlaylistAgent;
import android.media.MediaSession2;
-import android.media.SessionCommand2;
-import android.media.SessionCommandGroup2;
import android.media.MediaSession2.ControllerInfo;
import android.media.MediaSession2.SessionCallback;
import android.media.Rating2;
+import android.media.SessionCommand2;
+import android.media.SessionCommandGroup2;
import android.media.SessionToken2;
import android.media.VolumeProvider2;
import android.media.cts.TestServiceRegistry.SessionServiceCallback;
@@ -51,10 +50,11 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.os.Process;
import android.os.ResultReceiver;
+
import androidx.annotation.NonNull;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/tests/media/src/android/media/cts/MediaMetadata2Test.java b/tests/tests/media/src/android/media/cts/MediaMetadata2Test.java
index 231cbff9383d1308ac3a70fb21335d061008b527..7c9f5b5c88280985b3f01ea083fbf19c3f5340eb 100644
--- a/tests/tests/media/src/android/media/cts/MediaMetadata2Test.java
+++ b/tests/tests/media/src/android/media/cts/MediaMetadata2Test.java
@@ -23,11 +23,10 @@ import android.media.MediaMetadata2;
import android.media.MediaMetadata2.Builder;
import android.media.Rating2;
import android.os.Bundle;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.InstrumentationRegistry;
-import org.junit.Before;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java b/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java
index 98ce1f10ca0c050b3761aa14c7227e10e233515d..dd0fa09841d98d1f7d06971e1e67ea7938763ed0 100644
--- a/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaMetadataRetrieverTest.java
@@ -16,35 +16,33 @@
package android.media.cts;
-import android.media.cts.R;
+import static android.media.MediaMetadataRetriever.OPTION_CLOSEST;
+import static android.media.MediaMetadataRetriever.OPTION_CLOSEST_SYNC;
+import static android.media.MediaMetadataRetriever.OPTION_NEXT_SYNC;
+import static android.media.MediaMetadataRetriever.OPTION_PREVIOUS_SYNC;
import android.content.pm.PackageManager;
import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
-import android.media.MediaDataSource;
-import android.media.MediaExtractor;
-import android.media.MediaFormat;
-import android.media.MediaMetadataRetriever;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Rect;
+import android.media.MediaDataSource;
+import android.media.MediaExtractor;
+import android.media.MediaFormat;
+import android.media.MediaMetadataRetriever;
+import android.media.cts.R;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.test.AndroidTestCase;
-import android.util.Log;
-import com.android.compatibility.common.util.MediaUtils;
+import androidx.test.filters.SmallTest;
-import static android.content.pm.PackageManager.FEATURE_WATCH;
-import static android.media.MediaMetadataRetriever.OPTION_CLOSEST;
-import static android.media.MediaMetadataRetriever.OPTION_CLOSEST_SYNC;
-import static android.media.MediaMetadataRetriever.OPTION_NEXT_SYNC;
-import static android.media.MediaMetadataRetriever.OPTION_PREVIOUS_SYNC;
+import com.android.compatibility.common.util.MediaUtils;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTest.java b/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTest.java
index a4c5c4cd853876ab805dff3327b8b40a3481e34f..56a4ed6ec0f05d941d0e515275a1f735c1528eff 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTest.java
@@ -20,10 +20,11 @@ import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.LargeTest;
-import android.support.test.filters.SdkSuppress;
-import android.support.test.rule.GrantPermissionRule;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.filters.SdkSuppress;
+import androidx.test.rule.GrantPermissionRule;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTestBase.java b/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTestBase.java
index 314c051795491c8ee0ebefec4606eefad09d5b9d..d8d5cb8ef0b8c9d6f5a0342fc66cf105b3288a93 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTestBase.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayer2DrmTestBase.java
@@ -37,8 +37,6 @@ import android.media.cts.TestUtils.Monitor;
import android.net.Uri;
import android.os.PowerManager;
import android.os.SystemClock;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.rule.ActivityTestRule;
import android.util.Base64;
import android.util.Log;
import android.view.SurfaceHolder;
@@ -48,6 +46,8 @@ import androidx.annotation.CallSuper;
import androidx.media.DataSourceDesc;
import androidx.media.MediaPlayer2;
import androidx.media.MediaPlayer2.DrmInfo;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.rule.ActivityTestRule;
import org.json.JSONArray;
import org.json.JSONException;
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayer2Test.java b/tests/tests/media/src/android/media/cts/MediaPlayer2Test.java
index 2538cea416aefa6d091fa4e83053883dc513ed84..fe4f7b99deff8c47b6afec29284c945e9987e8e4 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayer2Test.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayer2Test.java
@@ -15,19 +15,13 @@
*/
package android.media.cts;
-import android.media.cts.R;
-
-import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.AssetFileDescriptor;
-import android.graphics.Rect;
import android.hardware.Camera;
import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.DataSourceDesc;
-import android.media.MediaCodec;
import android.media.Media2DataSource;
-import android.media.MediaExtractor;
import android.media.MediaFormat;
import android.media.MediaMetadataRetriever;
import android.media.MediaPlayer2;
@@ -36,23 +30,19 @@ import android.media.MediaTimestamp;
import android.media.PlaybackParams;
import android.media.SubtitleData;
import android.media.SyncParams;
-import android.media.TimedText;
import android.media.audiofx.AudioEffect;
import android.media.audiofx.Visualizer;
+import android.media.cts.R;
import android.media.cts.TestUtils.Monitor;
import android.net.Uri;
-import android.os.Bundle;
import android.os.Environment;
-import android.os.IBinder;
import android.os.PowerManager;
-import android.os.ServiceManager;
-import android.os.SystemClock;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.util.Log;
+import androidx.test.filters.SmallTest;
+
import com.android.compatibility.common.util.MediaUtils;
import java.io.BufferedReader;
@@ -61,17 +51,11 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
-import java.util.StringTokenizer;
import java.util.UUID;
import java.util.Vector;
-import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import junit.framework.AssertionFailedError;
/**
* Tests for the MediaPlayer2 API and local video/audio playback.
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayerDrmTest.java b/tests/tests/media/src/android/media/cts/MediaPlayerDrmTest.java
index c88f34d6fd23f558890fcadf88ad66511dbe2f60..08ba09deab6cfce11631e40d451798ad8ee93275 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayerDrmTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayerDrmTest.java
@@ -15,53 +15,15 @@
*/
package android.media.cts;
-import android.media.cts.R;
-
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.content.res.AssetFileDescriptor;
-import android.graphics.Rect;
-import android.hardware.Camera;
-import android.media.AudioManager;
-import android.media.MediaCodec;
-import android.media.MediaDataSource;
-import android.media.MediaExtractor;
-import android.media.MediaFormat;
-import android.media.MediaMetadataRetriever;
import android.media.MediaPlayer;
-import android.media.MediaPlayer.OnErrorListener;
-import android.media.MediaRecorder;
-import android.media.MediaTimestamp;
-import android.media.PlaybackParams;
-import android.media.SubtitleData;
-import android.media.SyncParams;
-import android.media.TimedText;
-import android.media.audiofx.AudioEffect;
-import android.media.audiofx.Visualizer;
import android.net.Uri;
import android.os.Environment;
-import android.os.IBinder;
-import android.os.PowerManager;
-import android.os.ServiceManager;
-import android.os.SystemClock;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
-import android.util.Log;
-import com.android.compatibility.common.util.MediaUtils;
+import androidx.test.filters.SmallTest;
-import java.io.BufferedReader;
import java.io.File;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.UUID;
-import java.util.Vector;
-import java.util.concurrent.CountDownLatch;
-
-import junit.framework.AssertionFailedError;
/**
* Tests for the MediaPlayer API and local video/audio playback.
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayerSurfaceTest.java b/tests/tests/media/src/android/media/cts/MediaPlayerSurfaceTest.java
index d6f62360a488ef33387eb2033deac560c1e51e68..e01e2c1b1a8c7fff5bea1c061249040eb9c28ebf 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayerSurfaceTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayerSurfaceTest.java
@@ -18,10 +18,11 @@ package android.media.cts;
import android.os.Bundle;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.test.ActivityInstrumentationTestCase2;
+import androidx.test.filters.SmallTest;
+
/**
*/
@SmallTest
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayerTest.java b/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
index 91bc3ee1beb4aafbf62e5734b336b38cb0e980c2..669a65ab745c53b9173028ef2e37dc825dabb18f 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
@@ -16,21 +16,16 @@
package android.media.cts;
import android.app.ActivityManager;
-import android.media.cts.R;
-
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.AssetFileDescriptor;
import android.graphics.Rect;
import android.hardware.Camera;
import android.media.AudioManager;
-import android.media.MediaCodec;
import android.media.MediaDataSource;
-import android.media.MediaExtractor;
import android.media.MediaFormat;
import android.media.MediaMetadataRetriever;
import android.media.MediaPlayer;
-import android.media.MediaPlayer.OnErrorListener;
import android.media.MediaPlayer.OnSeekCompleteListener;
import android.media.MediaPlayer.OnTimedTextListener;
import android.media.MediaRecorder;
@@ -41,27 +36,28 @@ import android.media.SyncParams;
import android.media.TimedText;
import android.media.audiofx.AudioEffect;
import android.media.audiofx.Visualizer;
+import android.media.cts.R;
import android.media.cts.TestUtils.Monitor;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
-import android.os.IBinder;
import android.os.PowerManager;
-import android.os.ServiceManager;
import android.os.SystemClock;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+
import com.android.compatibility.common.util.MediaUtils;
+import junit.framework.AssertionFailedError;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;
import java.util.UUID;
@@ -73,7 +69,6 @@ import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import junit.framework.AssertionFailedError;
/**
* Tests for the MediaPlayer API and local video/audio playback.
diff --git a/tests/tests/media/src/android/media/cts/MediaRecorderTest.java b/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
index f1ad46ca2f57a2983f7a8a01ea08078dfe28044a..6c712eef8c25ff341d845e0251e7b7e29b6bc65b 100644
--- a/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
@@ -15,6 +15,8 @@
*/
package android.media.cts;
+import static android.media.MediaCodecInfo.CodecProfileLevel.*;
+
import android.content.pm.PackageManager;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -22,19 +24,17 @@ import android.graphics.Paint;
import android.hardware.Camera;
import android.media.CamcorderProfile;
import android.media.EncoderCapabilities;
+import android.media.EncoderCapabilities.VideoEncoderCap;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
+import android.media.MediaCodecInfo.CodecCapabilities;
import android.media.MediaCodecList;
import android.media.MediaExtractor;
import android.media.MediaFormat;
import android.media.MediaMetadataRetriever;
import android.media.MediaRecorder;
-import android.media.EncoderCapabilities.VideoEncoderCap;
-import android.media.MediaCodecInfo.CodecCapabilities;
-import android.media.MediaCodecInfo.CodecProfileLevel;
import android.media.MediaRecorder.OnErrorListener;
import android.media.MediaRecorder.OnInfoListener;
-import android.media.MediaMetadataRetriever;
import android.media.MicrophoneInfo;
import android.opengl.GLES20;
import android.os.ConditionVariable;
@@ -42,13 +42,13 @@ import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.PersistableBundle;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.SmallTest;
import android.platform.test.annotations.RequiresDevice;
import android.test.ActivityInstrumentationTestCase2;
import android.test.UiThreadTest;
+import android.util.Log;
import android.view.Surface;
-import android.util.Log;
+import androidx.test.filters.SmallTest;
import com.android.compatibility.common.util.MediaUtils;
@@ -57,7 +57,6 @@ import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
-import java.lang.InterruptedException;
import java.lang.Runnable;
import java.util.ArrayList;
import java.util.List;
@@ -65,8 +64,6 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import static android.media.MediaCodecInfo.CodecProfileLevel.*;
-
@SmallTest
@RequiresDevice
@AppModeFull(reason = "TODO: evaluate and port to instant")
diff --git a/tests/tests/media/src/android/media/cts/MediaScannerTest.java b/tests/tests/media/src/android/media/cts/MediaScannerTest.java
index 16034e48606ab914b58168b1a0c85a969b38a8f9..89b56e8a7f159ce1c6bfaec7ce3bda630fe65484 100644
--- a/tests/tests/media/src/android/media/cts/MediaScannerTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaScannerTest.java
@@ -16,8 +16,6 @@
package android.media.cts;
-import android.media.cts.R;
-
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.ContentUris;
@@ -30,19 +28,21 @@ import android.database.Cursor;
import android.media.MediaMetadataRetriever;
import android.media.MediaScannerConnection;
import android.media.MediaScannerConnection.MediaScannerConnectionClient;
+import android.media.cts.R;
import android.mtp.MtpConstants;
import android.net.Uri;
-import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.SmallTest;
-import android.platform.test.annotations.RequiresDevice;
import android.os.Bundle;
import android.os.Environment;
import android.os.IBinder;
import android.os.SystemClock;
+import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.RequiresDevice;
import android.provider.MediaStore;
import android.test.AndroidTestCase;
import android.util.Log;
+import androidx.test.filters.SmallTest;
+
import com.android.compatibility.common.util.FileCopyHelper;
import com.android.compatibility.common.util.PollingCheck;
diff --git a/tests/tests/media/src/android/media/cts/MediaSession2Test.java b/tests/tests/media/src/android/media/cts/MediaSession2Test.java
index 1eca15605eb53d6155b5419631b96716515522d7..4e569b91fb39e109c8d3b502e6c838eda4737107 100644
--- a/tests/tests/media/src/android/media/cts/MediaSession2Test.java
+++ b/tests/tests/media/src/android/media/cts/MediaSession2Test.java
@@ -39,19 +39,20 @@ import android.media.MediaPlayerBase;
import android.media.MediaPlaylistAgent;
import android.media.MediaSession2;
import android.media.MediaSession2.Builder;
-import android.media.SessionCommand2;
import android.media.MediaSession2.CommandButton;
-import android.media.SessionCommandGroup2;
import android.media.MediaSession2.ControllerInfo;
import android.media.MediaSession2.SessionCallback;
+import android.media.SessionCommand2;
+import android.media.SessionCommandGroup2;
import android.media.VolumeProvider2;
import android.os.Bundle;
import android.os.Process;
import android.os.ResultReceiver;
import android.platform.test.annotations.AppModeFull;
+
import androidx.annotation.NonNull;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import junit.framework.Assert;
diff --git a/tests/tests/media/src/android/media/cts/MediaSession2TestBase.java b/tests/tests/media/src/android/media/cts/MediaSession2TestBase.java
index 828c659ce009340795e8fcec6add2c98ede5d0f9..047f2cd258dced8f8fd9dbba5faf015ba05ec4ec 100644
--- a/tests/tests/media/src/android/media/cts/MediaSession2TestBase.java
+++ b/tests/tests/media/src/android/media/cts/MediaSession2TestBase.java
@@ -24,17 +24,18 @@ import android.media.MediaController2;
import android.media.MediaController2.ControllerCallback;
import android.media.MediaItem2;
import android.media.MediaMetadata2;
-import android.media.SessionCommand2;
import android.media.MediaSession2.CommandButton;
+import android.media.SessionCommand2;
import android.media.SessionCommandGroup2;
import android.media.SessionToken2;
import android.os.Bundle;
import android.os.HandlerThread;
import android.os.ResultReceiver;
+
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import org.junit.AfterClass;
import org.junit.BeforeClass;
diff --git a/tests/tests/media/src/android/media/cts/MediaSession2_PermissionTest.java b/tests/tests/media/src/android/media/cts/MediaSession2_PermissionTest.java
index 3035d8bc4d9e3e416f5144f59dc5889c92bc15cb..5e69ff5b52931dffffdccfec4269633626305f5e 100644
--- a/tests/tests/media/src/android/media/cts/MediaSession2_PermissionTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaSession2_PermissionTest.java
@@ -16,28 +16,28 @@
package android.media.cts;
-import static android.media.SessionCommand2.COMMAND_CODE_SESSION_FAST_FORWARD;
+import static android.media.MediaSession2.ControllerInfo;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYBACK_PAUSE;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYBACK_PLAY;
-import static android.media.SessionCommand2.COMMAND_CODE_SESSION_REWIND;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYBACK_SEEK_TO;
-import static android.media.SessionCommand2.COMMAND_CODE_SET_VOLUME;
-import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_SKIP_NEXT_ITEM;
-import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_SKIP_PREV_ITEM;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYBACK_STOP;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_ADD_ITEM;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_REMOVE_ITEM;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_REPLACE_ITEM;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_SET_LIST;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_SET_LIST_METADATA;
+import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_SKIP_NEXT_ITEM;
+import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_SKIP_PREV_ITEM;
import static android.media.SessionCommand2.COMMAND_CODE_PLAYLIST_SKIP_TO_PLAYLIST_ITEM;
+import static android.media.SessionCommand2.COMMAND_CODE_SESSION_FAST_FORWARD;
import static android.media.SessionCommand2.COMMAND_CODE_SESSION_PLAY_FROM_MEDIA_ID;
import static android.media.SessionCommand2.COMMAND_CODE_SESSION_PLAY_FROM_SEARCH;
import static android.media.SessionCommand2.COMMAND_CODE_SESSION_PLAY_FROM_URI;
import static android.media.SessionCommand2.COMMAND_CODE_SESSION_PREPARE_FROM_MEDIA_ID;
import static android.media.SessionCommand2.COMMAND_CODE_SESSION_PREPARE_FROM_SEARCH;
import static android.media.SessionCommand2.COMMAND_CODE_SESSION_PREPARE_FROM_URI;
-import static android.media.MediaSession2.ControllerInfo;
+import static android.media.SessionCommand2.COMMAND_CODE_SESSION_REWIND;
+import static android.media.SessionCommand2.COMMAND_CODE_SET_VOLUME;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -56,8 +56,9 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Process;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/tests/media/src/android/media/cts/MediaSessionManager_MediaSession2Test.java b/tests/tests/media/src/android/media/cts/MediaSessionManager_MediaSession2Test.java
index cfce0565a65fec4711d788087bb8b4908065180f..ce9d0a63c7de4d3509b7fc727da4ae52a2443040 100644
--- a/tests/tests/media/src/android/media/cts/MediaSessionManager_MediaSession2Test.java
+++ b/tests/tests/media/src/android/media/cts/MediaSessionManager_MediaSession2Test.java
@@ -34,8 +34,9 @@ import android.media.SessionToken2;
import android.media.session.MediaSessionManager;
import android.media.session.MediaSessionManager.OnSessionTokensChangedListener;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/tests/media/src/android/media/cts/ResourceManagerTest.java b/tests/tests/media/src/android/media/cts/ResourceManagerTest.java
index dfe63a95454d972d3a9edc32c05de9837b03272b..115701b40efb05f52834819d155f49cf67077033 100644
--- a/tests/tests/media/src/android/media/cts/ResourceManagerTest.java
+++ b/tests/tests/media/src/android/media/cts/ResourceManagerTest.java
@@ -19,9 +19,10 @@ package android.media.cts;
import android.os.Bundle;
import android.platform.test.annotations.AppModeFull;
import android.platform.test.annotations.RequiresDevice;
-import android.support.test.filters.SmallTest;
import android.test.ActivityInstrumentationTestCase2;
+import androidx.test.filters.SmallTest;
+
@SmallTest
@RequiresDevice
@AppModeFull(reason = "TODO: evaluate and port to instant")
diff --git a/tests/tests/media/src/android/media/cts/SessionToken2Test.java b/tests/tests/media/src/android/media/cts/SessionToken2Test.java
index c34ced230ec89ab91b3adaf61f003785ae081f15..808fa821bb03c04a361e9983757454d9b8d8709b 100644
--- a/tests/tests/media/src/android/media/cts/SessionToken2Test.java
+++ b/tests/tests/media/src/android/media/cts/SessionToken2Test.java
@@ -22,9 +22,10 @@ import android.content.Context;
import android.media.SessionToken2;
import android.os.Process;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.InstrumentationRegistry;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Ignore;
diff --git a/tests/tests/media/src/android/media/cts/VolumeShaperTest.java b/tests/tests/media/src/android/media/cts/VolumeShaperTest.java
index 98196c8b553701d2fdf8aceed483e58e4b8cfed3..fac659ddf1fca1998c3ef5fbb1920173280d4803 100644
--- a/tests/tests/media/src/android/media/cts/VolumeShaperTest.java
+++ b/tests/tests/media/src/android/media/cts/VolumeShaperTest.java
@@ -18,8 +18,6 @@ package android.media.cts;
import static org.testng.Assert.assertThrows;
-import android.media.cts.R;
-
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -29,15 +27,16 @@ import android.media.AudioManager;
import android.media.AudioTrack;
import android.media.MediaPlayer;
import android.media.VolumeShaper;
+import android.media.cts.R;
import android.os.Parcel;
import android.os.PowerManager;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.filters.FlakyTest;
-import android.support.test.filters.LargeTest;
-import android.support.test.filters.MediumTest;
-import android.support.test.filters.SmallTest;
import android.util.Log;
+import androidx.test.filters.FlakyTest;
+import androidx.test.filters.LargeTest;
+import androidx.test.filters.SmallTest;
+
import com.android.compatibility.common.util.CtsAndroidTestCase;
import java.lang.AutoCloseable;
diff --git a/tests/tests/mediastress/Android.mk b/tests/tests/mediastress/Android.mk
index 633708f04b89f5634a84a6f5bfc9e3d67ad9cc81..a1f24eb108fe27a283e226378332397f97045951 100644
--- a/tests/tests/mediastress/Android.mk
+++ b/tests/tests/mediastress/Android.mk
@@ -26,7 +26,7 @@ LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
# Include both the 32 and 64 bit versions
LOCAL_MULTILIB := both
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt compatibility-device-util-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/tests/mediastress/AndroidManifest.xml b/tests/tests/mediastress/AndroidManifest.xml
index e4ab36c0df94bafa0503d55cd6ca3b7eb4ad8918..aae1abd5a64eecf6074570ea6c4d425eb270d631 100644
--- a/tests/tests/mediastress/AndroidManifest.xml
+++ b/tests/tests/mediastress/AndroidManifest.xml
@@ -39,7 +39,7 @@
-
-
\ No newline at end of file
diff --git a/tests/tests/nativehardware/Android.mk b/tests/tests/nativehardware/Android.mk
index 7824123651964bd90538dfa4b7ce14cb07e45b07..ce658d3e8e37423ec99675cdf1c8d26c1f06ecf2 100644
--- a/tests/tests/nativehardware/Android.mk
+++ b/tests/tests/nativehardware/Android.mk
@@ -28,7 +28,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
LOCAL_JAVA_LIBRARIES := platform-test-annotations android.test.base.stubs
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util ctstestrunner nativetesthelper
+LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt ctstestrunner-axt nativetesthelper
LOCAL_JNI_SHARED_LIBRARIES := libahardwarebuffertest
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/nativehardware/AndroidManifest.xml b/tests/tests/nativehardware/AndroidManifest.xml
index f453fa8d6a9985abbbe8fc259f3455fb620fb119..866e30a15fdd8c94b44f81a8c3f856170eb9ff27 100644
--- a/tests/tests/nativehardware/AndroidManifest.xml
+++ b/tests/tests/nativehardware/AndroidManifest.xml
@@ -24,7 +24,7 @@
-
-
diff --git a/tests/tests/ndef/Android.mk b/tests/tests/ndef/Android.mk
index c355fa01e2a4e890ac4f53c8d931d50f4665c9a0..df28c7b7daaf0663ac0215188be68fb9748018d6 100644
--- a/tests/tests/ndef/Android.mk
+++ b/tests/tests/ndef/Android.mk
@@ -24,7 +24,7 @@ LOCAL_MODULE_TAGS := optional
# When built, explicitly put it in the data partition.
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/ndef/AndroidManifest.xml b/tests/tests/ndef/AndroidManifest.xml
index dcec27d2c6b3cf6c56bbcb4353c094e6e4c5f45c..57320da231f3d1bd4f7c90df4f8d68ead110e0cd 100644
--- a/tests/tests/ndef/AndroidManifest.xml
+++ b/tests/tests/ndef/AndroidManifest.xml
@@ -23,7 +23,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/tests/tests/notificationlegacy/src/android/app/notification/legacy/cts/LegacyNotificationManagerTest.java b/tests/tests/notificationlegacy/src/android/app/notification/legacy/cts/LegacyNotificationManagerTest.java
index 69103c8a4040d5843a7ee76465517ba6a3e83e16..ce960a657fa4bb44c136f8a0cc2fc3e737085583 100644
--- a/tests/tests/notificationlegacy/src/android/app/notification/legacy/cts/LegacyNotificationManagerTest.java
+++ b/tests/tests/notificationlegacy/src/android/app/notification/legacy/cts/LegacyNotificationManagerTest.java
@@ -16,7 +16,6 @@
package android.app.notification.legacy.cts;
-import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_AMBIENT;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_LIGHTS;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_NOTIFICATION_LIST;
@@ -39,10 +38,9 @@ import android.content.Context;
import android.content.Intent;
import android.os.ParcelFileDescriptor;
import android.provider.Telephony.Threads;
-import android.service.notification.NotificationListenerService;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.Log;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
import junit.framework.Assert;
diff --git a/tests/tests/opengl/Android.mk b/tests/tests/opengl/Android.mk
index 03d6083a2ed9f9dc6589d26fb590444031900ec7..0b75847987bfd93515c725f249ef8f654560130b 100644
--- a/tests/tests/opengl/Android.mk
+++ b/tests/tests/opengl/Android.mk
@@ -29,7 +29,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_JNI_SHARED_LIBRARIES := libopengltest_jni
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt compatibility-device-util-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/tests/opengl/AndroidManifest.xml b/tests/tests/opengl/AndroidManifest.xml
index c16f25ad8e1ed7f3be1ff40709331296e6075153..7b645aa256452020a3c6526fe8c0db1cf3f44356 100644
--- a/tests/tests/opengl/AndroidManifest.xml
+++ b/tests/tests/opengl/AndroidManifest.xml
@@ -21,7 +21,7 @@
diff --git a/tests/tests/opengl/src/android/opengl/cts/ByteBufferTest.java b/tests/tests/opengl/src/android/opengl/cts/ByteBufferTest.java
index 8d596b43a52ca414fa17a130701012a58d503ec6..80aaf00d43e232090d727bb891e8d38b5ca137fc 100644
--- a/tests/tests/opengl/src/android/opengl/cts/ByteBufferTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/ByteBufferTest.java
@@ -16,14 +16,6 @@
package android.opengl.cts;
-import android.support.test.filters.SmallTest;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.BlockJUnit4ClassRunner;
-
-import java.nio.Buffer;
-import java.nio.ByteBuffer;
-
import static android.opengl.GLES30.GL_BUFFER_MAP_POINTER;
import static android.opengl.GLES30.GL_DYNAMIC_READ;
import static android.opengl.GLES30.GL_MAP_READ_BIT;
@@ -35,9 +27,19 @@ import static android.opengl.GLES30.glGenBuffers;
import static android.opengl.GLES30.glGetBufferPointerv;
import static android.opengl.GLES30.glMapBufferRange;
import static android.opengl.GLES30.glUnmapBuffer;
+
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.BlockJUnit4ClassRunner;
+
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+
/**
* Tests for functions that return a ByteBuffer.
*/
diff --git a/tests/tests/opengl/src/android/opengl/cts/CompressedTextureTest.java b/tests/tests/opengl/src/android/opengl/cts/CompressedTextureTest.java
index 137c8d46a7150c452487f1e7a85889010d826fb1..255c55d2522f41d9599bcd2688cf99fa3f3a4289 100644
--- a/tests/tests/opengl/src/android/opengl/cts/CompressedTextureTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/CompressedTextureTest.java
@@ -19,10 +19,11 @@ package android.opengl.cts;
import static org.junit.Assert.assertTrue;
import android.content.Intent;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Ignore;
import org.junit.Rule;
diff --git a/tests/tests/opengl/src/android/opengl/cts/EglConfigTest.java b/tests/tests/opengl/src/android/opengl/cts/EglConfigTest.java
index 95ed618d6ff7943cb7e1161562929d5f0f742196..3e5565eb63bc22ae31181f2c8db0920cd80694ff 100644
--- a/tests/tests/opengl/src/android/opengl/cts/EglConfigTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/EglConfigTest.java
@@ -20,10 +20,11 @@ import static org.junit.Assert.assertTrue;
import android.app.Instrumentation;
import android.content.Intent;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Rule;
diff --git a/tests/tests/opengl/src/android/opengl/cts/EglContextTest.java b/tests/tests/opengl/src/android/opengl/cts/EglContextTest.java
index 3cfd2d542a6af6de139d409165d2bca4ff6ec78c..81bbcf280ffd23d13e7d52e666960aff4ef97030 100644
--- a/tests/tests/opengl/src/android/opengl/cts/EglContextTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/EglContextTest.java
@@ -19,8 +19,9 @@ package android.opengl.cts;
import android.opengl.EGL14;
import android.opengl.EGLContext;
import android.opengl.EGLDisplay;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/opengl/src/android/opengl/cts/EglSurfacesTest.java b/tests/tests/opengl/src/android/opengl/cts/EglSurfacesTest.java
index c909eebcb9425df7012e045ed478bb978ce6a788..30300529f3b4a372aa5c26d85327c90667843841 100644
--- a/tests/tests/opengl/src/android/opengl/cts/EglSurfacesTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/EglSurfacesTest.java
@@ -16,9 +16,13 @@
package android.opengl.cts;
+import static junit.framework.Assert.fail;
+
import android.opengl.EGL14;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -27,8 +31,6 @@ import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
-import static junit.framework.Assert.fail;
-
/**
* Tests using EGL surfaces.
*/
diff --git a/tests/tests/opengl/src/android/opengl/cts/GLSurfaceViewTest.java b/tests/tests/opengl/src/android/opengl/cts/GLSurfaceViewTest.java
index 54547bd0cdc5a2c38b34daca84d16545f96b682e..e9dc4562826b0b64e4ad73f31c684e7cc57ea57e 100644
--- a/tests/tests/opengl/src/android/opengl/cts/GLSurfaceViewTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/GLSurfaceViewTest.java
@@ -17,12 +17,13 @@
package android.opengl.cts;
import android.opengl.GLSurfaceView;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.annotation.UiThreadTest;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
diff --git a/tests/tests/opengl/src/android/opengl/cts/OpenGlEsVersionTest.java b/tests/tests/opengl/src/android/opengl/cts/OpenGlEsVersionTest.java
index c599d65cf64bfc50e7297caf805bcfaabafbb89b..7ba9435a710df4a7b1e1d9ad0b8554f8a7f3ab8a 100644
--- a/tests/tests/opengl/src/android/opengl/cts/OpenGlEsVersionTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/OpenGlEsVersionTest.java
@@ -27,11 +27,12 @@ import android.content.pm.ConfigurationInfo;
import android.content.pm.FeatureInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.compatibility.common.util.CddTest;
import org.junit.Before;
diff --git a/tests/tests/opengl/src/android/opengl/cts/ParamsTest.java b/tests/tests/opengl/src/android/opengl/cts/ParamsTest.java
index 96fd81e34cecd0ceddf002df2995ec530eba8e53..56646bc49c0df3e5fdb1b3600bd33f9a66d6e70e 100644
--- a/tests/tests/opengl/src/android/opengl/cts/ParamsTest.java
+++ b/tests/tests/opengl/src/android/opengl/cts/ParamsTest.java
@@ -16,17 +16,19 @@
package android.opengl.cts;
-import android.support.test.filters.SmallTest;
+import static android.opengl.GLES20.glDeleteBuffers;
+import static android.opengl.GLES30.glGenBuffers;
+
+import static org.junit.Assert.assertTrue;
+
+import androidx.test.filters.SmallTest;
+
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;
import java.nio.IntBuffer;
-import static android.opengl.GLES20.glDeleteBuffers;
-import static android.opengl.GLES30.glGenBuffers;
-import static org.junit.Assert.assertTrue;
-
/**
* Tests for parameters validation.
*/
diff --git a/tests/tests/openglperf/Android.mk b/tests/tests/openglperf/Android.mk
index 78a25fcb8a1d1c0dac9c34954e7efff97e432358..03ba008c75026db927569840fdf4b0ee5c7ac7d6 100644
--- a/tests/tests/openglperf/Android.mk
+++ b/tests/tests/openglperf/Android.mk
@@ -24,7 +24,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
# Include both the 32 and 64 bit versions
LOCAL_MULTILIB := both
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt compatibility-device-util-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/tests/openglperf/AndroidManifest.xml b/tests/tests/openglperf/AndroidManifest.xml
index 9335a655f9b0a6fa4a74ebd7f338eb8f0f1c021c..5ccdc1e91177b63508ef7a75a7bcbda8a4ed3c16 100644
--- a/tests/tests/openglperf/AndroidManifest.xml
+++ b/tests/tests/openglperf/AndroidManifest.xml
@@ -27,13 +27,13 @@
+ android:name="androidx.test.runner.AndroidJUnitRunner" >
+ android:name="androidx.test.runner.AndroidJUnitRunner">
diff --git a/tests/tests/os/Android.mk b/tests/tests/os/Android.mk
index 9cd0b87c845b3aebbef6df051eaf37b9d4ebfab3..cc14790a0c20de7231c0e05db2477ca285466f25 100644
--- a/tests/tests/os/Android.mk
+++ b/tests/tests/os/Android.mk
@@ -25,9 +25,9 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_MULTILIB := both
LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
- compatibility-device-util \
- ctstestrunner \
+ androidx.test.rules \
+ compatibility-device-util-axt \
+ ctstestrunner-axt \
truth-prebuilt \
guava \
junit
diff --git a/tests/tests/os/AndroidManifest.xml b/tests/tests/os/AndroidManifest.xml
index 0644dd077e7c543ef24ea6505a4b9bf609e9fc2d..ef4893ee9c1f752b93f9790d632366494f40c6e6 100644
--- a/tests/tests/os/AndroidManifest.xml
+++ b/tests/tests/os/AndroidManifest.xml
@@ -139,7 +139,7 @@
-
-
diff --git a/tests/tests/packageinstaller/externalsources/Android.mk b/tests/tests/packageinstaller/externalsources/Android.mk
index b7346b5d54178760c90ba8053117c72bdb48a410..8c6c00885c43f31eadf468b10c98a31729465f12 100755
--- a/tests/tests/packageinstaller/externalsources/Android.mk
+++ b/tests/tests/packageinstaller/externalsources/Android.mk
@@ -25,9 +25,9 @@ LOCAL_PACKAGE_NAME := CtsExternalSourcesTestCases
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test \
+ androidx.test.rules \
androidx.legacy_legacy-support-v4 \
- compatibility-device-util
+ compatibility-device-util-axt
LOCAL_SDK_VERSION := current
diff --git a/tests/tests/packageinstaller/externalsources/AndroidManifest.xml b/tests/tests/packageinstaller/externalsources/AndroidManifest.xml
index 728ac7259ed1f2516b3e78954e4d75398be1faf3..23099ab9ae5fc21ffa801056dcaf861071d5c6d9 100755
--- a/tests/tests/packageinstaller/externalsources/AndroidManifest.xml
+++ b/tests/tests/packageinstaller/externalsources/AndroidManifest.xml
@@ -24,7 +24,7 @@
-
diff --git a/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesInstantAppsTest.java b/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesInstantAppsTest.java
index 7aa6a579c7a60d5abf600d864abdaa11f3bbb114..e0f19d786d493f578c05743956ad79c386d59d41 100644
--- a/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesInstantAppsTest.java
+++ b/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesInstantAppsTest.java
@@ -21,9 +21,10 @@ import android.app.AppOpsManager;
import android.content.Context;
import android.content.pm.PackageManager;
import android.platform.test.annotations.AppModeInstant;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.compatibility.common.util.AppOpsUtils;
diff --git a/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesTest.java b/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesTest.java
index a29264b1bfd7d634814b9dccb193e94385e63e18..9af6fa32a87d8084160e65fb900caeea1d293629 100644
--- a/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesTest.java
+++ b/tests/tests/packageinstaller/externalsources/src/android/packageinstaller/externalsources/cts/ExternalSourcesTest.java
@@ -21,11 +21,12 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.platform.test.annotations.AppModeFull;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
diff --git a/tests/tests/permission/Android.mk b/tests/tests/permission/Android.mk
index 2075137881e549d980d1247bb4de28f4df052c99..1edd776aba15845e3aa0e5cfa195d7b4bf2a03db 100644
--- a/tests/tests/permission/Android.mk
+++ b/tests/tests/permission/Android.mk
@@ -30,10 +30,10 @@ LOCAL_MULTILIB := both
LOCAL_JAVA_LIBRARIES := telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner \
+ ctstestrunner-axt \
guava \
android-ex-camera2 \
- compatibility-device-util
+ compatibility-device-util-axt
LOCAL_JNI_SHARED_LIBRARIES := libctspermission_jni libnativehelper_compat_libc++
diff --git a/tests/tests/permission/AndroidManifest.xml b/tests/tests/permission/AndroidManifest.xml
index 118aeb5b6a33702dee43cc3b43178218db596eef..e6d7a0e518762020e7fc08a3891739e46c3b23e6 100644
--- a/tests/tests/permission/AndroidManifest.xml
+++ b/tests/tests/permission/AndroidManifest.xml
@@ -64,7 +64,7 @@
package. That runner cannot be added to this package either, since it
relies on hidden APIs.
-->
-
-
-
-
-
diff --git a/tests/tests/print/printTestUtilLib/Android.mk b/tests/tests/print/printTestUtilLib/Android.mk
index 358861ba72841f18b994787f6a0132e90b48eef0..49c4791dc11f3ea4e7ecd985897cf3ba429a2504 100644
--- a/tests/tests/print/printTestUtilLib/Android.mk
+++ b/tests/tests/print/printTestUtilLib/Android.mk
@@ -22,7 +22,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := print-test-util-lib
-LOCAL_STATIC_JAVA_LIBRARIES := mockito-target-minus-junit4 ctstestrunner ub-uiautomator compatibility-device-util android-support-test
+LOCAL_STATIC_JAVA_LIBRARIES := mockito-target-minus-junit4 ctstestrunner-axt ub-uiautomator compatibility-device-util-axt androidx.test.rules
LOCAL_SDK_VERSION := test_current
diff --git a/tests/tests/print/printTestUtilLib/src/android/print/test/BasePrintTest.java b/tests/tests/print/printTestUtilLib/src/android/print/test/BasePrintTest.java
index 5c40dfccf4a148af3e316be0aebd31dc4cc6f787..f4a50d3b4ee6557ee22f39fadf69177cbfc612cf 100755
--- a/tests/tests/print/printTestUtilLib/src/android/print/test/BasePrintTest.java
+++ b/tests/tests/print/printTestUtilLib/src/android/print/test/BasePrintTest.java
@@ -60,7 +60,6 @@ import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.CustomPrinterIconCallback;
import android.printservice.PrintJob;
import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
@@ -71,6 +70,7 @@ import android.util.SparseArray;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.test.InstrumentationRegistry;
import com.android.compatibility.common.util.SystemUtil;
diff --git a/tests/tests/print/src/android/print/cts/ClassParametersTest.java b/tests/tests/print/src/android/print/cts/ClassParametersTest.java
index a5e5d49839bbe66ac8c42ce6bf7bb1c45ce2b468..47d3f8d221d8f272ff245dde331a7b917730f603 100644
--- a/tests/tests/print/src/android/print/cts/ClassParametersTest.java
+++ b/tests/tests/print/src/android/print/cts/ClassParametersTest.java
@@ -26,7 +26,8 @@ import android.print.PrintAttributes;
import android.print.PrintAttributes.MediaSize;
import android.print.PrintAttributes.Resolution;
import android.print.PrintDocumentInfo;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/cts/CustomPrintOptionsTest.java b/tests/tests/print/src/android/print/cts/CustomPrintOptionsTest.java
index 0f061f7a3df6a58223e61a8b3577012c9240e3ab..60c6210acd532c37e5fe683f95b8383c7718c2e3 100644
--- a/tests/tests/print/src/android/print/cts/CustomPrintOptionsTest.java
+++ b/tests/tests/print/src/android/print/cts/CustomPrintOptionsTest.java
@@ -40,13 +40,14 @@ import android.print.test.services.PrintServiceCallbacks;
import android.print.test.services.PrinterDiscoverySessionCallbacks;
import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.support.test.uiautomator.UiSelector;
import android.util.Log;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/cts/InterfaceForAppsTest.java b/tests/tests/print/src/android/print/cts/InterfaceForAppsTest.java
index 8ec44fe71cfcc0e3a349ffc6ec83e8ffcc706bff..6254048c2779db50aa62c52547ceb6df6e94403e 100644
--- a/tests/tests/print/src/android/print/cts/InterfaceForAppsTest.java
+++ b/tests/tests/print/src/android/print/cts/InterfaceForAppsTest.java
@@ -37,10 +37,10 @@ import android.print.test.services.PrintServiceCallbacks;
import android.print.test.services.PrinterDiscoverySessionCallbacks;
import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import androidx.annotation.NonNull;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/tests/print/src/android/print/cts/PageRangeAdjustmentTest.java b/tests/tests/print/src/android/print/cts/PageRangeAdjustmentTest.java
index c1abafc285377b74c40928dccc28c86fd619fcef..4a9e7af40f491cbd691a831653bcf65b8a115029 100644
--- a/tests/tests/print/src/android/print/cts/PageRangeAdjustmentTest.java
+++ b/tests/tests/print/src/android/print/cts/PageRangeAdjustmentTest.java
@@ -44,7 +44,8 @@ import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.PrintJob;
import android.printservice.PrintService;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/tests/print/src/android/print/cts/PrintAttributesTest.java b/tests/tests/print/src/android/print/cts/PrintAttributesTest.java
index 7661ff9a4cb0b92bbe04c0df7ba73afd9e38a930..eaf5991420a86ee8f0e3e1f55e9a46c94dd72650 100644
--- a/tests/tests/print/src/android/print/cts/PrintAttributesTest.java
+++ b/tests/tests/print/src/android/print/cts/PrintAttributesTest.java
@@ -38,9 +38,10 @@ import android.print.test.services.PrinterDiscoverySessionCallbacks;
import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.PrintJob;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/cts/PrintDocumentAdapterContractTest.java b/tests/tests/print/src/android/print/cts/PrintDocumentAdapterContractTest.java
index 706f9712ce49e98daa0e4dfe36a0da4d2392846f..23ae620a3fdb156d0dc26dc9f91926ee050e8421 100644
--- a/tests/tests/print/src/android/print/cts/PrintDocumentAdapterContractTest.java
+++ b/tests/tests/print/src/android/print/cts/PrintDocumentAdapterContractTest.java
@@ -44,9 +44,10 @@ import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.PrintJob;
import android.printservice.PrintService;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/cts/PrintDocumentInfoTest.java b/tests/tests/print/src/android/print/cts/PrintDocumentInfoTest.java
index 63e83e32d557d33785e8b3ca2a56cb614845120b..298d48f5b4ef32429f7dc16fbf4ae737421e7ced 100644
--- a/tests/tests/print/src/android/print/cts/PrintDocumentInfoTest.java
+++ b/tests/tests/print/src/android/print/cts/PrintDocumentInfoTest.java
@@ -42,7 +42,8 @@ import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.PrintJob;
import android.printservice.PrintService;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/tests/print/src/android/print/cts/PrintJobTest.java b/tests/tests/print/src/android/print/cts/PrintJobTest.java
index 2ab52b3f249f7d8ec0c0a7c9e70e64b00374616a..145b8353f6e4d3d01e373f20e8037283fbc60493 100644
--- a/tests/tests/print/src/android/print/cts/PrintJobTest.java
+++ b/tests/tests/print/src/android/print/cts/PrintJobTest.java
@@ -43,7 +43,8 @@ import android.print.test.services.PrinterDiscoverySessionCallbacks;
import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.PrintJob;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/tests/print/src/android/print/cts/PrintServicesTest.java b/tests/tests/print/src/android/print/cts/PrintServicesTest.java
index b5a23e218c60367150a6f854a276fd6f3cab82c8..53c72ee3ece4c0c05ea4147f7cf5af52561514b6 100644
--- a/tests/tests/print/src/android/print/cts/PrintServicesTest.java
+++ b/tests/tests/print/src/android/print/cts/PrintServicesTest.java
@@ -59,11 +59,12 @@ import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.CustomPrinterIconCallback;
import android.printservice.PrintJob;
import android.printservice.PrintService;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiSelector;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/cts/PrinterCapabilitiesTest.java b/tests/tests/print/src/android/print/cts/PrinterCapabilitiesTest.java
index 39549482f9c0e06b55adc11f37c10ed24c77d0e8..433b32d481783a875bd8a25f1fd2f1df7240e047 100644
--- a/tests/tests/print/src/android/print/cts/PrinterCapabilitiesTest.java
+++ b/tests/tests/print/src/android/print/cts/PrinterCapabilitiesTest.java
@@ -40,7 +40,8 @@ import android.print.test.services.PrintServiceCallbacks;
import android.print.test.services.PrinterDiscoverySessionCallbacks;
import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/cts/PrinterDiscoverySessionLifecycleTest.java b/tests/tests/print/src/android/print/cts/PrinterDiscoverySessionLifecycleTest.java
index 2531f80ab65112b4f373236daa77ebe84983d61f..5580cdae8bc08df200d0c54010b80e7f8871f1d5 100644
--- a/tests/tests/print/src/android/print/cts/PrinterDiscoverySessionLifecycleTest.java
+++ b/tests/tests/print/src/android/print/cts/PrinterDiscoverySessionLifecycleTest.java
@@ -41,11 +41,12 @@ import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
import android.printservice.PrintJob;
import android.printservice.PrinterDiscoverySession;
-import androidx.annotation.NonNull;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiSelector;
+import androidx.annotation.NonNull;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/cts/PrinterInfoTest.java b/tests/tests/print/src/android/print/cts/PrinterInfoTest.java
index 6a65e006a6455f55846a4b0d2c3796ab5098de41..6e67dee478c18513c1cc964a83f0462660bad635 100644
--- a/tests/tests/print/src/android/print/cts/PrinterInfoTest.java
+++ b/tests/tests/print/src/android/print/cts/PrinterInfoTest.java
@@ -33,11 +33,12 @@ import android.print.test.services.PrintServiceCallbacks;
import android.print.test.services.PrinterDiscoverySessionCallbacks;
import android.print.test.services.SecondPrintService;
import android.print.test.services.StubbablePrinterDiscoverySession;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiSelector;
import android.text.TextUtils;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/print/src/android/print/pdf/cts/PrintedPdfDocumentTest.java b/tests/tests/print/src/android/print/pdf/cts/PrintedPdfDocumentTest.java
index 4c2b36977e5ea34fde6c6cb9153ad9cc4fc8c9f0..d758439358a9d0d575faf81b65068f24c95ae4f6 100644
--- a/tests/tests/print/src/android/print/pdf/cts/PrintedPdfDocumentTest.java
+++ b/tests/tests/print/src/android/print/pdf/cts/PrintedPdfDocumentTest.java
@@ -25,8 +25,9 @@ import android.graphics.Rect;
import android.graphics.pdf.PdfDocument;
import android.print.PrintAttributes;
import android.print.pdf.PrintedPdfDocument;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/tests/tests/proto/Android.mk b/tests/tests/proto/Android.mk
index 595df7cf5daae30e62ea9e7b5f4b39ab8210cea5..e937e0c7d009c7ec5d0ab1cac62b23cc24b64d7f 100644
--- a/tests/tests/proto/Android.mk
+++ b/tests/tests/proto/Android.mk
@@ -37,6 +37,6 @@ LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_JAVA_LIBRARIES += android.test.runner.stubs
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner
+ ctstestrunner-axt
include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/proto/AndroidManifest.xml b/tests/tests/proto/AndroidManifest.xml
index b8af5d082efb7280fa523fab812d6ecd44fe332a..20897cc672de1bc72f3ff5f402d32706a1598ad8 100644
--- a/tests/tests/proto/AndroidManifest.xml
+++ b/tests/tests/proto/AndroidManifest.xml
@@ -25,7 +25,7 @@
-
-
-
+
diff --git a/tests/tests/provider/src/android/provider/cts/FontRequestTest.java b/tests/tests/provider/src/android/provider/cts/FontRequestTest.java
index d9b8a7ff59aaac0c7053e8418eff9f64c70995d7..b03acab00b3c7976fd5b2187715fe0d2df5464b5 100644
--- a/tests/tests/provider/src/android/provider/cts/FontRequestTest.java
+++ b/tests/tests/provider/src/android/provider/cts/FontRequestTest.java
@@ -16,18 +16,15 @@
package android.provider.cts;
import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
import android.provider.FontRequest;
-import android.os.Parcel;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Base64;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/provider/src/android/provider/cts/FontsContractTest.java b/tests/tests/provider/src/android/provider/cts/FontsContractTest.java
index ea8836988b255850ff8f70aed498d3a9c14f1b8f..ba8777e9fe5908f877975ca5133e65d33c613ac4 100644
--- a/tests/tests/provider/src/android/provider/cts/FontsContractTest.java
+++ b/tests/tests/provider/src/android/provider/cts/FontsContractTest.java
@@ -36,9 +36,10 @@ import android.provider.FontsContract;
import android.provider.FontsContract.Columns;
import android.provider.FontsContract.FontFamilyResult;
import android.provider.FontsContract.FontInfo;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.annotations.GuardedBy;
diff --git a/tests/tests/provider/src/android/provider/cts/MediaStoreUiTest.java b/tests/tests/provider/src/android/provider/cts/MediaStoreUiTest.java
index 6ce81a09af51cb751948d3d76345ce173f925d97..9ed199e850bd2efb1cc69622a4306a785022763d 100644
--- a/tests/tests/provider/src/android/provider/cts/MediaStoreUiTest.java
+++ b/tests/tests/provider/src/android/provider/cts/MediaStoreUiTest.java
@@ -41,7 +41,6 @@ import android.os.storage.StorageManager;
import android.os.storage.StorageVolume;
import android.provider.MediaStore;
import android.provider.cts.GetResultActivity.Result;
-import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.BySelector;
import android.support.test.uiautomator.UiDevice;
@@ -53,6 +52,9 @@ import android.text.format.DateUtils;
import android.util.Log;
import android.view.KeyEvent;
+import androidx.core.content.FileProvider;
+import androidx.test.InstrumentationRegistry;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -65,8 +67,6 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import androidx.core.content.FileProvider;
-
public class MediaStoreUiTest extends InstrumentationTestCase {
private static final String TAG = "MediaStoreUiTest";
diff --git a/tests/tests/provider/src/android/provider/cts/contacts/README.txt b/tests/tests/provider/src/android/provider/cts/contacts/README.txt
index f988e5bdf79df6d77ac7cfb8166fd8186b56490f..52b241927d18daa2d11e3cbe4491ebc3879faa43 100644
--- a/tests/tests/provider/src/android/provider/cts/contacts/README.txt
+++ b/tests/tests/provider/src/android/provider/cts/contacts/README.txt
@@ -3,4 +3,4 @@ This directory contains ContactsProvider2.apk related CTS tests.
They can be executed with:
$ adb shell am instrument -w -e package android.provider.cts.contacts \
- android.provider.cts/android.support.test.runner.AndroidJUnitRunner
+ android.provider.cts/androidx.test.runner.AndroidJUnitRunner
diff --git a/tests/tests/renderscript/Android.mk b/tests/tests/renderscript/Android.mk
index 5da203693470f37017c1c855eb31aae36b141591..4fdfcc47cbdc5f4c86caaaab684a11f6005cc937 100644
--- a/tests/tests/renderscript/Android.mk
+++ b/tests/tests/renderscript/Android.mk
@@ -29,7 +29,7 @@ LOCAL_MULTILIB := both
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner \
+ ctstestrunner-axt \
xmp_toolkit
LOCAL_JAVA_LIBRARIES := android.test.base.stubs
LOCAL_JNI_SHARED_LIBRARIES := libcoremathtestcpp_jni
diff --git a/tests/tests/renderscript/AndroidManifest.xml b/tests/tests/renderscript/AndroidManifest.xml
index 7499899f6174b86f8e0e79c6777d3225042f247b..5b0420690f2a9dead2e4c223eebc37bfb0aadedb 100644
--- a/tests/tests/renderscript/AndroidManifest.xml
+++ b/tests/tests/renderscript/AndroidManifest.xml
@@ -29,7 +29,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:name="androidx.test.runner.AndroidJUnitRunner" />
\ No newline at end of file
diff --git a/tests/tests/slice/Android.mk b/tests/tests/slice/Android.mk
index ff3ff3bc8e5713cb3b95c935d155a48044f8f0b7..b440d19a3b078e72c16c09652e6d6b919f2bcea1 100644
--- a/tests/tests/slice/Android.mk
+++ b/tests/tests/slice/Android.mk
@@ -27,10 +27,10 @@ LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs
LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
- compatibility-device-util \
- ctsdeviceutillegacy \
- ctstestrunner \
+ androidx.test.rules \
+ compatibility-device-util-axt \
+ ctsdeviceutillegacy-axt \
+ ctstestrunner-axt \
metrics-helper-lib \
mockito-target-inline-minus-junit4 \
platform-test-annotations \
diff --git a/tests/tests/slice/AndroidManifest.xml b/tests/tests/slice/AndroidManifest.xml
index 6ec29bde004ff975c22f9682d3b5f40c3706b393..6eb21eb1c26fbde9a4abaa2d2f1124b3c336dbe8 100644
--- a/tests/tests/slice/AndroidManifest.xml
+++ b/tests/tests/slice/AndroidManifest.xml
@@ -50,7 +50,7 @@
-
-
-
-
\ No newline at end of file
diff --git a/tests/tests/systemintents/src/android/systemintents/cts/TestSystemIntents.java b/tests/tests/systemintents/src/android/systemintents/cts/TestSystemIntents.java
index f311fb254e51152ecf521d7936f126c7da8e2ca5..f6911b36dce235c32be2b8971b7426914ca4e171 100644
--- a/tests/tests/systemintents/src/android/systemintents/cts/TestSystemIntents.java
+++ b/tests/tests/systemintents/src/android/systemintents/cts/TestSystemIntents.java
@@ -24,10 +24,10 @@ import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.net.Uri;
import android.provider.Settings;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.InstrumentationRegistry;
-import android.util.Log;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/systemui/Android.mk b/tests/tests/systemui/Android.mk
index df7e28bd1232564af2866e4a3a4cc4258a85888d..5b519b2fd2ff13789f8d8ba0e9f0382d20d0017b 100644
--- a/tests/tests/systemui/Android.mk
+++ b/tests/tests/systemui/Android.mk
@@ -27,8 +27,8 @@ LOCAL_COMPATIBILITY_SUITE := cts vts general-tests cts_instant
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner \
- android-support-test \
+ ctstestrunner-axt \
+ androidx.test.rules \
ub-uiautomator
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/systemui/AndroidManifest.xml b/tests/tests/systemui/AndroidManifest.xml
index bdd6da79c8cb6d1ec0182bc03e6d5797ca7b4d09..6570661c28590ccd1bfc58310b464243423539b6 100644
--- a/tests/tests/systemui/AndroidManifest.xml
+++ b/tests/tests/systemui/AndroidManifest.xml
@@ -31,7 +31,7 @@
-
diff --git a/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java b/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java
index 27dd44fc15d64b062eb296b56f1e42d847220dec..52da2b5944c52c246b0aad5db4ec521e496c7364 100644
--- a/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java
+++ b/tests/tests/systemui/src/android/systemui/cts/LightBarTestBase.java
@@ -16,7 +16,8 @@
package android.systemui.cts;
-import static android.support.test.InstrumentationRegistry.getInstrumentation;
+import static androidx.test.InstrumentationRegistry.getInstrumentation;
+
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeTrue;
@@ -28,12 +29,13 @@ import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Rect;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.rule.ActivityTestRule;
import android.util.Log;
import android.view.DisplayCutout;
import android.view.WindowInsets;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.rule.ActivityTestRule;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
diff --git a/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java b/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java
index c9234d7d71521cbdfe2a8b87aa2851df372e5697..831c4deb13ffc20577ade8348a83a0ae4a24e311 100644
--- a/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java
+++ b/tests/tests/systemui/src/android/systemui/cts/LightBarTests.java
@@ -16,9 +16,9 @@
package android.systemui.cts;
-import static android.support.test.InstrumentationRegistry.getInstrumentation;
+import static androidx.test.InstrumentationRegistry.getInstrumentation;
+
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import android.app.Notification;
import android.app.NotificationChannel;
@@ -29,11 +29,12 @@ import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.SystemClock;
import android.platform.test.annotations.AppModeFull;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
import android.view.InputDevice;
import android.view.MotionEvent;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
diff --git a/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java b/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java
index 207b321db3c489fd655214d9b5cb41b5dbb863ea..cf659ded9751cda1dcc28a304fef81b223b0162c 100644
--- a/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java
+++ b/tests/tests/systemui/src/android/systemui/cts/LightBarThemeTest.java
@@ -16,20 +16,18 @@
package android.systemui.cts;
-import static android.support.test.InstrumentationRegistry.getInstrumentation;
+import static androidx.test.InstrumentationRegistry.getInstrumentation;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeFalse;
import android.content.Context;
-import android.content.pm.PackageManager;
-import android.graphics.Bitmap;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.view.View;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
diff --git a/tests/tests/telecom/Android.mk b/tests/tests/telecom/Android.mk
index 8f46fd7266e515ec9bf03fa7254083b91e92535b..a2c74fc01838685039f192146e2b622111a25e17 100644
--- a/tests/tests/telecom/Android.mk
+++ b/tests/tests/telecom/Android.mk
@@ -25,9 +25,9 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util \
- ctstestrunner \
- android-support-test
+ compatibility-device-util-axt \
+ ctstestrunner-axt \
+ androidx.test.rules
LOCAL_JAVA_LIBRARIES := android.test.base.stubs
diff --git a/tests/tests/telecom/AndroidManifest.xml b/tests/tests/telecom/AndroidManifest.xml
index 6d2ed72b2295d122e88d1e686b992fe1bf9bb13d..fafeb5afaa97038d43f86c727be67005b0ad4b24 100644
--- a/tests/tests/telecom/AndroidManifest.xml
+++ b/tests/tests/telecom/AndroidManifest.xml
@@ -126,7 +126,7 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/tests/telephony/src/android/telephony/cts/SubscriptionManagerTest.java b/tests/tests/telephony/src/android/telephony/cts/SubscriptionManagerTest.java
index 4e1cb8bff32b11b20bb155e9da4ac3b4ab1d085d..c14af54230155e946e4045c4fc747f140c02dfc2 100644
--- a/tests/tests/telephony/src/android/telephony/cts/SubscriptionManagerTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/SubscriptionManagerTest.java
@@ -35,12 +35,13 @@ import android.net.ConnectivityManager.NetworkCallback;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkRequest;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.SubscriptionPlan;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.compatibility.common.util.SystemUtil;
import org.junit.AfterClass;
diff --git a/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java b/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
index a9bcb3937b83867e958634d5714cb8fef330fb7b..0eabad7dcd3911721d3817ed497304a21bf975c4 100644
--- a/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java
@@ -32,8 +32,6 @@ import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Looper;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -46,6 +44,9 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.compatibility.common.util.TestThread;
import org.junit.After;
diff --git a/tests/tests/telephony/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java b/tests/tests/telephony/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java
index d25bbc6cd8178134611ffe743b216232eee33f52..9afa104333d7c74638d37dba705e6bb51266ce62 100644
--- a/tests/tests/telephony/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java
+++ b/tests/tests/telephony/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java
@@ -23,9 +23,10 @@ import static org.junit.Assert.assertTrue;
import android.os.Parcel;
import android.os.Parcelable;
-import android.support.test.runner.AndroidJUnit4;
import android.telephony.euicc.DownloadableSubscription;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccInfoTest.java b/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccInfoTest.java
index e6b122ebbb4d5079fc8dc728911959f0f79569df..30dfb4fa343bb9e7724b22ac52069be06831a3c9 100644
--- a/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccInfoTest.java
+++ b/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccInfoTest.java
@@ -22,14 +22,14 @@ import static org.junit.Assert.assertTrue;
import android.os.Parcel;
import android.os.Parcelable;
-import android.support.test.runner.AndroidJUnit4;
+import android.telephony.euicc.EuiccInfo;
+
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import android.telephony.euicc.EuiccInfo;
-
@RunWith(AndroidJUnit4.class)
public class EuiccInfoTest {
diff --git a/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccManagerTest.java b/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccManagerTest.java
index 920486e5fafb5e44e5d5f5b4deb75337c568f7fd..70b47f91ffaf788ff1d0347ba8b37656c16337b5 100644
--- a/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccManagerTest.java
+++ b/tests/tests/telephony/src/android/telephony/euicc/cts/EuiccManagerTest.java
@@ -25,12 +25,13 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.telephony.euicc.DownloadableSubscription;
import android.telephony.euicc.EuiccInfo;
import android.telephony.euicc.EuiccManager;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/tests/telephony2/Android.mk b/tests/tests/telephony2/Android.mk
index b86cae1eb9bfcf34a5a32f52d63cbd74e991f525..90cfe97b38959d9be4854b2fd8708b2d2e71ca49 100644
--- a/tests/tests/telephony2/Android.mk
+++ b/tests/tests/telephony2/Android.mk
@@ -23,8 +23,8 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner \
- compatibility-device-util
+ ctstestrunner-axt \
+ compatibility-device-util-axt
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/telephony2/AndroidManifest.xml b/tests/tests/telephony2/AndroidManifest.xml
index 6b8ec0c842741ef3a577e7ee36d11c9a1af26818..76a5888aeebd48af182a76bba5de0398fb149a55 100644
--- a/tests/tests/telephony2/AndroidManifest.xml
+++ b/tests/tests/telephony2/AndroidManifest.xml
@@ -23,7 +23,7 @@
-
diff --git a/tests/tests/telephony4/Android.mk b/tests/tests/telephony4/Android.mk
index 293224fd03a8fba44e74b8fff4329c8935bf0247..6f36b531a0b9907d33b907c27d1a89b16dab0f22 100644
--- a/tests/tests/telephony4/Android.mk
+++ b/tests/tests/telephony4/Android.mk
@@ -27,8 +27,8 @@ LOCAL_JAVA_LIBRARIES := telephony-common \
android.test.base.stubs
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner \
- compatibility-device-util \
+ ctstestrunner-axt \
+ compatibility-device-util-axt \
truth-prebuilt
LOCAL_HOST_SHARED_LIBRARIES := compatibility-device-telephony-preconditions
diff --git a/tests/tests/telephony4/AndroidManifest.xml b/tests/tests/telephony4/AndroidManifest.xml
index b292bb1284e30006c56a62852429624d03e1b7d9..aa4221f5d2a82e32c6bc5b7a94fe92c4acda2b38 100644
--- a/tests/tests/telephony4/AndroidManifest.xml
+++ b/tests/tests/telephony4/AndroidManifest.xml
@@ -21,7 +21,7 @@
-
-
-
-
-
-
-
-
diff --git a/tests/tests/uidisolation/Android.mk b/tests/tests/uidisolation/Android.mk
index 39bc2453d28f313f3e4c522268cbcc4939a270fa..de39ac6b6db832d478402987c25d8f2af2b3af56 100644
--- a/tests/tests/uidisolation/Android.mk
+++ b/tests/tests/uidisolation/Android.mk
@@ -24,7 +24,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests cts_instant
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner ctstestserver
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt ctstestserver
LOCAL_JAVA_LIBRARIES := \
org.apache.http.legacy \
diff --git a/tests/tests/uidisolation/AndroidManifest.xml b/tests/tests/uidisolation/AndroidManifest.xml
index 09631f597bc4ceec8157fffaeac817b40e24faec..0872521c14495ac544f08274ad1984036d8d42eb 100644
--- a/tests/tests/uidisolation/AndroidManifest.xml
+++ b/tests/tests/uidisolation/AndroidManifest.xml
@@ -33,7 +33,7 @@
-
-
-
-
-
-
-
diff --git a/tests/tests/wrap/wrap_debug/Android.mk b/tests/tests/wrap/wrap_debug/Android.mk
index c67e19197bfc20e9af239f5abcc498415267d937..fbd4b8eab00a97a7559ebc21aa49961689db416a 100644
--- a/tests/tests/wrap/wrap_debug/Android.mk
+++ b/tests/tests/wrap/wrap_debug/Android.mk
@@ -22,8 +22,8 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util \
- android-support-test
+ compatibility-device-util-axt \
+ androidx.test.rules
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
LOCAL_SRC_FILES := $(call all-java-files-under, ../src)
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
diff --git a/tests/tests/wrap/wrap_debug/AndroidManifest.xml b/tests/tests/wrap/wrap_debug/AndroidManifest.xml
index f3711083f49eb6b395336aa29190b3f908e1250d..99eff4367990851c0bb5fefa646543ef4a907da0 100644
--- a/tests/tests/wrap/wrap_debug/AndroidManifest.xml
+++ b/tests/tests/wrap/wrap_debug/AndroidManifest.xml
@@ -31,7 +31,7 @@
diff --git a/tests/tests/wrap/wrap_debug_malloc_debug/Android.mk b/tests/tests/wrap/wrap_debug_malloc_debug/Android.mk
index b768dcf1f08fc39ef97cb5a84d2617445c26de89..336c7bd6100b321d272740503b3ed64ab2fdeb7b 100644
--- a/tests/tests/wrap/wrap_debug_malloc_debug/Android.mk
+++ b/tests/tests/wrap/wrap_debug_malloc_debug/Android.mk
@@ -22,8 +22,8 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util \
- android-support-test
+ compatibility-device-util-axt \
+ androidx.test.rules
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
LOCAL_SRC_FILES := $(call all-java-files-under, ../src)
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
diff --git a/tests/tests/wrap/wrap_debug_malloc_debug/AndroidManifest.xml b/tests/tests/wrap/wrap_debug_malloc_debug/AndroidManifest.xml
index a359f1728b632827c481552334c289cc824ff2c6..47c1847a0f03c29f8d68d7225a9f007eb3580e81 100644
--- a/tests/tests/wrap/wrap_debug_malloc_debug/AndroidManifest.xml
+++ b/tests/tests/wrap/wrap_debug_malloc_debug/AndroidManifest.xml
@@ -31,7 +31,7 @@
diff --git a/tests/tests/wrap/wrap_nodebug/Android.mk b/tests/tests/wrap/wrap_nodebug/Android.mk
index 3317f3ca768f33def21e0a2d6380151cd407cd54..15081b7d08ef0185efe66de6f9a433a5de98e82b 100644
--- a/tests/tests/wrap/wrap_nodebug/Android.mk
+++ b/tests/tests/wrap/wrap_nodebug/Android.mk
@@ -22,8 +22,8 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_STATIC_JAVA_LIBRARIES := \
- compatibility-device-util \
- android-support-test
+ compatibility-device-util-axt \
+ androidx.test.rules
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
LOCAL_SRC_FILES := $(call all-java-files-under, ../src)
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
diff --git a/tests/tests/wrap/wrap_nodebug/AndroidManifest.xml b/tests/tests/wrap/wrap_nodebug/AndroidManifest.xml
index 127e6a88d8d29222c81bb6441c34c248d10cc4f9..60a2888ea2f0229dd8bbea542b2c962ebb88e4ba 100644
--- a/tests/tests/wrap/wrap_nodebug/AndroidManifest.xml
+++ b/tests/tests/wrap/wrap_nodebug/AndroidManifest.xml
@@ -31,7 +31,7 @@
diff --git a/tests/tvprovider/Android.mk b/tests/tvprovider/Android.mk
index 55955197b6e8772d7db9844839ac33d3772e242e..cccf2c11e4611357f8ca9ddd36ceaff8068bd101 100644
--- a/tests/tvprovider/Android.mk
+++ b/tests/tvprovider/Android.mk
@@ -18,7 +18,7 @@ include $(CLEAR_VARS)
# don't include this package in any target
LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt ctstestrunner-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/tvprovider/AndroidManifest.xml b/tests/tvprovider/AndroidManifest.xml
index 40714a64364f117cba3306b7e3af62fd2dfae04b..3ed7678f04b2218df88d98e09dd7ea566ac7adf6 100644
--- a/tests/tvprovider/AndroidManifest.xml
+++ b/tests/tvprovider/AndroidManifest.xml
@@ -25,7 +25,7 @@
-
diff --git a/tests/ui/Android.mk b/tests/ui/Android.mk
index 2ff427dd9d69576ca5af949398e909b2a7ff2d94..9a465fcb99adfca36a96135becdb8ecb2a621f70 100644
--- a/tests/ui/Android.mk
+++ b/tests/ui/Android.mk
@@ -20,7 +20,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util ctstestrunner
+LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt ctstestrunner-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/ui/AndroidManifest.xml b/tests/ui/AndroidManifest.xml
index 56826f9cfbe5ed8376ea6507344d6c0dd7fab2e3..08477e8b8dcd84984bfd8e6d9390420220d6fb28 100644
--- a/tests/ui/AndroidManifest.xml
+++ b/tests/ui/AndroidManifest.xml
@@ -37,7 +37,7 @@
-
diff --git a/tests/vr/Android.mk b/tests/vr/Android.mk
index dfd56558003ff0797c3599cc25c5c68dc7ac1a2d..d939f0bcf2d8069e8a14c43cc576fec2ba04d381 100644
--- a/tests/vr/Android.mk
+++ b/tests/vr/Android.mk
@@ -27,7 +27,7 @@ LOCAL_MULTILIB := both
# When built, explicitly put it in the data partition.
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner-axt compatibility-device-util-axt
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tests/vr/AndroidManifest.xml b/tests/vr/AndroidManifest.xml
index 1271665faf3158529d596c70e2014fcbab562689..cc60bd2e6672f968df7be45f067a65dd305e1870 100644
--- a/tests/vr/AndroidManifest.xml
+++ b/tests/vr/AndroidManifest.xml
@@ -23,7 +23,7 @@
diff --git a/tools/cts-holo-generation/Android.mk b/tools/cts-holo-generation/Android.mk
index 195f5a5bfdc6f3b6e8e57750f400fb8549677965..de39c6380f10f8ef8b036099c149ed6b56394950 100644
--- a/tools/cts-holo-generation/Android.mk
+++ b/tools/cts-holo-generation/Android.mk
@@ -23,7 +23,7 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
+LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
LOCAL_JAVA_LIBRARIES := android.test.runner.stubs android.test.base.stubs
diff --git a/tools/cts-holo-generation/AndroidManifest.xml b/tools/cts-holo-generation/AndroidManifest.xml
index ad4ae2268b33f5a4bbc6ce97d9e5bd1e7e698bc6..41fab00b9c9a3c5838a44446cc684dcabae794c4 100644
--- a/tools/cts-holo-generation/AndroidManifest.xml
+++ b/tools/cts-holo-generation/AndroidManifest.xml
@@ -7,7 +7,7 @@
diff --git a/tools/cts-media-preparer-app/Android.mk b/tools/cts-media-preparer-app/Android.mk
index 9d44f8ce30563dcd81e228995669e30f76e1b600..c2d57311e7667300cb8bba8dec46f8d7fbaa2672 100644
--- a/tools/cts-media-preparer-app/Android.mk
+++ b/tools/cts-media-preparer-app/Android.mk
@@ -27,7 +27,7 @@ LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test compatibility-device-util
+LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules compatibility-device-util-axt
# tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
diff --git a/tools/cts-media-preparer-app/AndroidManifest.xml b/tools/cts-media-preparer-app/AndroidManifest.xml
index da8d3d244ecacc39b5ba8d87a27bb72c4177ecab..15afba42408921be10b11ac280efa2bdea5b481b 100644
--- a/tools/cts-media-preparer-app/AndroidManifest.xml
+++ b/tools/cts-media-preparer-app/AndroidManifest.xml
@@ -23,7 +23,7 @@
-
diff --git a/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/MediaPreparerAppTest.java b/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/MediaPreparerAppTest.java
index 1b551960da8a32dce7968c561520da8237d83711..0f4fd691170349f547acc2b5011bc45c688352a0 100644
--- a/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/MediaPreparerAppTest.java
+++ b/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/MediaPreparerAppTest.java
@@ -15,13 +15,14 @@
*/
package android.mediastress.cts.preconditions.app;
-import com.android.compatibility.common.util.DynamicConfigDeviceSide;
-import com.android.compatibility.common.util.MediaUtils;
-
import android.app.Instrumentation;
import android.media.MediaFormat;
import android.os.Bundle;
-import android.support.test.InstrumentationRegistry;
+
+import androidx.test.InstrumentationRegistry;
+
+import com.android.compatibility.common.util.DynamicConfigDeviceSide;
+import com.android.compatibility.common.util.MediaUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tools/cts-preconditions/Android.mk b/tools/cts-preconditions/Android.mk
index 888eadcabb7caddf7d61ef49f5eb0417fcd0ee78..9c64e765aa3afc706e41f7c8b901d8f2e289a89a 100644
--- a/tools/cts-preconditions/Android.mk
+++ b/tools/cts-preconditions/Android.mk
@@ -26,7 +26,7 @@ LOCAL_DEX_PREOPT := false
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
+ androidx.test.rules \
compatibility-device-preconditions
LOCAL_JAVA_LIBRARIES := android.test.base.stubs
diff --git a/tools/cts-preconditions/AndroidManifest.xml b/tools/cts-preconditions/AndroidManifest.xml
index a8eb827a0b186c38f0831949592a0901b03de5ec..984ef6a6be82bedb5ed1d236060317243b9b72fa 100644
--- a/tools/cts-preconditions/AndroidManifest.xml
+++ b/tools/cts-preconditions/AndroidManifest.xml
@@ -24,7 +24,7 @@