Migrate remainder of frameworks/base to androidx.test

See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
This commit is contained in:
Brett Chabot
2019-03-01 14:43:20 -08:00
parent a485f9a4f1
commit 502ec7ae4b
113 changed files with 265 additions and 225 deletions

View File

@@ -25,7 +25,7 @@ LOCAL_MODULE_TAGS := tests
# LOCAL_SDK_VERSION := current
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util androidx.test.rules testng
LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util-axt androidx.test.rules testng
LOCAL_JAVA_LIBRARIES := android.test.base

View File

@@ -21,7 +21,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test
androidx.test.rules hamcrest-library
LOCAL_PACKAGE_NAME := KeystoreTests
LOCAL_PRIVATE_PLATFORM_APIS := true

View File

@@ -20,7 +20,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.security.tests"
android:label="Tests for Keystore">
</instrumentation>

View File

@@ -22,16 +22,20 @@ import static org.junit.Assert.assertThat;
import android.os.Parcel;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.ParcelableKeyGenParameterSpec;
import android.security.keystore.KeyProperties;
import android.support.test.runner.AndroidJUnit4;
import android.security.keystore.ParcelableKeyGenParameterSpec;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.math.BigInteger;
import java.security.spec.ECGenParameterSpec;
import java.security.spec.RSAKeyGenParameterSpec;
import java.util.Date;
import javax.security.auth.x500.X500Principal;
import org.junit.Test;
import org.junit.runner.RunWith;
/** Unit tests for {@link ParcelableKeyGenParameterSpec}. */
@RunWith(AndroidJUnit4.class)

View File

@@ -20,10 +20,12 @@ import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import android.security.ParcelableKeyGenParameterSpecTest;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyProperties;
import android.security.ParcelableKeyGenParameterSpecTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -9,7 +9,7 @@ LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
LOCAL_STATIC_JAVA_LIBRARIES := \
mockito-target-minus-junit4 \
android-support-test \
androidx.test.rules \
android-ex-camera2
LOCAL_PACKAGE_NAME := mediaframeworktest

View File

@@ -86,7 +86,7 @@
android:label="MediaFramework integration tests InstrumentationRunner">
</instrumentation>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.mediaframeworktest"
android:label="media framework tests">
</instrumentation>

View File

@@ -21,7 +21,7 @@
<option name="test-tag" value="MediaFrameworkTest" />
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.mediaframeworktest" />
<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>

View File

@@ -28,7 +28,8 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import android.mtp.MtpConstants;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.runner.AndroidJUnit4;
import libcore.net.MimeUtils;

View File

@@ -19,7 +19,7 @@ import subprocess
import sys
INSTRUMENTED_PACKAGE_RUNNER = ('com.android.frameworks.servicestests/'
'android.support.test.runner.AndroidJUnitRunner')
'androidx.test.runner.AndroidJUnitRunner')
PACKAGE_WHITELIST = (
"com.android.server",

View File

@@ -29,7 +29,7 @@ java_library {
// test android dependencies
"platform-test-annotations",
"android-support-test",
"androidx.test.rules",
// test framework dependencies
"mockito-target-inline-minus-junit4",
// "mockito-target-minus-junit4",

View File

@@ -22,7 +22,7 @@
<!--suppress AndroidDomInspection -->
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.google.android.startop.iorap.tests" />
<!--

View File

@@ -44,7 +44,7 @@
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.google.android.startop.iorap.tests" />
<option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
</test>
</configuration>

View File

@@ -14,12 +14,14 @@
package com.google.android.startop.iorap
import android.net.Uri
import android.os.ServiceManager
import android.support.test.filters.MediumTest
import androidx.test.filters.MediumTest
import org.junit.Test
import org.junit.Ignore
import org.mockito.Mockito.*
import org.mockito.Mockito.argThat
import org.mockito.Mockito.eq
import org.mockito.Mockito.inOrder
import org.mockito.Mockito.spy
import org.mockito.Mockito.timeout
// @Ignore("Test is disabled until iorapd is added to init and there's selinux policies for it")
@MediumTest
@@ -27,7 +29,7 @@ class IIorapIntegrationTest {
/**
* @throws ServiceManager.ServiceNotFoundException if iorapd service could not be found
*/
private val iorapService : IIorap by lazy {
private val iorapService: IIorap by lazy {
// TODO: connect to 'iorapd.stub' which doesn't actually do any work other than reply.
IIorap.Stub.asInterface(ServiceManager.getServiceOrThrow("iorapd"))
@@ -39,7 +41,7 @@ class IIorapIntegrationTest {
// A dummy binder stub implementation is required to use with mockito#spy.
// Mockito overrides the methods at runtime and tracks how methods were invoked.
open class DummyTaskListener : ITaskListener.Stub() {
open class DummyTaskListener : ITaskListener.Stub() {
// Note: make parameters nullable to avoid the kotlin IllegalStateExceptions
// from using the mockito matchers (eq, argThat, etc).
override fun onProgress(requestId: RequestId?, result: TaskResult?) {
@@ -49,7 +51,7 @@ class IIorapIntegrationTest {
}
}
private fun testAnyMethod(func : (RequestId) -> Unit) {
private fun testAnyMethod(func: (RequestId) -> Unit) {
val taskListener = spy(DummyTaskListener())!!
try {
@@ -68,14 +70,13 @@ class IIorapIntegrationTest {
// The "stub" behavior of iorapd is that every request immediately gets a response of
// BEGAN,ONGOING,COMPLETED
inOrder.verify(taskListener, timeout(100)).
onProgress(eq(requestId), argThat { it!!.state == TaskResult.STATE_BEGAN })
inOrder.verify(taskListener, timeout(100)).
onProgress(eq(requestId), argThat { it!!.state == TaskResult.STATE_ONGOING })
inOrder.verify(taskListener, timeout(100)).
onComplete(eq(requestId), argThat { it!!.state == TaskResult.STATE_COMPLETED })
inOrder.verify(taskListener, timeout(100))
.onProgress(eq(requestId), argThat { it!!.state == TaskResult.STATE_BEGAN })
inOrder.verify(taskListener, timeout(100))
.onProgress(eq(requestId), argThat { it!!.state == TaskResult.STATE_ONGOING })
inOrder.verify(taskListener, timeout(100))
.onComplete(eq(requestId), argThat { it!!.state == TaskResult.STATE_COMPLETED })
inOrder.verifyNoMoreInteractions()
} finally {
// iorapService.setTaskListener(null)
// FIXME: null is broken, C++ side sees a non-null object.
@@ -96,7 +97,7 @@ class IIorapIntegrationTest {
@Test
fun testOnAppIntentEvent() {
testAnyMethod { requestId : RequestId ->
testAnyMethod { requestId: RequestId ->
iorapService.onAppIntentEvent(requestId, AppIntentEvent.createDefaultIntentChanged(
ActivityInfo("dont care", "dont care"),
ActivityInfo("dont care 2", "dont care 2")))
@@ -105,7 +106,7 @@ class IIorapIntegrationTest {
@Test
fun testOnSystemServiceEvent() {
testAnyMethod { requestId : RequestId ->
testAnyMethod { requestId: RequestId ->
iorapService.onSystemServiceEvent(requestId,
SystemServiceEvent(SystemServiceEvent.TYPE_START))
}
@@ -113,9 +114,9 @@ class IIorapIntegrationTest {
@Test
fun testOnSystemServiceUserEvent() {
testAnyMethod { requestId : RequestId ->
testAnyMethod { requestId: RequestId ->
iorapService.onSystemServiceUserEvent(requestId,
SystemServiceUserEvent(SystemServiceUserEvent.TYPE_START_USER,0))
SystemServiceUserEvent(SystemServiceUserEvent.TYPE_START_USER, 0))
}
}
}

View File

@@ -17,7 +17,7 @@ package com.google.android.startop.iorap
import android.net.Uri
import android.os.Parcel
import android.os.Parcelable
import android.support.test.filters.SmallTest
import androidx.test.filters.SmallTest
import org.junit.Test
import org.junit.runner.RunWith
import com.google.common.truth.Truth.assertThat
@@ -29,7 +29,7 @@ import org.junit.runners.Parameterized
*/
@SmallTest
@RunWith(Parameterized::class)
class ParcelablesTest<T : Parcelable>(private val inputData : InputData<T>) {
class ParcelablesTest<T : Parcelable>(private val inputData: InputData<T>) {
companion object {
private val initialRequestId = RequestId.nextValueForSequence()!!
@@ -73,19 +73,19 @@ class ParcelablesTest<T : Parcelable>(private val inputData : InputData<T>) {
TaskResult(TaskResult.STATE_ONGOING))
)
private fun newActivityInfo() : ActivityInfo {
private fun newActivityInfo(): ActivityInfo {
return ActivityInfo("some package", "some activity")
}
private fun newActivityInfoOther() : ActivityInfo {
private fun newActivityInfoOther(): ActivityInfo {
return ActivityInfo("some package 2", "some activity 2")
}
private fun newUri() : Uri {
private fun newUri(): Uri {
return Uri.parse("https://www.google.com")
}
private fun cloneRequestId(requestId: RequestId) : RequestId {
private fun cloneRequestId(requestId: RequestId): RequestId {
val constructor = requestId::class.java.declaredConstructors[0]
constructor.isAccessible = true
return constructor.newInstance(requestId.requestId) as RequestId
@@ -108,7 +108,7 @@ class ParcelablesTest<T : Parcelable>(private val inputData : InputData<T>) {
@Test
fun testParcelRoundTrip() {
// calling writeToParcel and then T::CREATOR.createFromParcel would return the same data.
val assertParcels = { it : T, data : InputData<T> ->
val assertParcels = { it: T, data: InputData<T> ->
val parcel = Parcel.obtain()
it.writeToParcel(parcel, 0)
parcel.setDataPosition(0) // future reads will see all previous writes.
@@ -121,7 +121,7 @@ class ParcelablesTest<T : Parcelable>(private val inputData : InputData<T>) {
assertParcels(inputData.validOther, inputData)
}
data class InputData<T : Parcelable>(val valid : T, val validCopy : T, val validOther : T) {
data class InputData<T : Parcelable>(val valid: T, val validCopy: T, val validOther: T) {
val kls = valid.javaClass
init {
assertThat(valid).isNotSameAs(validCopy)
@@ -130,8 +130,8 @@ class ParcelablesTest<T : Parcelable>(private val inputData : InputData<T>) {
assertThat(validOther.javaClass).isEqualTo(valid.javaClass)
}
fun createFromParcel(parcel : Parcel) : T {
val field = kls.getDeclaredField("CREATOR")
fun createFromParcel(parcel: Parcel): T {
val field = kls.getDeclaredField("CREATOR")
val creator = field.get(null) as Parcelable.Creator<T>
return creator.createFromParcel(parcel)

View File

@@ -43,7 +43,7 @@ android_test {
sdk_version: "current",
data: [":generate_dex_testcases", ":generate_compiled_layout1", ":generate_compiled_layout2"],
static_libs: [
"android-support-test",
"androidx.test.rules",
"guava",
],
manifest: "AndroidManifest.xml",

View File

@@ -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.startop.test"
android:label="DexBuilder Tests"/>

View File

@@ -31,6 +31,6 @@
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="android.startop.test" />
<option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
</test>
</configuration>

View File

@@ -14,18 +14,14 @@
package android.startop.test;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import com.google.common.io.ByteStreams;
import dalvik.system.InMemoryDexClassLoader;
import dalvik.system.PathClassLoader;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import org.junit.Assert;
import org.junit.Test;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
// Adding tests here requires changes in several other places. See README.md in
// the view_compiler directory for more information.
public class DexBuilderTest {

View File

@@ -15,18 +15,15 @@
package android.startop.test;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.view.View;
import com.google.common.io.ByteStreams;
import dalvik.system.InMemoryDexClassLoader;
import androidx.test.InstrumentationRegistry;
import dalvik.system.PathClassLoader;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import org.junit.Assert;
import org.junit.Test;
import java.lang.reflect.Method;
// Adding tests here requires changes in several other places. See README.md in
// the view_compiler directory for more information.
public class LayoutCompilerTest {

View File

@@ -21,7 +21,7 @@ LOCAL_SRC_FILES := \
$(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
androidx.test.rules \
apct-perftests-utils \
ActivityManagerPerfTestsUtils

View File

@@ -25,6 +25,6 @@
<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="com.android.frameworks.perftests.amtests"/>
</manifest>

View File

@@ -24,6 +24,6 @@
<option name="test-tag" value="ActivityManagerPerfTests"/>
<test class="com.android.tradefed.testtype.AndroidJUnitTest">
<option name="package" value="com.android.frameworks.perftests.amtests"/>
<option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner"/>
</test>
</configuration>

View File

@@ -21,7 +21,8 @@ import android.content.Intent;
import android.content.ServiceConnection;
import android.perftests.utils.ManualBenchmarkState;
import android.perftests.utils.PerfManualStatusReporter;
import android.support.test.InstrumentationRegistry;
import androidx.test.InstrumentationRegistry;
import com.android.frameworks.perftests.am.util.TargetPackageUtils;
import com.android.frameworks.perftests.am.util.TimeReceiver;

View File

@@ -17,8 +17,9 @@
package com.android.frameworks.perftests.am.tests;
import android.content.Intent;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.perftests.am.util.Constants;

View File

@@ -17,8 +17,9 @@
package com.android.frameworks.perftests.am.tests;
import android.content.ContentProviderClient;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.perftests.am.util.TargetPackageUtils;

View File

@@ -21,8 +21,9 @@ import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.perftests.am.util.Constants;
import com.android.frameworks.perftests.am.util.TargetPackageUtils;

View File

@@ -19,8 +19,9 @@ package com.android.frameworks.perftests.am.tests;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.perftests.am.util.Constants;
import com.android.frameworks.perftests.am.util.TargetPackageUtils;

View File

@@ -23,7 +23,7 @@ LOCAL_SRC_FILES := \
src/com/android/frameworks/perftests/am/util/ITimeReceiverCallback.aidl
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
androidx.test.rules \
junit \
ub-uiautomator

View File

@@ -19,10 +19,11 @@ package com.android.frameworks.perftests.am.util;
import android.content.Intent;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.UiDevice;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
import java.io.IOException;
public class Utils {

View File

@@ -12,7 +12,7 @@ LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.base android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
LOCAL_COMPATIBILITY_SUITE := device-tests

View File

@@ -30,11 +30,12 @@ import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.UserHandle;
import android.support.test.rule.logging.AtraceLogger;
import android.test.InstrumentationTestCase;
import android.test.InstrumentationTestRunner;
import android.util.Log;
import androidx.test.rule.logging.AtraceLogger;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
@@ -51,6 +52,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* This test is intended to measure the time it takes for the apps to start.
* Names of the applications are passed in command line, and the

View File

@@ -12,7 +12,7 @@ LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.base android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
LOCAL_COMPATIBILITY_SUITE := device-tests

View File

@@ -30,16 +30,16 @@ import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.UserHandle;
import android.support.test.rule.logging.AtraceLogger;
import android.test.InstrumentationTestCase;
import android.test.InstrumentationTestRunner;
import android.util.Log;
import androidx.test.rule.logging.AtraceLogger;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -52,6 +52,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* This test is intended to measure the time it takes for the apps to start.
* Names of the applications are passed in command line, and the

View File

@@ -24,7 +24,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
androidx.test.rules \
LOCAL_PACKAGE_NAME := BackgroundDexOptServiceIntegrationTests
LOCAL_PRIVATE_PLATFORM_APIS := true

View File

@@ -34,7 +34,7 @@
</application>
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.frameworks.bgdexopttest"
android:label="Integration test for BackgroundDexOptService" />
</manifest>

View File

@@ -50,6 +50,6 @@
<option name="test-tag" value="BackgroundDexOptServiceIntegrationTests"/>
<test class="com.android.tradefed.testtype.AndroidJUnitTest">
<option name="package" value="com.android.frameworks.bgdexopttest"/>
<option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner"/>
</test>
</configuration>

View File

@@ -17,17 +17,16 @@
package com.android.server.pm;
import android.app.AlarmManager;
import android.app.UiAutomation;
import android.content.Context;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.SystemProperties;
import android.os.storage.StorageManager;
import android.support.test.InstrumentationRegistry;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;

View File

@@ -20,6 +20,6 @@ LOCAL_PACKAGE_NAME := CameraTooTests
LOCAL_INSTRUMENTATION_FOR := CameraToo
LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test mockito-target-minus-junit4
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules mockito-target-minus-junit4
include $(BUILD_PACKAGE)

View File

@@ -23,7 +23,7 @@
<application android:label="CameraToo">
<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="com.example.android.camera2.cameratoo"
android:label="CameraToo tests" />
</manifest>

View File

@@ -17,7 +17,7 @@ include $(CLEAR_VARS)
# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
# Include all test java files.
LOCAL_SRC_FILES := \
$(call all-java-files-under, src)

View File

@@ -33,10 +33,11 @@ import android.os.Bundle;
import android.os.DropBoxManager;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;

View File

@@ -16,7 +16,7 @@
package com.android.compatibilitytest;
import android.support.test.runner.AndroidJUnitRunner;
import androidx.test.runner.AndroidJUnitRunner;
// empty subclass to maintain backwards compatibility on host-side harness
public class AppCompatibilityRunner extends AndroidJUnitRunner {}

View File

@@ -67,7 +67,7 @@ LOCAL_CERTIFICATE := shared
LOCAL_SRC_FILES := $(call all-java-files-under, src/com/android/server/pm)
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
androidx.test.rules \
truth-prebuilt \
# Include both versions of the .so if we have 2 arch

View File

@@ -29,7 +29,7 @@
</application>
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.frameworks.dynamiccodeloggertest"
android:label="Integration test for DynamicCodeLogger" />
</manifest>

View File

@@ -24,7 +24,7 @@
<test class="com.android.tradefed.testtype.AndroidJUnitTest">
<option name="package" value="com.android.frameworks.dynamiccodeloggertest"/>
<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>

View File

@@ -24,11 +24,12 @@ import android.content.Context;
import android.os.Build;
import android.os.ParcelFileDescriptor;
import android.os.SystemClock;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.util.EventLog;
import android.util.EventLog.Event;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import dalvik.system.DexClassLoader;
import org.junit.Before;

View File

@@ -29,7 +29,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="com.android.server.wm.flicker"
android:label="WindowManager Flicker Tests">
</instrumentation>

View File

@@ -24,7 +24,7 @@ LOCAL_CERTIFICATE := platform
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
ub-janktesthelper \
androidx.test.janktesthelper \
cts-amwm-util \
platformprotosnano \
layersprotosnano \
@@ -41,7 +41,7 @@ LOCAL_SRC_FILES := src/com/android/server/wm/flicker/AutomationUtils.java \
src/com/android/server/wm/flicker/WindowUtils.java
LOCAL_STATIC_JAVA_LIBRARIES := sysui-helper \
launcher-helper-lib \
compatibility-device-util
compatibility-device-util-axt
include $(BUILD_STATIC_JAVA_LIBRARY)

View File

@@ -30,7 +30,6 @@ import android.content.pm.PackageManager;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.RemoteException;
import android.support.test.InstrumentationRegistry;
import android.support.test.launcherhelper.LauncherStrategyFactory;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.BySelector;
@@ -43,6 +42,8 @@ import android.util.Rational;
import android.view.View;
import android.view.ViewConfiguration;
import androidx.test.InstrumentationRegistry;
/**
* Collection of UI Automation helper functions.
*/

View File

@@ -18,9 +18,10 @@ package com.android.server.wm.flicker;
import android.annotation.Nullable;
import android.support.annotation.VisibleForTesting;
import android.support.test.InstrumentationRegistry;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
import com.android.server.wm.flicker.monitor.ITransitionMonitor;
import com.android.server.wm.flicker.monitor.LayersTraceMonitor;
import com.android.server.wm.flicker.monitor.ScreenRecorder;

View File

@@ -20,10 +20,11 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.Rect;
import android.support.test.InstrumentationRegistry;
import android.view.Surface;
import android.view.WindowManager;
import androidx.test.InstrumentationRegistry;
/**
* Helper functions to retrieve system window sizes and positions.
*/

View File

@@ -25,7 +25,7 @@ import android.view.FrameStats;
/**
* Monitors {@link android.view.WindowAnimationFrameStats} to detect janky frames.
*
* Adapted from {@link android.support.test.jank.internal.WindowAnimationFrameStatsMonitorImpl}
* Adapted from {@link androidx.test.jank.internal.WindowAnimationFrameStatsMonitorImpl}
* using the same threshold to determine jank.
*/
public class WindowAnimationFrameStatsMonitor implements ITransitionMonitor {

View File

@@ -25,7 +25,7 @@ LOCAL_COMPATIBILITY_SUITE := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
androidx.test.rules \
platform-test-annotations \
truth-prebuilt \
platformprotosnano \

View File

@@ -18,7 +18,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="com.android.server.wm.flicker"
android:label="WindowManager Flicker Lib Test">
</instrumentation>

View File

@@ -26,9 +26,10 @@ import static org.junit.Assert.fail;
import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.support.test.InstrumentationRegistry;
import android.view.WindowManager;
import androidx.test.InstrumentationRegistry;
import org.junit.Test;
import java.util.List;

View File

@@ -17,7 +17,8 @@
package com.android.server.wm.flicker;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import androidx.test.InstrumentationRegistry;
import com.google.common.io.ByteStreams;

View File

@@ -18,9 +18,7 @@ package com.android.server.wm.flicker.monitor;
import static com.android.server.wm.flicker.AutomationUtils.wakeUpAndGoToHomeScreen;
import static com.google.common.truth.Truth.assertThat;
import android.support.test.InstrumentationRegistry;
import androidx.test.InstrumentationRegistry;
import org.junit.Before;
import org.junit.Ignore;

View File

@@ -25,11 +25,12 @@ import static com.android.server.wm.flicker.WindowUtils.getStatusBarPosition;
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;
import android.graphics.Rect;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.util.Log;
import android.view.Surface;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -20,9 +20,10 @@ import static com.android.server.wm.flicker.CommonTransitions.editTextLoseFocusT
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
import android.platform.helpers.IAppHelper;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;

View File

@@ -20,9 +20,10 @@ import static com.android.server.wm.flicker.CommonTransitions.editTextLoseFocusT
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
import android.platform.helpers.IAppHelper;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;

View File

@@ -30,7 +30,6 @@ import android.content.Context;
import android.content.Intent;
import android.os.RemoteException;
import android.platform.helpers.IAppHelper;
import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
@@ -38,6 +37,8 @@ import android.support.test.uiautomator.Until;
import android.util.Rational;
import android.view.Surface;
import androidx.test.InstrumentationRegistry;
import com.android.server.wm.flicker.TransitionRunner.TransitionBuilder;
/**

View File

@@ -17,12 +17,13 @@
package com.android.server.wm.flicker;
import android.platform.helpers.IAppHelper;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.util.Rational;
import android.view.Surface;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -21,10 +21,11 @@ import static com.android.server.wm.flicker.AutomationUtils.setDefaultWait;
import static com.google.common.truth.Truth.assertWithMessage;
import android.platform.helpers.IAppHelper;
import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.UiDevice;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
import com.android.server.wm.flicker.TransitionRunner.TransitionResult;
import org.junit.After;

View File

@@ -20,9 +20,9 @@ import static com.android.server.wm.flicker.CommonTransitions.getOpenAppCold;
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;

View File

@@ -19,9 +19,9 @@ package com.android.server.wm.flicker;
import static com.android.server.wm.flicker.CommonTransitions.appToSplitScreen;
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;

View File

@@ -20,9 +20,9 @@ import static com.android.server.wm.flicker.CommonTransitions.openAppWarm;
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;

View File

@@ -19,8 +19,8 @@ package com.android.server.wm.flicker;
import static com.android.server.wm.flicker.CommonTransitions.editTextSetFocus;
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;

View File

@@ -25,11 +25,12 @@ import static com.google.common.truth.Truth.assertThat;
import android.graphics.Rect;
import android.platform.helpers.IAppHelper;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import android.util.Rational;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -27,10 +27,11 @@ import static com.android.server.wm.flicker.testapp.ActivityOptions.SEAMLESS_ACT
import android.content.Intent;
import android.graphics.Rect;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.view.Surface;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -19,10 +19,10 @@ package com.android.server.wm.flicker;
import static com.android.server.wm.flicker.CommonTransitions.splitScreenToLauncher;
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.FlakyTest;
import android.support.test.filters.LargeTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;

View File

@@ -11,7 +11,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_STATIC_JAVA_LIBRARIES := junit \
android-support-test \
androidx.test.rules \
mockito-target-minus-junit4
LOCAL_JAVA_RESOURCE_DIRS := res

View File

@@ -38,7 +38,7 @@
</service>
</application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.internal.tests"
android:label="Internal Tests" />
</manifest>

View File

@@ -24,6 +24,6 @@
<option name="test-tag" value="InternalTests" />
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.internal.tests" />
<option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
</test>
</configuration>

View File

@@ -20,8 +20,9 @@ import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Assert;
import org.junit.Test;

View File

@@ -26,9 +26,10 @@ import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Parcel;
import android.service.wallpaper.WallpaperService;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -20,7 +20,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import android.support.test.filters.SmallTest;
import androidx.test.filters.SmallTest;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -27,9 +27,10 @@ import android.app.WallpaperColors;
import android.app.WallpaperManager;
import android.content.Context;
import android.graphics.Color;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.internal.colorextraction.ColorExtractor.GradientColors;
import com.android.internal.colorextraction.types.ExtractionType;

View File

@@ -20,11 +20,12 @@ import static org.junit.Assert.assertTrue;
import android.app.WallpaperColors;
import android.graphics.Color;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.util.Range;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.internal.colorextraction.ColorExtractor.GradientColors;
import com.android.internal.graphics.ColorUtils;

View File

@@ -16,13 +16,14 @@
package com.android.internal.graphics;
import static org.junit.Assert.assertTrue;
import android.graphics.Color;
import android.support.test.filters.SmallTest;
import androidx.test.filters.SmallTest;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
@SmallTest
public class ColorUtilsTest {

View File

@@ -20,8 +20,9 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import android.annotation.SuppressLint;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Assert;
import org.junit.Before;

View File

@@ -22,7 +22,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_JAVA_LIBRARIES := \
junit \
frameworks-base-testutils \
android-support-test \
androidx.test.rules \
services.core
LOCAL_JAVA_LIBRARIES := \

View File

@@ -22,7 +22,7 @@
</application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.tests.packagewatchdog"
android:label="PackageWatchdog Test"/>
</manifest>

View File

@@ -24,7 +24,8 @@ import static org.junit.Assert.assertTrue;
import android.content.pm.VersionedPackage;
import android.os.test.TestLooper;
import android.support.test.InstrumentationRegistry;
import androidx.test.InstrumentationRegistry;
import com.android.server.PackageWatchdog.PackageHealthObserver;
import com.android.server.PackageWatchdog.PackageHealthObserverImpact;

View File

@@ -11,7 +11,7 @@ LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
LOCAL_STATIC_JAVA_LIBRARIES := junit android-support-test mockito-target-minus-junit4 truth-prebuilt
LOCAL_STATIC_JAVA_LIBRARIES := junit androidx.test.rules mockito-target-minus-junit4 truth-prebuilt
include $(BUILD_PACKAGE)

View File

@@ -6,6 +6,6 @@
<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="com.android.tests.rcs"/>
</manifest>

View File

@@ -19,10 +19,11 @@ import static com.google.common.truth.Truth.assertThat;
import android.net.Uri;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsGroupThreadIconChangedEvent;
import android.telephony.ims.RcsGroupThreadIconChangedEventDescriptor;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -18,10 +18,11 @@ package com.android.tests.ims;
import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsGroupThreadNameChangedEvent;
import android.telephony.ims.RcsGroupThreadNameChangedEventDescriptor;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -18,10 +18,11 @@ package com.android.tests.ims;
import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsGroupThreadParticipantJoinedEvent;
import android.telephony.ims.RcsGroupThreadParticipantJoinedEventDescriptor;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -18,10 +18,11 @@ package com.android.tests.ims;
import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsGroupThreadParticipantLeftEvent;
import android.telephony.ims.RcsGroupThreadParticipantLeftEventDescriptor;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -18,10 +18,11 @@ package com.android.tests.ims;
import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsParticipantAliasChangedEvent;
import android.telephony.ims.RcsParticipantAliasChangedEventDescriptor;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -18,9 +18,10 @@ package com.android.tests.ims;
import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsParticipantQueryParams;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -21,10 +21,11 @@ import static android.telephony.ims.RcsThreadQueryParams.THREAD_TYPE_GROUP;
import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsParticipant;
import android.telephony.ims.RcsThreadQueryParams;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -107,7 +107,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, RollbackTest/src)
LOCAL_PACKAGE_NAME := RollbackTest
LOCAL_MODULE_TAGS := tests
LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
LOCAL_COMPATIBILITY_SUITE := general-tests
LOCAL_JAVA_RESOURCE_FILES := \
$(ROLLBACK_TEST_APP_AV1) \

View File

@@ -20,7 +20,7 @@
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.tests.rollback" />
<option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
<!-- Exclude the StagedRollbackTest tests, which needs to be specially
driven from the StagedRollbackTest host test -->

View File

@@ -24,7 +24,7 @@
</application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.tests.rollback"
android:label="Rollback Test"/>

View File

@@ -21,7 +21,8 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.support.test.InstrumentationRegistry;
import androidx.test.InstrumentationRegistry;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

View File

@@ -20,9 +20,10 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.support.test.InstrumentationRegistry;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

View File

@@ -21,6 +21,11 @@ import static com.android.tests.rollback.RollbackTestUtils.assertRollbackInfoEqu
import static com.android.tests.rollback.RollbackTestUtils.getUniqueRollbackInfoForPackage;
import static com.android.tests.rollback.RollbackTestUtils.processUserData;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import android.Manifest;
import android.app.ActivityManager;
import android.content.BroadcastReceiver;
@@ -31,13 +36,9 @@ import android.content.pm.VersionedPackage;
import android.content.rollback.RollbackInfo;
import android.content.rollback.RollbackManager;
import android.provider.DeviceConfig;
import android.support.test.InstrumentationRegistry;
import android.util.Log;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import androidx.test.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -16,6 +16,11 @@
package com.android.tests.rollback;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -30,13 +35,9 @@ import android.content.rollback.RollbackInfo;
import android.content.rollback.RollbackManager;
import android.os.Handler;
import android.os.HandlerThread;
import android.support.test.InstrumentationRegistry;
import android.util.Log;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import androidx.test.InstrumentationRegistry;
import java.io.IOException;
import java.io.InputStream;

Some files were not shown because too many files have changed in this diff Show More