Migrate packages/apps/Settings to androidx.test

See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: If67b124188fd4e303154eb11263d03abfb3718c6
diff --git a/tests/uitests/Android.mk b/tests/uitests/Android.mk
index 89f9133..fb7258c 100644
--- a/tests/uitests/Android.mk
+++ b/tests/uitests/Android.mk
@@ -27,7 +27,7 @@
     android.test.base
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
-    android-support-test \
+    androidx.test.rules \
     app-helpers-core \
     launcher-helper-lib \
     metrics-helper-lib \
diff --git a/tests/uitests/AndroidManifest.xml b/tests/uitests/AndroidManifest.xml
index 49a2fd1..dc6fc15 100644
--- a/tests/uitests/AndroidManifest.xml
+++ b/tests/uitests/AndroidManifest.xml
@@ -31,7 +31,7 @@
     <uses-permission android:name="android.permission.READ_SEARCH_INDEXABLES"/>
 
     <instrumentation
-            android:name="android.support.test.runner.AndroidJUnitRunner"
+            android:name="androidx.test.runner.AndroidJUnitRunner"
             android:targetPackage="com.android.settings.ui"
             android:label="Android Settings Functional UI Tests" />
 </manifest>
diff --git a/tests/uitests/AndroidTest.xml b/tests/uitests/AndroidTest.xml
index 4162207..50c6a75 100644
--- a/tests/uitests/AndroidTest.xml
+++ b/tests/uitests/AndroidTest.xml
@@ -24,7 +24,7 @@
     <option name="test-tag" value="SettingsUITests" />
     <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="com.android.settings.ui" />
-        <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/uitests/src/com/android/settings/ui/AboutPhoneSettingsTests.java b/tests/uitests/src/com/android/settings/ui/AboutPhoneSettingsTests.java
index 738d710..a73a5a8 100644
--- a/tests/uitests/src/com/android/settings/ui/AboutPhoneSettingsTests.java
+++ b/tests/uitests/src/com/android/settings/ui/AboutPhoneSettingsTests.java
@@ -24,9 +24,6 @@
 import android.content.Intent;
 import android.os.RemoteException;
 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.By;
 import android.support.test.uiautomator.Direction;
 import android.support.test.uiautomator.UiDevice;
@@ -34,6 +31,10 @@
 import android.support.test.uiautomator.Until;
 import android.text.TextUtils;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/tests/uitests/src/com/android/settings/ui/AppsSettingsRetainFilterTests.java b/tests/uitests/src/com/android/settings/ui/AppsSettingsRetainFilterTests.java
index 84d528b..4698b9a 100644
--- a/tests/uitests/src/com/android/settings/ui/AppsSettingsRetainFilterTests.java
+++ b/tests/uitests/src/com/android/settings/ui/AppsSettingsRetainFilterTests.java
@@ -21,14 +21,15 @@
 import android.content.Intent;
 import android.os.RemoteException;
 import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
 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.system.helpers.ActivityHelper;
 
+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/uitests/src/com/android/settings/ui/BatterySettingsUITest.java b/tests/uitests/src/com/android/settings/ui/BatterySettingsUITest.java
index 8b34fff..3cf1e96 100644
--- a/tests/uitests/src/com/android/settings/ui/BatterySettingsUITest.java
+++ b/tests/uitests/src/com/android/settings/ui/BatterySettingsUITest.java
@@ -18,12 +18,13 @@
 
 import android.content.Intent;
 import android.os.RemoteException;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
 import android.support.test.uiautomator.UiDevice;
 import android.system.helpers.SettingsHelper;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.settings.ui.testutils.SettingsTestUtils;
 
 import org.junit.After;
diff --git a/tests/uitests/src/com/android/settings/ui/ConnectedDeviceTests.java b/tests/uitests/src/com/android/settings/ui/ConnectedDeviceTests.java
index ca19a3f..ef0dacc 100644
--- a/tests/uitests/src/com/android/settings/ui/ConnectedDeviceTests.java
+++ b/tests/uitests/src/com/android/settings/ui/ConnectedDeviceTests.java
@@ -24,14 +24,15 @@
 import android.nfc.NfcAdapter;
 import android.nfc.NfcManager;
 import android.os.RemoteException;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
 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 androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/tests/uitests/src/com/android/settings/ui/HomepageDisplayTests.java b/tests/uitests/src/com/android/settings/ui/HomepageDisplayTests.java
index 4eccd8b..4c72b34 100644
--- a/tests/uitests/src/com/android/settings/ui/HomepageDisplayTests.java
+++ b/tests/uitests/src/com/android/settings/ui/HomepageDisplayTests.java
@@ -22,9 +22,6 @@
 import android.os.RemoteException;
 import android.platform.test.annotations.Presubmit;
 import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
 import android.support.test.uiautomator.By;
 import android.support.test.uiautomator.Direction;
 import android.support.test.uiautomator.UiDevice;
@@ -32,6 +29,10 @@
 import android.support.test.uiautomator.Until;
 import android.system.helpers.SettingsHelper;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.settings.ui.testutils.SettingsTestUtils;
 
 import org.junit.After;
diff --git a/tests/uitests/src/com/android/settings/ui/SecuritySettingsLaunchTest.java b/tests/uitests/src/com/android/settings/ui/SecuritySettingsLaunchTest.java
index 6803c7e..5efb7e8 100644
--- a/tests/uitests/src/com/android/settings/ui/SecuritySettingsLaunchTest.java
+++ b/tests/uitests/src/com/android/settings/ui/SecuritySettingsLaunchTest.java
@@ -18,12 +18,13 @@
 
 import android.os.RemoteException;
 import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
 import android.support.test.uiautomator.UiDevice;
 import android.system.helpers.SettingsHelper;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.settings.ui.testutils.SettingsTestUtils;
 
 import org.junit.After;
diff --git a/tests/uitests/src/com/android/settings/ui/StorageSettingsUITest.java b/tests/uitests/src/com/android/settings/ui/StorageSettingsUITest.java
index a301cc3..b21da71 100644
--- a/tests/uitests/src/com/android/settings/ui/StorageSettingsUITest.java
+++ b/tests/uitests/src/com/android/settings/ui/StorageSettingsUITest.java
@@ -18,12 +18,13 @@
 
 import android.os.RemoteException;
 import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
 import android.support.test.uiautomator.UiDevice;
 import android.system.helpers.SettingsHelper;
 import android.test.suitebuilder.annotation.MediumTest;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
 import com.android.settings.ui.testutils.SettingsTestUtils;
 
 import org.junit.After;
diff --git a/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java b/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java
index 4b923f5..d47cd0d 100644
--- a/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java
+++ b/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java
@@ -20,8 +20,6 @@
 import android.os.SystemClock;
 import android.os.storage.DiskInfo;
 import android.os.storage.VolumeInfo;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
 import android.support.test.uiautomator.By;
 import android.support.test.uiautomator.BySelector;
 import android.support.test.uiautomator.UiDevice;
@@ -29,6 +27,9 @@
 import android.support.test.uiautomator.UiObjectNotFoundException;
 import android.support.test.uiautomator.Until;
 
+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/uitests/src/com/android/settings/ui/SyncSettingsTest.java b/tests/uitests/src/com/android/settings/ui/SyncSettingsTest.java
index 848147f..58a2fd3 100644
--- a/tests/uitests/src/com/android/settings/ui/SyncSettingsTest.java
+++ b/tests/uitests/src/com/android/settings/ui/SyncSettingsTest.java
@@ -20,15 +20,16 @@
 
 import android.os.RemoteException;
 import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
 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.system.helpers.SettingsHelper;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/tests/uitests/src/com/android/settings/ui/WirelessNetworkSettingsTests.java b/tests/uitests/src/com/android/settings/ui/WirelessNetworkSettingsTests.java
index dd700ac..d637c53 100644
--- a/tests/uitests/src/com/android/settings/ui/WirelessNetworkSettingsTests.java
+++ b/tests/uitests/src/com/android/settings/ui/WirelessNetworkSettingsTests.java
@@ -24,8 +24,6 @@
 import android.os.RemoteException;
 import android.platform.test.annotations.Presubmit;
 import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
 import android.support.test.uiautomator.By;
 import android.support.test.uiautomator.UiDevice;
 import android.support.test.uiautomator.Until;
@@ -34,6 +32,9 @@
 import android.test.suitebuilder.annotation.MediumTest;
 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;
diff --git a/tests/uitests/src/com/android/settings/ui/ZonePickerSettingsTest.java b/tests/uitests/src/com/android/settings/ui/ZonePickerSettingsTest.java
index 864b7a9..4cb7ad9 100644
--- a/tests/uitests/src/com/android/settings/ui/ZonePickerSettingsTest.java
+++ b/tests/uitests/src/com/android/settings/ui/ZonePickerSettingsTest.java
@@ -17,6 +17,7 @@
 
 import static com.android.settings.ui.testutils.SettingsTestUtils.SETTINGS_PACKAGE;
 import static com.android.settings.ui.testutils.SettingsTestUtils.TIMEOUT;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -24,9 +25,6 @@
 import android.os.RemoteException;
 import android.os.SystemProperties;
 import android.provider.Settings;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
 import android.support.test.uiautomator.By;
 import android.support.test.uiautomator.BySelector;
 import android.support.test.uiautomator.UiDevice;
@@ -39,6 +37,10 @@
 import android.system.helpers.SettingsHelper;
 import android.system.helpers.SettingsHelper.SettingsType;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/tests/uitests/src/com/android/settings/ui/inputmethods/DataSaverSummaryUITest.java b/tests/uitests/src/com/android/settings/ui/inputmethods/DataSaverSummaryUITest.java
index 45f757c..fd8c054 100644
--- a/tests/uitests/src/com/android/settings/ui/inputmethods/DataSaverSummaryUITest.java
+++ b/tests/uitests/src/com/android/settings/ui/inputmethods/DataSaverSummaryUITest.java
@@ -21,13 +21,14 @@
 
 import android.app.Instrumentation;
 import android.content.Intent;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
 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 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/uitests/src/com/android/settings/ui/inputmethods/SpellCheckerSettingsUITest.java b/tests/uitests/src/com/android/settings/ui/inputmethods/SpellCheckerSettingsUITest.java
index 78c6f8c..9c18da5 100644
--- a/tests/uitests/src/com/android/settings/ui/inputmethods/SpellCheckerSettingsUITest.java
+++ b/tests/uitests/src/com/android/settings/ui/inputmethods/SpellCheckerSettingsUITest.java
@@ -21,13 +21,14 @@
 
 import android.app.Instrumentation;
 import android.content.Intent;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
 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 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/uitests/src/com/android/settings/ui/search/SettingsSearchResultRegressionTest.java b/tests/uitests/src/com/android/settings/ui/search/SettingsSearchResultRegressionTest.java
index 73cfb3e..298428c 100644
--- a/tests/uitests/src/com/android/settings/ui/search/SettingsSearchResultRegressionTest.java
+++ b/tests/uitests/src/com/android/settings/ui/search/SettingsSearchResultRegressionTest.java
@@ -27,12 +27,13 @@
 import android.database.Cursor;
 import android.net.Uri;
 import android.platform.test.annotations.Presubmit;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
 import android.text.TextUtils;
 import android.util.Log;
 
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;