Migrate cts/tests/tests/telephony to androidx.test
See go/jetpack-test-android-migration
Test: m CtsTelephonyTestCases
Change-Id: Ifd58e8a5f1739e48a8e5ca3712c33da2358a2014
Merged-In: Ie46a850d09a7bec4a48923c155647c9b03e3a2fb
diff --git a/tests/tests/telephony/current/Android.mk b/tests/tests/telephony/current/Android.mk
index 88f055f..efea8ad 100644
--- a/tests/tests/telephony/current/Android.mk
+++ b/tests/tests/telephony/current/Android.mk
@@ -25,8 +25,8 @@
LOCAL_JAVA_LIBRARIES := telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner \
- compatibility-device-util \
+ ctstestrunner-axt hamcrest-library \
+ compatibility-device-util-axt \
truth-prebuilt
LOCAL_HOST_SHARED_LIBRARIES := compatibility-device-telephony-preconditions
diff --git a/tests/tests/telephony/current/AndroidManifest.xml b/tests/tests/telephony/current/AndroidManifest.xml
index 764daf5..324f5b4 100644
--- a/tests/tests/telephony/current/AndroidManifest.xml
+++ b/tests/tests/telephony/current/AndroidManifest.xml
@@ -162,7 +162,7 @@
android:value="android.telephony.mbms.cts"/>
</application>
- <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="android.telephony.cts"
android:label="CTS tests of android.telephony">
<meta-data android:name="listener"
diff --git a/tests/tests/telephony/current/preconditions/app/Android.mk b/tests/tests/telephony/current/preconditions/app/Android.mk
index fb64cd2..2ad1c6c 100644
--- a/tests/tests/telephony/current/preconditions/app/Android.mk
+++ b/tests/tests/telephony/current/preconditions/app/Android.mk
@@ -27,8 +27,8 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ctstestrunner \
- compatibility-device-util \
+LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules ctstestrunner-axt \
+ compatibility-device-util-axt \
compatibility-device-preconditions
LOCAL_JAVA_LIBRARIES := android.test.base.stubs
diff --git a/tests/tests/telephony/current/preconditions/app/AndroidManifest.xml b/tests/tests/telephony/current/preconditions/app/AndroidManifest.xml
index 894b510..f84d1ec 100644
--- a/tests/tests/telephony/current/preconditions/app/AndroidManifest.xml
+++ b/tests/tests/telephony/current/preconditions/app/AndroidManifest.xml
@@ -22,7 +22,7 @@
<uses-library android:name="android.test.runner" />
</application>
- <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="android.telephony.cts.preconditions.app"
android:label="Device-side CTS telephony preparation" />
</manifest>
\ No newline at end of file
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java b/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java
index 43fd5d6..f132ddf 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java
@@ -36,12 +36,13 @@
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/current/src/android/telephony/cts/TelephonyManagerTest.java b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java
index e9034b3..613d15c 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyManagerTest.java
@@ -37,8 +37,6 @@
import android.os.IBinder;
import android.os.Looper;
import android.os.RemoteException;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -50,14 +48,17 @@
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
-import android.telephony.emergency.EmergencyNumber;
import android.telephony.UiccCardInfo;
import android.telephony.cts.locationaccessingapp.CtsLocationAccessService;
import android.telephony.cts.locationaccessingapp.ICtsLocationAccessControl;
+import android.telephony.emergency.EmergencyNumber;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.compatibility.common.util.ShellIdentityUtils;
import com.android.compatibility.common.util.TestThread;
diff --git a/tests/tests/telephony/current/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java b/tests/tests/telephony/current/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java
index d25bbc6..9afa104 100644
--- a/tests/tests/telephony/current/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/euicc/cts/DownloadableSubscriptionTest.java
@@ -23,9 +23,10 @@
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/current/src/android/telephony/euicc/cts/EuiccInfoTest.java b/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccInfoTest.java
index e6b122eb..30dfb4f 100644
--- a/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccInfoTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccInfoTest.java
@@ -22,14 +22,14 @@
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/current/src/android/telephony/euicc/cts/EuiccManagerTest.java b/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccManagerTest.java
index 17c5827..59bb882 100644
--- a/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/euicc/cts/EuiccManagerTest.java
@@ -25,13 +25,14 @@
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.TelephonyManager;
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/telephony/sdk28/Android.mk b/tests/tests/telephony/sdk28/Android.mk
index 36e30fd..9bb8f84 100644
--- a/tests/tests/telephony/sdk28/Android.mk
+++ b/tests/tests/telephony/sdk28/Android.mk
@@ -23,7 +23,7 @@
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_STATIC_JAVA_LIBRARIES := \
- ctstestrunner \
+ ctstestrunner-axt \
compatibility-device-util
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/telephony/sdk28/AndroidManifest.xml b/tests/tests/telephony/sdk28/AndroidManifest.xml
index 2f37696..7955df5 100644
--- a/tests/tests/telephony/sdk28/AndroidManifest.xml
+++ b/tests/tests/telephony/sdk28/AndroidManifest.xml
@@ -27,7 +27,7 @@
<uses-library android:name="android.test.runner" />
</application>
- <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="android.telephony.sdk28.cts">
<meta-data android:name="listener"
android:value="com.android.cts.runner.CtsTestRunListener" />