From 031dcf5019d31dfaf0569c931cbfdcffaa206329 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Thu, 13 Dec 2018 19:06:32 -0800 Subject: [PATCH] Migrate packages/apps/Settings to androidx.test See go/jetpack-test-android-migration Test: make checkbuild Change-Id: If67b124188fd4e303154eb11263d03abfb3718c6 --- tests/anomaly-tester/Android.mk | 2 +- tests/anomaly-tester/AndroidManifest.xml | 2 +- .../anomaly/tests/BluetoothAnomalyTest.java | 5 +-- .../anomaly/tests/WakelockAnomalyTest.java | 5 +-- tests/uitests/Android.mk | 2 +- tests/uitests/AndroidManifest.xml | 2 +- tests/uitests/AndroidTest.xml | 2 +- .../settings/ui/AboutPhoneSettingsTests.java | 7 ++-- .../ui/AppsSettingsRetainFilterTests.java | 5 +-- .../settings/ui/BatterySettingsUITest.java | 7 ++-- .../settings/ui/ConnectedDeviceTests.java | 7 ++-- .../settings/ui/HomepageDisplayTests.java | 7 ++-- .../ui/SecuritySettingsLaunchTest.java | 7 ++-- .../settings/ui/StorageSettingsUITest.java | 5 +-- .../settings/ui/StorageWizardTest.java | 5 +-- .../android/settings/ui/SyncSettingsTest.java | 7 ++-- .../ui/WirelessNetworkSettingsTests.java | 5 +-- .../settings/ui/ZonePickerSettingsTest.java | 8 +++-- .../inputmethods/DataSaverSummaryUITest.java | 5 +-- .../SpellCheckerSettingsUITest.java | 5 +-- .../SettingsSearchResultRegressionTest.java | 7 ++-- tests/unit/Android.mk | 8 ++--- tests/unit/AndroidManifest.xml | 2 +- tests/unit/AndroidTest.xml | 2 +- tests/unit/README | 6 ++-- .../android/settings/DisplaySettingsTest.java | 13 +++---- .../settings/EncryptionInterstitialTest.java | 14 ++++---- .../ManagedAccessSettingsLowRamTest.java | 19 ++++++----- .../RegulatoryInfoDisplayActivityTest.java | 18 +++++----- .../android/settings/UserCredentialsTest.java | 2 +- ...ibilityShortcutPreferenceFragmentTest.java | 22 ++++++------ .../ToggleFeaturePreferenceFragmentTest.java | 15 ++++---- .../accounts/AccountsSettingsTest.java | 7 ++-- .../applications/AppOpsSettingsTest.java | 7 ++-- .../applications/DefaultAppSettingsTest.java | 3 +- .../applications/DrawOverlaySettingsTest.java | 5 +-- .../ExternalSourcesSettingsTest.java | 5 +-- .../ManageApplicationsLaunchTest.java | 16 +++++---- .../SpecialAppAccessSettingsTest.java | 3 +- .../ManageApplicationsUnitTest.java | 6 ++-- .../settings/backup/BackupIntentTest.java | 7 ++-- .../FingerprintEnrollFinishTest.java | 22 ++++++------ .../BluetoothDeviceDetailsRotationTest.java | 7 ++-- .../bluetooth/DevicePickerActivityTest.java | 7 ++-- .../ConnectedDeviceActivityTest.java | 7 ++-- .../core/LifecycleEventHandlingTest.java | 8 +++-- .../PreferenceControllerContractTest.java | 7 ++-- .../settings/core/SettingsGatewayTest.java | 10 ++++-- .../settings/core/UniquePreferenceTest.java | 7 ++-- .../settings/core/UserRestrictionTest.java | 7 ++-- .../dashboard/PreferenceThemeTest.java | 23 +++++++------ .../MobileDataUsageActivityTest.java | 7 ++-- .../timezone/model/TimeZoneDataTest.java | 4 +-- ...eferenceControllerInstrumentationTest.java | 7 ++-- .../deviceinfo/PrivateVolumeForgetTest.java | 10 +++--- .../deviceinfo/PublicVolumeSettingsTest.java | 10 +++--- .../StorageDashboardFragmentTest.java | 15 ++++---- .../storage/StorageAsyncLoaderTest.java | 6 ++-- .../NightDisplaySettingsActivityTest.java | 7 ++-- .../ThemePreferenceControllerTest.java | 11 +++--- .../dream/DreamSettingsLaunchTest.java | 7 ++-- .../fuelgauge/PowerUsageSummaryTest.java | 13 +++---- .../fuelgauge/batterytip/RestrictAppTest.java | 16 +++++---- .../ContextualCardLoaderTest.java | 5 +-- .../AppNotificationSettingsTest.java | 34 +++++++++++-------- .../ChannelNotificationSettingsTest.java | 17 ++++++---- .../ZenModeSettingsIntegrationTest.java | 15 ++++---- .../password/ChooseLockGenericTest.java | 19 ++++++----- .../password/ChooseLockPasswordTest.java | 24 +++++++------ .../password/ConfirmLockPasswordTest.java | 17 +++++----- .../password/SetupChooseLockGenericTest.java | 14 ++++---- .../SetupChooseLockPasswordAppTest.java | 31 +++++++++-------- .../print/PrintJobSettingsActivityTest.java | 12 +++---- .../search/SearchIndexablesContractTest.java | 5 +-- .../search/SearchResultTrampolineTest.java | 7 ++-- .../SettingsSearchIndexablesProviderTest.java | 7 ++-- .../slices/SliceDataContractTest.java | 7 ++-- .../slices/SliceDeepLinkSpringBoardTest.java | 7 ++-- .../tests/DrawOverlayDetailsTest.java | 20 ++++++----- .../settings/tests/KeepOnScreenTest.java | 14 ++++---- .../tests/PrivateVolumeSettingsTest.java | 13 +++---- .../tests/SettingsRestoreAfterCloseTest.java | 7 ++-- .../settings/users/UserSettingsTest.java | 7 ++-- .../settings/utils/FileSizeFormatterTest.java | 7 ++-- .../wifi/SavedNetworkSettingsTest.java | 18 +++++----- .../wifi/WifiCallingSettingUiTest.java | 26 +++++++------- .../settings/wifi/WifiSettingsUiTest.java | 30 ++++++++-------- .../dpp/WifiDppConfiguratorActivityTest.java | 7 ++-- .../WifiDppQrCodeGeneratorFragmentTest.java | 6 ++-- .../dpp/WifiDppQrCodeScannerFragmentTest.java | 6 ++-- .../wifi/tether/WifiTetherSettingsTest.java | 15 ++++---- 91 files changed, 500 insertions(+), 402 deletions(-) diff --git a/tests/anomaly-tester/Android.mk b/tests/anomaly-tester/Android.mk index 9a0a8755163..4dffeab0500 100644 --- a/tests/anomaly-tester/Android.mk +++ b/tests/anomaly-tester/Android.mk @@ -7,7 +7,7 @@ LOCAL_CERTIFICATE := platform LOCAL_JAVA_LIBRARIES := android.test.runner LOCAL_STATIC_JAVA_LIBRARIES := \ - android-support-test \ + androidx.test.rules \ mockito-target \ ub-uiautomator \ truth-prebuilt \ diff --git a/tests/anomaly-tester/AndroidManifest.xml b/tests/anomaly-tester/AndroidManifest.xml index 7893b866bfa..d6f68a892c1 100644 --- a/tests/anomaly-tester/AndroidManifest.xml +++ b/tests/anomaly-tester/AndroidManifest.xml @@ -44,7 +44,7 @@ diff --git a/tests/anomaly-tester/src/com/android/settings/anomaly/tests/BluetoothAnomalyTest.java b/tests/anomaly-tester/src/com/android/settings/anomaly/tests/BluetoothAnomalyTest.java index 3630ce420dd..0477e094228 100644 --- a/tests/anomaly-tester/src/com/android/settings/anomaly/tests/BluetoothAnomalyTest.java +++ b/tests/anomaly-tester/src/com/android/settings/anomaly/tests/BluetoothAnomalyTest.java @@ -19,13 +19,14 @@ import static com.google.common.truth.Truth.assertWithMessage; import android.app.Instrumentation; import android.content.Context; 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.Until; import android.text.format.DateUtils; +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/anomaly-tester/src/com/android/settings/anomaly/tests/WakelockAnomalyTest.java b/tests/anomaly-tester/src/com/android/settings/anomaly/tests/WakelockAnomalyTest.java index a2f38048977..c44e2eaf712 100644 --- a/tests/anomaly-tester/src/com/android/settings/anomaly/tests/WakelockAnomalyTest.java +++ b/tests/anomaly-tester/src/com/android/settings/anomaly/tests/WakelockAnomalyTest.java @@ -19,13 +19,14 @@ import static com.google.common.truth.Truth.assertWithMessage; import android.app.Instrumentation; import android.content.Context; 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.Until; import android.text.format.DateUtils; +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/Android.mk b/tests/uitests/Android.mk index 89f9133cd69..fb7258ce792 100644 --- a/tests/uitests/Android.mk +++ b/tests/uitests/Android.mk @@ -27,7 +27,7 @@ LOCAL_JAVA_LIBRARIES := \ 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 49a2fd110aa..dc6fc15d1cd 100644 --- a/tests/uitests/AndroidManifest.xml +++ b/tests/uitests/AndroidManifest.xml @@ -31,7 +31,7 @@ diff --git a/tests/uitests/AndroidTest.xml b/tests/uitests/AndroidTest.xml index 4162207fa80..50c6a758010 100644 --- a/tests/uitests/AndroidTest.xml +++ b/tests/uitests/AndroidTest.xml @@ -24,7 +24,7 @@