diff options
Diffstat (limited to 'tests')
22 files changed, 104 insertions, 69 deletions
diff --git a/tests/CoreTests/android/Android.bp b/tests/CoreTests/android/Android.bp index e2f194b04437..97a6e5fd4d1b 100644 --- a/tests/CoreTests/android/Android.bp +++ b/tests/CoreTests/android/Android.bp @@ -16,5 +16,8 @@ android_test { "android.test.base.stubs", ], sdk_version: "current", - static_libs: ["junit"], + static_libs: [ + "junit", + "androidx.test.rules", + ], } diff --git a/tests/CoreTests/android/core/RequestAPITest.java b/tests/CoreTests/android/core/RequestAPITest.java index 206f228c3804..2d420d30b299 100644 --- a/tests/CoreTests/android/core/RequestAPITest.java +++ b/tests/CoreTests/android/core/RequestAPITest.java @@ -19,10 +19,11 @@ package android.core; import android.net.http.RequestHandle; import android.net.http.RequestQueue; import android.test.AndroidTestCase; -import android.test.suitebuilder.annotation.Suppress; import android.util.Log; import android.webkit.CookieSyncManager; +import androidx.test.filters.Suppress; + import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.HashMap; diff --git a/tests/FlickerTests/Android.bp b/tests/FlickerTests/Android.bp index 1d71f95ef64f..d658d5991a57 100644 --- a/tests/FlickerTests/Android.bp +++ b/tests/FlickerTests/Android.bp @@ -63,17 +63,20 @@ java_library { ], } -android_library_import { - name: "wm-flicker-window-extensions_nodeps", - aars: ["libs/window-extensions-release.aar"], +java_library { + name: "wm-flicker-window-extensions", sdk_version: "current", + static_libs: [ + "androidx.window.extensions_extensions-nodeps", + ], + installable: false, } java_library { - name: "wm-flicker-window-extensions", + name: "wm-flicker-window-extensions-core", sdk_version: "current", static_libs: [ - "wm-flicker-window-extensions_nodeps", + "androidx.window.extensions.core_core-nodeps", ], installable: false, } diff --git a/tests/FlickerTests/AppLaunch/src/com/android/server/wm/flicker/launch/OpenAppFromIntentColdAfterCameraTest.kt b/tests/FlickerTests/AppLaunch/src/com/android/server/wm/flicker/launch/OpenAppFromIntentColdAfterCameraTest.kt index d47329ea97b4..57da05f13bbb 100644 --- a/tests/FlickerTests/AppLaunch/src/com/android/server/wm/flicker/launch/OpenAppFromIntentColdAfterCameraTest.kt +++ b/tests/FlickerTests/AppLaunch/src/com/android/server/wm/flicker/launch/OpenAppFromIntentColdAfterCameraTest.kt @@ -52,6 +52,7 @@ class OpenAppFromIntentColdAfterCameraTest(flicker: LegacyFlickerTest) : // Can't use TAPL due to Recents not showing in 3 Button Nav in full screen mode device.pressHome() tapl.getWorkspace() + wmHelper.StateSyncBuilder().withHomeActivityVisible().waitForAndVerify() } teardown { testApp.exit(wmHelper) } transitions { testApp.launchViaIntent(wmHelper) } diff --git a/tests/FlickerTests/libs/window-extensions-release.aar b/tests/FlickerTests/libs/window-extensions-release.aar Binary files differdeleted file mode 100644 index 918e514f4c89..000000000000 --- a/tests/FlickerTests/libs/window-extensions-release.aar +++ /dev/null diff --git a/tests/GamePerformance/src/android/gameperformance/GamePerformanceTest.java b/tests/GamePerformance/src/android/gameperformance/GamePerformanceTest.java index d6e2861c03a7..cc0255d4140a 100644 --- a/tests/GamePerformance/src/android/gameperformance/GamePerformanceTest.java +++ b/tests/GamePerformance/src/android/gameperformance/GamePerformanceTest.java @@ -15,6 +15,14 @@ */ package android.gameperformance; +import android.annotation.NonNull; +import android.app.Activity; +import android.os.Bundle; +import android.test.ActivityInstrumentationTestCase2; +import android.util.Log; + +import androidx.test.filters.SmallTest; + import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -22,18 +30,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; -import android.annotation.NonNull; -import android.app.Activity; -import android.content.Context; -import android.graphics.PixelFormat; -import android.os.Build; -import android.os.Bundle; -import android.os.Debug; -import android.os.Trace; -import android.test.ActivityInstrumentationTestCase2; -import android.test.suitebuilder.annotation.SmallTest; -import android.util.Log; - public class GamePerformanceTest extends ActivityInstrumentationTestCase2<GamePerformanceActivity> { private final static String TAG = "GamePerformanceTest"; diff --git a/tests/Input/src/com/android/server/input/KeyboardLayoutManagerTests.kt b/tests/Input/src/com/android/server/input/KeyboardLayoutManagerTests.kt index 7343ba1c1ce7..e60764f137af 100644 --- a/tests/Input/src/com/android/server/input/KeyboardLayoutManagerTests.kt +++ b/tests/Input/src/com/android/server/input/KeyboardLayoutManagerTests.kt @@ -24,6 +24,7 @@ import android.content.pm.ApplicationInfo import android.content.pm.PackageManager import android.content.pm.ResolveInfo import android.content.pm.ServiceInfo +import android.hardware.input.KeyboardLayoutSelectionResult import android.hardware.input.IInputManager import android.hardware.input.InputManager import android.hardware.input.InputManagerGlobal @@ -525,13 +526,13 @@ class KeyboardLayoutManagerTests { keyboardDevice.identifier, USER_ID, imeInfo, imeSubtype, ENGLISH_UK_LAYOUT_DESCRIPTOR ) - val keyboardLayout = + assertEquals( + "Default UI: getKeyboardLayoutForInputDevice API should always return " + + "KeyboardLayoutSelectionResult.FAILED", + KeyboardLayoutSelectionResult.FAILED, keyboardLayoutManager.getKeyboardLayoutForInputDevice( keyboardDevice.identifier, USER_ID, imeInfo, imeSubtype ) - assertNull( - "Default UI: getKeyboardLayoutForInputDevice API should always return null", - keyboardLayout ) } } @@ -545,12 +546,14 @@ class KeyboardLayoutManagerTests { keyboardDevice.identifier, USER_ID, imeInfo, imeSubtype, ENGLISH_UK_LAYOUT_DESCRIPTOR ) - assertEquals( - "New UI: getKeyboardLayoutForInputDevice API should return the set layout", - ENGLISH_UK_LAYOUT_DESCRIPTOR, + var result = keyboardLayoutManager.getKeyboardLayoutForInputDevice( keyboardDevice.identifier, USER_ID, imeInfo, imeSubtype ) + assertEquals( + "New UI: getKeyboardLayoutForInputDevice API should return the set layout", + ENGLISH_UK_LAYOUT_DESCRIPTOR, + result.layoutDescriptor ) // This should replace previously set layout @@ -558,12 +561,14 @@ class KeyboardLayoutManagerTests { keyboardDevice.identifier, USER_ID, imeInfo, imeSubtype, ENGLISH_US_LAYOUT_DESCRIPTOR ) - assertEquals( - "New UI: getKeyboardLayoutForInputDevice API should return the last set layout", - ENGLISH_US_LAYOUT_DESCRIPTOR, + result = keyboardLayoutManager.getKeyboardLayoutForInputDevice( keyboardDevice.identifier, USER_ID, imeInfo, imeSubtype ) + assertEquals( + "New UI: getKeyboardLayoutForInputDevice API should return the last set layout", + ENGLISH_US_LAYOUT_DESCRIPTOR, + result.layoutDescriptor ) } } @@ -734,17 +739,20 @@ class KeyboardLayoutManagerTests { createImeSubtypeForLanguageTag("ru"), createLayoutDescriptor("keyboard_layout_russian") ) - assertNull( - "New UI: getDefaultKeyboardLayoutForInputDevice should return null when no " + - "layout available", + assertEquals( + "New UI: getDefaultKeyboardLayoutForInputDevice should return " + + "KeyboardLayoutSelectionResult.FAILED when no layout available", + KeyboardLayoutSelectionResult.FAILED, keyboardLayoutManager.getKeyboardLayoutForInputDevice( keyboardDevice.identifier, USER_ID, imeInfo, createImeSubtypeForLanguageTag("it") ) ) - assertNull( - "New UI: getDefaultKeyboardLayoutForInputDevice should return null when no " + - "layout for script code is available", + assertEquals( + "New UI: getDefaultKeyboardLayoutForInputDevice should return " + + "KeyboardLayoutSelectionResult.FAILED when no layout for script code is" + + "available", + KeyboardLayoutSelectionResult.FAILED, keyboardLayoutManager.getKeyboardLayoutForInputDevice( keyboardDevice.identifier, USER_ID, imeInfo, createImeSubtypeForLanguageTag("en-Deva") @@ -811,8 +819,10 @@ class KeyboardLayoutManagerTests { createImeSubtypeForLanguageTagAndLayoutType("ru", ""), createLayoutDescriptor("keyboard_layout_russian") ) - assertNull("New UI: getDefaultKeyboardLayoutForInputDevice should return null when " + - "no layout for script code is available", + assertEquals("New UI: getDefaultKeyboardLayoutForInputDevice should return " + + "KeyboardLayoutSelectionResult.FAILED when no layout for script code is" + + "available", + KeyboardLayoutSelectionResult.FAILED, keyboardLayoutManager.getKeyboardLayoutForInputDevice( keyboardDevice.identifier, USER_ID, imeInfo, createImeSubtypeForLanguageTagAndLayoutType("en-Deva-US", "") @@ -865,14 +875,16 @@ class KeyboardLayoutManagerTests { ArgumentMatchers.anyBoolean(), ArgumentMatchers.eq(keyboardDevice.vendorId), ArgumentMatchers.eq(keyboardDevice.productId), - ArgumentMatchers.eq(createByteArray( + ArgumentMatchers.eq( + createByteArray( KeyboardMetricsCollector.DEFAULT_LANGUAGE_TAG, LAYOUT_TYPE_DEFAULT, GERMAN_LAYOUT_NAME, - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD, + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD, "de-Latn", - LAYOUT_TYPE_QWERTZ), + LAYOUT_TYPE_QWERTZ ), + ), ArgumentMatchers.eq(keyboardDevice.deviceBus), ) } @@ -893,13 +905,16 @@ class KeyboardLayoutManagerTests { ArgumentMatchers.anyBoolean(), ArgumentMatchers.eq(englishQwertyKeyboardDevice.vendorId), ArgumentMatchers.eq(englishQwertyKeyboardDevice.productId), - ArgumentMatchers.eq(createByteArray( + ArgumentMatchers.eq( + createByteArray( "en", LAYOUT_TYPE_QWERTY, ENGLISH_US_LAYOUT_NAME, - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_DEVICE, + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEVICE, "de-Latn", - LAYOUT_TYPE_QWERTZ)), + LAYOUT_TYPE_QWERTZ + ) + ), ArgumentMatchers.eq(keyboardDevice.deviceBus), ) } @@ -918,14 +933,16 @@ class KeyboardLayoutManagerTests { ArgumentMatchers.anyBoolean(), ArgumentMatchers.eq(keyboardDevice.vendorId), ArgumentMatchers.eq(keyboardDevice.productId), - ArgumentMatchers.eq(createByteArray( + ArgumentMatchers.eq( + createByteArray( KeyboardMetricsCollector.DEFAULT_LANGUAGE_TAG, LAYOUT_TYPE_DEFAULT, "Default", - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_DEFAULT, + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEFAULT, KeyboardMetricsCollector.DEFAULT_LANGUAGE_TAG, - LAYOUT_TYPE_DEFAULT), + LAYOUT_TYPE_DEFAULT ), + ), ArgumentMatchers.eq(keyboardDevice.deviceBus), ) } @@ -998,12 +1015,13 @@ class KeyboardLayoutManagerTests { imeSubtype: InputMethodSubtype, expectedLayout: String ) { + val result = keyboardLayoutManager.getKeyboardLayoutForInputDevice( + device.identifier, USER_ID, imeInfo, imeSubtype + ) assertEquals( "New UI: getDefaultKeyboardLayoutForInputDevice should return $expectedLayout", expectedLayout, - keyboardLayoutManager.getKeyboardLayoutForInputDevice( - device.identifier, USER_ID, imeInfo, imeSubtype - ) + result.layoutDescriptor ) } diff --git a/tests/Input/src/com/android/server/input/KeyboardMetricsCollectorTests.kt b/tests/Input/src/com/android/server/input/KeyboardMetricsCollectorTests.kt index 89a47b9b736a..0615941eda09 100644 --- a/tests/Input/src/com/android/server/input/KeyboardMetricsCollectorTests.kt +++ b/tests/Input/src/com/android/server/input/KeyboardMetricsCollectorTests.kt @@ -17,6 +17,7 @@ package com.android.server.input import android.hardware.input.KeyboardLayout +import android.hardware.input.KeyboardLayoutSelectionResult import android.icu.util.ULocale import android.platform.test.annotations.Presubmit import android.view.InputDevice @@ -120,15 +121,15 @@ class KeyboardMetricsCollectorTests { val event = builder.addLayoutSelection( createImeSubtype(1, ULocale.forLanguageTag("en-US"), "qwerty"), "English(US)(Qwerty)", - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD ).addLayoutSelection( createImeSubtype(2, ULocale.forLanguageTag("en-US"), "azerty"), null, // Default layout type - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_USER + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_USER ).addLayoutSelection( createImeSubtype(3, ULocale.forLanguageTag("en-US"), "qwerty"), "German", - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_DEVICE + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEVICE ).setIsFirstTimeConfiguration(true).build() assertEquals( @@ -158,7 +159,7 @@ class KeyboardMetricsCollectorTests { "de-CH", KeyboardLayout.LayoutType.getLayoutTypeEnumValue("qwertz"), "English(US)(Qwerty)", - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD, + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD, "en-US", KeyboardLayout.LayoutType.getLayoutTypeEnumValue("qwerty"), ) @@ -167,7 +168,7 @@ class KeyboardMetricsCollectorTests { "de-CH", KeyboardLayout.LayoutType.getLayoutTypeEnumValue("qwertz"), KeyboardMetricsCollector.DEFAULT_LAYOUT_NAME, - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_USER, + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_USER, "en-US", KeyboardLayout.LayoutType.getLayoutTypeEnumValue("azerty"), ) @@ -176,7 +177,7 @@ class KeyboardMetricsCollectorTests { "de-CH", KeyboardLayout.LayoutType.getLayoutTypeEnumValue("qwertz"), "German", - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_DEVICE, + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEVICE, "en-US", KeyboardLayout.LayoutType.getLayoutTypeEnumValue("qwerty"), ) @@ -197,7 +198,7 @@ class KeyboardMetricsCollectorTests { val event = builder.addLayoutSelection( createImeSubtype(4, null, "qwerty"), // Default language tag "German", - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_DEVICE + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEVICE ).build() assertExpectedLayoutConfiguration( @@ -205,7 +206,7 @@ class KeyboardMetricsCollectorTests { KeyboardMetricsCollector.DEFAULT_LANGUAGE_TAG, KeyboardLayout.LayoutType.getLayoutTypeEnumValue("azerty"), "German", - KeyboardMetricsCollector.LAYOUT_SELECTION_CRITERIA_DEVICE, + KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEVICE, KeyboardMetricsCollector.DEFAULT_LANGUAGE_TAG, KeyboardLayout.LayoutType.getLayoutTypeEnumValue("qwerty"), ) diff --git a/tests/Internal/src/com/android/internal/protolog/PerfettoDataSourceTest.java b/tests/Internal/src/com/android/internal/protolog/PerfettoDataSourceTest.java index b9f1738f9bb7..a96389046d6a 100644 --- a/tests/Internal/src/com/android/internal/protolog/PerfettoDataSourceTest.java +++ b/tests/Internal/src/com/android/internal/protolog/PerfettoDataSourceTest.java @@ -37,7 +37,7 @@ import perfetto.protos.ProtologConfig; public class PerfettoDataSourceTest { @Before public void before() { - assumeTrue(android.tracing.Flags.perfettoProtolog()); + assumeTrue(android.tracing.Flags.perfettoProtologTracing()); } @Test diff --git a/tests/SurfaceComposition/Android.bp b/tests/SurfaceComposition/Android.bp index f5aba8f5a2f2..a02662fb912e 100644 --- a/tests/SurfaceComposition/Android.bp +++ b/tests/SurfaceComposition/Android.bp @@ -32,7 +32,10 @@ android_test { enabled: false, }, srcs: ["src/**/*.java"], - static_libs: ["junit"], + static_libs: [ + "junit", + "androidx.test.rules", + ], libs: [ "android.test.runner.stubs", "android.test.base.stubs", diff --git a/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java b/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java index 261ea2ec866d..f82585c02c08 100644 --- a/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java +++ b/tests/SurfaceComposition/src/android/surfacecomposition/SurfaceCompositionTest.java @@ -22,9 +22,10 @@ import android.os.Bundle; import android.surfacecomposition.SurfaceCompositionMeasuringActivity.AllocationScore; import android.surfacecomposition.SurfaceCompositionMeasuringActivity.CompositorScore; import android.test.ActivityInstrumentationTestCase2; -import android.test.suitebuilder.annotation.SmallTest; import android.util.Log; +import androidx.test.filters.SmallTest; + public class SurfaceCompositionTest extends ActivityInstrumentationTestCase2<SurfaceCompositionMeasuringActivity> { private final static String TAG = "SurfaceCompositionTest"; diff --git a/tests/graphics/HwAccelerationTest/jni/native-lib.cpp b/tests/graphics/HwAccelerationTest/jni/native-lib.cpp index 407d4bf76336..2977c2157261 100644 --- a/tests/graphics/HwAccelerationTest/jni/native-lib.cpp +++ b/tests/graphics/HwAccelerationTest/jni/native-lib.cpp @@ -30,7 +30,7 @@ struct MyWrapper { void setBuffer(AHardwareBuffer* buffer) { ASurfaceTransaction* transaction = ASurfaceTransaction_create(); - ASurfaceTransaction_setBuffer(transaction, surfaceControl, buffer); + ASurfaceTransaction_setBuffer(transaction, surfaceControl, buffer, -1); ASurfaceTransaction_setVisibility(transaction, surfaceControl, ASURFACE_TRANSACTION_VISIBILITY_SHOW); ASurfaceTransaction_apply(transaction); diff --git a/tests/permission/Android.bp b/tests/permission/Android.bp index d06809b209a0..b02f410c733e 100644 --- a/tests/permission/Android.bp +++ b/tests/permission/Android.bp @@ -20,6 +20,7 @@ android_test { "androidx.test.runner", "junit", "platform-test-annotations", + "androidx.test.rules", ], platform_apis: true, test_suites: ["device-tests"], diff --git a/tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java index 5fb23b0ad507..99ca9c084b54 100644 --- a/tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java +++ b/tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java @@ -21,7 +21,8 @@ import android.app.ActivityTaskManager; import android.app.IActivityManager; import android.content.res.Configuration; import android.os.RemoteException; -import android.test.suitebuilder.annotation.SmallTest; + +import androidx.test.filters.SmallTest; import junit.framework.TestCase; diff --git a/tests/permission/src/com/android/framework/permission/tests/PmPermissionsTests.java b/tests/permission/src/com/android/framework/permission/tests/PmPermissionsTests.java index 299d8d003d9c..0c9d447a3ac1 100644 --- a/tests/permission/src/com/android/framework/permission/tests/PmPermissionsTests.java +++ b/tests/permission/src/com/android/framework/permission/tests/PmPermissionsTests.java @@ -19,7 +19,8 @@ package com.android.framework.permission.tests; import android.app.PackageInstallObserver; import android.content.pm.PackageManager; import android.test.AndroidTestCase; -import android.test.suitebuilder.annotation.SmallTest; + +import androidx.test.filters.SmallTest; /** * Verify PackageManager api's that require specific permissions. diff --git a/tests/permission/src/com/android/framework/permission/tests/SmsManagerPermissionTest.java b/tests/permission/src/com/android/framework/permission/tests/SmsManagerPermissionTest.java index 41727431bd5e..2fa0b2164835 100644 --- a/tests/permission/src/com/android/framework/permission/tests/SmsManagerPermissionTest.java +++ b/tests/permission/src/com/android/framework/permission/tests/SmsManagerPermissionTest.java @@ -18,7 +18,8 @@ package com.android.framework.permission.tests; import android.telephony.SmsManager; import android.test.AndroidTestCase; -import android.test.suitebuilder.annotation.SmallTest; + +import androidx.test.filters.SmallTest; import java.util.ArrayList; diff --git a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java index 330bc84d7a76..e67fd6702f7b 100644 --- a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java +++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java @@ -23,9 +23,10 @@ import android.os.Binder; import android.os.RemoteException; import android.os.ServiceManager; import android.os.UserHandle; -import android.test.suitebuilder.annotation.SmallTest; import android.view.IWindowManager; +import androidx.test.filters.SmallTest; + import junit.framework.TestCase; /** diff --git a/tests/testables/tests/src/android/testing/TestableLooperTest.java b/tests/testables/tests/src/android/testing/TestableLooperTest.java index a02eb6b176dc..fd5c4caca484 100644 --- a/tests/testables/tests/src/android/testing/TestableLooperTest.java +++ b/tests/testables/tests/src/android/testing/TestableLooperTest.java @@ -30,10 +30,11 @@ import static org.mockito.Mockito.when; import android.os.Handler; import android.os.Looper; import android.os.Message; -import android.test.suitebuilder.annotation.SmallTest; import android.testing.TestableLooper.MessageHandler; import android.testing.TestableLooper.RunWithLooper; +import androidx.test.filters.SmallTest; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/tests/testables/tests/src/android/testing/TestableResourcesTest.java b/tests/testables/tests/src/android/testing/TestableResourcesTest.java index dd4325c59aa2..77916944eeea 100644 --- a/tests/testables/tests/src/android/testing/TestableResourcesTest.java +++ b/tests/testables/tests/src/android/testing/TestableResourcesTest.java @@ -21,9 +21,9 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import android.content.res.Resources; -import android.test.suitebuilder.annotation.SmallTest; import androidx.test.InstrumentationRegistry; +import androidx.test.filters.SmallTest; import com.android.testables.R; diff --git a/tests/testables/tests/src/android/testing/TestableSettingsProviderTest.java b/tests/testables/tests/src/android/testing/TestableSettingsProviderTest.java index 0333d514343d..f3f429a39c3c 100644 --- a/tests/testables/tests/src/android/testing/TestableSettingsProviderTest.java +++ b/tests/testables/tests/src/android/testing/TestableSettingsProviderTest.java @@ -20,9 +20,9 @@ import android.content.ContentResolver; import android.provider.Settings; import android.provider.Settings.Global; import android.provider.Settings.Secure; -import android.test.suitebuilder.annotation.SmallTest; import androidx.test.InstrumentationRegistry; +import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import org.junit.Before; diff --git a/tests/utils/testutils/tests/Android.bp b/tests/utils/testutils/tests/Android.bp index b901b1802383..8104280cdd5e 100644 --- a/tests/utils/testutils/tests/Android.bp +++ b/tests/utils/testutils/tests/Android.bp @@ -31,6 +31,7 @@ android_test { "androidx.test.runner", "mockito-target-minus-junit4", "frameworks-base-testutils", + "androidx.test.rules", ], libs: [ diff --git a/tests/utils/testutils/tests/src/android/os/test/TestLooperTest.java b/tests/utils/testutils/tests/src/android/os/test/TestLooperTest.java index c72e20ccc5ba..6205b98d4e79 100644 --- a/tests/utils/testutils/tests/src/android/os/test/TestLooperTest.java +++ b/tests/utils/testutils/tests/src/android/os/test/TestLooperTest.java @@ -28,7 +28,8 @@ import static org.mockito.Mockito.spy; import android.os.Handler; import android.os.Looper; import android.os.Message; -import android.test.suitebuilder.annotation.SmallTest; + +import androidx.test.filters.SmallTest; import org.junit.Before; import org.junit.Rule; |