Migrate packages/services/Telephony to androidx.test

See go/jetpack-test-android-migration

Test: compile
Merged-In: Icff5cdcee2284515071e8694bae7db82749071fd
Change-Id: I8363ce6051e95a441383a5c0bd926771eb5c4da6
diff --git a/tests/Android.mk b/tests/Android.mk
index 2fde21a..44bf176 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -31,9 +31,9 @@
 LOCAL_INSTRUMENTATION_FOR := TeleService
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
-        android-support-test \
+        androidx.test.rules \
         mockito-target-minus-junit4 \
-        espresso-core \
+        androidx.test.espresso.core \
         truth-prebuilt
 
 LOCAL_COMPATIBILITY_SUITE := device-tests
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 0aa5be2..d434650 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -53,14 +53,14 @@
     <!--
         To run all tests:
             adb shell am instrument -w
-                com.android.phone.tests/android.support.test.runner.AndroidJUnitRunner
+                com.android.phone.tests/androidx.test.runner.AndroidJUnitRunner
 
         To run a single class test:
             adb shell am instrument -e class com.android.phone.unit.FooUnitTest
-                -w com.android.phone.tests/android.support.test.runner.AndroidJUnitRunner
+                -w com.android.phone.tests/androidx.test.runner.AndroidJUnitRunner
 
     -->
-    <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
         android:targetPackage="com.android.phone"
         android:label="Phone application tests." />
 </manifest>
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index cf757b4..4188ee2 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -24,7 +24,7 @@
     <option name="test-tag" value="TeleServiceTests" />
     <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="com.android.phone.tests" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
+        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
         <option name="hidden-api-checks" value="false"/>
     </test>
 </configuration>
diff --git a/tests/src/com/android/TelephonyTestBase.java b/tests/src/com/android/TelephonyTestBase.java
index 7b7bef2..d30ae6b 100644
--- a/tests/src/com/android/TelephonyTestBase.java
+++ b/tests/src/com/android/TelephonyTestBase.java
@@ -19,9 +19,10 @@
 import android.content.Context;
 import android.os.Handler;
 import android.os.Looper;
-import android.support.test.InstrumentationRegistry;
 import android.util.Log;
 
+import androidx.test.InstrumentationRegistry;
+
 import org.mockito.MockitoAnnotations;
 
 import java.util.concurrent.CountDownLatch;
diff --git a/tests/src/com/android/phone/CallFeaturesSettingTest.java b/tests/src/com/android/phone/CallFeaturesSettingTest.java
index 816642a..78d68e3 100644
--- a/tests/src/com/android/phone/CallFeaturesSettingTest.java
+++ b/tests/src/com/android/phone/CallFeaturesSettingTest.java
@@ -15,16 +15,16 @@
  */
 package com.android.phone;
 
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static androidx.test.espresso.Espresso.onView;
+import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static androidx.test.espresso.matcher.ViewMatchers.withText;
 
 import static org.mockito.Mockito.when;
 
-import android.support.test.filters.FlakyTest;
-import android.support.test.rule.ActivityTestRule;
+import androidx.test.filters.FlakyTest;
+import androidx.test.rule.ActivityTestRule;
 
 import com.android.internal.telephony.IccCard;
 import com.android.internal.telephony.Phone;
diff --git a/tests/src/com/android/phone/CdmaOptionsTest.java b/tests/src/com/android/phone/CdmaOptionsTest.java
index c0c6317..1a1516c 100644
--- a/tests/src/com/android/phone/CdmaOptionsTest.java
+++ b/tests/src/com/android/phone/CdmaOptionsTest.java
@@ -18,9 +18,10 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import android.os.PersistableBundle;
-import android.support.test.runner.AndroidJUnit4;
 import android.telephony.CarrierConfigManager;
 
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.internal.telephony.PhoneConstants;
 
 import org.junit.Test;
diff --git a/tests/src/com/android/phone/PhoneSearchIndexablesProviderTest.java b/tests/src/com/android/phone/PhoneSearchIndexablesProviderTest.java
index 34e3937..b655f3b 100644
--- a/tests/src/com/android/phone/PhoneSearchIndexablesProviderTest.java
+++ b/tests/src/com/android/phone/PhoneSearchIndexablesProviderTest.java
@@ -28,9 +28,10 @@
 import android.os.UserManager;
 import android.provider.SearchIndexablesContract;
 import android.provider.Settings;
-import android.support.test.runner.AndroidJUnit4;
 import android.telephony.euicc.EuiccManager;
 
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
diff --git a/tests/src/com/android/phone/RoamingDialogFragmentTest.java b/tests/src/com/android/phone/RoamingDialogFragmentTest.java
index 62633e0..a9b32ea 100644
--- a/tests/src/com/android/phone/RoamingDialogFragmentTest.java
+++ b/tests/src/com/android/phone/RoamingDialogFragmentTest.java
@@ -15,31 +15,34 @@
  */
 package com.android.phone;
 
+import static androidx.test.espresso.Espresso.onData;
+import static androidx.test.espresso.Espresso.onView;
+import static androidx.test.espresso.action.ViewActions.click;
+import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant;
+import static androidx.test.espresso.matcher.ViewMatchers.isChecked;
+import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static androidx.test.espresso.matcher.ViewMatchers.withId;
+import static androidx.test.espresso.matcher.ViewMatchers.withText;
+
+import static com.google.common.truth.Truth.assertThat;
+
 import android.app.Activity;
 import android.content.pm.ActivityInfo;
 import android.provider.Settings.Global;
 import android.provider.Settings.SettingNotFoundException;
-import android.support.test.espresso.matcher.PreferenceMatchers;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.filters.FlakyTest;
-import com.google.common.truth.Truth;
+
+import androidx.test.espresso.matcher.PreferenceMatchers;
+import androidx.test.filters.FlakyTest;
+import androidx.test.rule.ActivityTestRule;
+
 import junit.framework.AssertionFailedError;
+
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import static android.support.test.espresso.Espresso.onData;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
-import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
-import static android.support.test.espresso.matcher.ViewMatchers.isChecked;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-import static com.google.common.truth.Truth.assertThat;
-
 /**
  * Espresso tests to check some properties of the dialog that appears when a user
  * tries to turn on data roaming.
diff --git a/tests/src/com/android/phone/ecc/EccDataTest.java b/tests/src/com/android/phone/ecc/EccDataTest.java
index 8f4abc5..911d3c5 100644
--- a/tests/src/com/android/phone/ecc/EccDataTest.java
+++ b/tests/src/com/android/phone/ecc/EccDataTest.java
@@ -18,8 +18,8 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
 
 import com.android.TelephonyTestBase;
 import com.android.phone.ecc.nano.ProtobufEccData;
diff --git a/tests/src/com/android/phone/euicc/EuiccUiDispatcherActivityTest.java b/tests/src/com/android/phone/euicc/EuiccUiDispatcherActivityTest.java
index 57df097..b8f2ec1 100644
--- a/tests/src/com/android/phone/euicc/EuiccUiDispatcherActivityTest.java
+++ b/tests/src/com/android/phone/euicc/EuiccUiDispatcherActivityTest.java
@@ -23,10 +23,11 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
 import android.telephony.euicc.EuiccManager;
 
+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/src/com/android/phone/tests/CallForwardInfoTest.java b/tests/src/com/android/phone/tests/CallForwardInfoTest.java
index acf5955..064a06e 100644
--- a/tests/src/com/android/phone/tests/CallForwardInfoTest.java
+++ b/tests/src/com/android/phone/tests/CallForwardInfoTest.java
@@ -16,17 +16,18 @@
 
 package com.android.phone.tests;
 
-import android.support.test.runner.AndroidJUnit4;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
 import android.telephony.PhoneNumberUtils;
 
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
 import java.util.Locale;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
 /**
  * Tests Related to CallForwardInfoTest
  */
diff --git a/tests/src/com/android/services/telephony/ConferenceParticipantConnectionTest.java b/tests/src/com/android/services/telephony/ConferenceParticipantConnectionTest.java
index 73fe0af..f404945 100644
--- a/tests/src/com/android/services/telephony/ConferenceParticipantConnectionTest.java
+++ b/tests/src/com/android/services/telephony/ConferenceParticipantConnectionTest.java
@@ -16,17 +16,17 @@
 
 package com.android.services.telephony;
 
+import static com.android.services.telephony.ConferenceParticipantConnection.getParticipantAddress;
+
+import static org.junit.Assert.assertEquals;
+
 import android.net.Uri;
-import android.support.test.runner.AndroidJUnit4;
-import android.telecom.Conference;
-import android.telecom.ConferenceParticipant;
+
+import androidx.test.runner.AndroidJUnit4;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static com.android.services.telephony.ConferenceParticipantConnection.getParticipantAddress;
-import static org.junit.Assert.assertEquals;
-
 /**
  * Tests proper parsing of conference event package participant addresses.
  */
diff --git a/tests/src/com/android/services/telephony/HoldTrackerTest.java b/tests/src/com/android/services/telephony/HoldTrackerTest.java
index 0db10e4..772a1a2 100644
--- a/tests/src/com/android/services/telephony/HoldTrackerTest.java
+++ b/tests/src/com/android/services/telephony/HoldTrackerTest.java
@@ -20,9 +20,10 @@
 import static junit.framework.Assert.assertTrue;
 
 import android.content.ComponentName;
-import android.support.test.runner.AndroidJUnit4;
 import android.telecom.PhoneAccountHandle;
 
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
diff --git a/tests/src/com/android/services/telephony/RadioOnStateListenerTest.java b/tests/src/com/android/services/telephony/RadioOnStateListenerTest.java
index d9de2e8..8b46bf0 100644
--- a/tests/src/com/android/services/telephony/RadioOnStateListenerTest.java
+++ b/tests/src/com/android/services/telephony/RadioOnStateListenerTest.java
@@ -28,10 +28,11 @@
 
 import android.os.AsyncResult;
 import android.os.Handler;
-import android.support.test.runner.AndroidJUnit4;
 import android.telephony.ServiceState;
 import android.test.suitebuilder.annotation.SmallTest;
 
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.TelephonyTestBase;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
diff --git a/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java b/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
index a18adb8..1329a77 100644
--- a/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
+++ b/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
@@ -32,8 +32,6 @@
 import android.os.AsyncResult;
 import android.os.Bundle;
 import android.os.Handler;
-import android.support.test.filters.FlakyTest;
-import android.support.test.runner.AndroidJUnit4;
 import android.telecom.DisconnectCause;
 import android.telecom.TelecomManager;
 import android.telephony.RadioAccessFamily;
@@ -41,6 +39,9 @@
 import android.telephony.TelephonyManager;
 import android.test.suitebuilder.annotation.SmallTest;
 
+import androidx.test.filters.FlakyTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.TelephonyTestBase;
 import com.android.internal.telephony.CallStateException;
 import com.android.internal.telephony.Connection;