diff options
author | Brett Chabot <brettchabot@google.com> | 2018-11-05 21:21:35 -0800 |
---|---|---|
committer | Brett Chabot <brettchabot@google.com> | 2018-11-06 10:48:19 -0800 |
commit | ec6bcbceee8fed0f99d1d5d1760b74eead98668a (patch) | |
tree | edf3c2b8c133840243794026f1397d7ba970b514 | |
parent | aad97b2341ba9999ffc47d26dbf6722a98177ff3 (diff) |
Fix FrameworksServicesTests:StorageManagerServiceTest
Use androidx.test not android.support.test.
And remove android.support.test from build by removing unnecessary
frameworks-base-testutils > android.support.test dependency
Bug: 117990406
Test: m checkbuild; atest FrameworksServicesTests:StorageManagerServiceTest
Change-Id: Ia825e0926b46855f9056739441cb21a065692076
6 files changed, 11 insertions, 6 deletions
diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk index 878179bb251d..e2f899555aca 100644 --- a/services/tests/servicestests/Android.mk +++ b/services/tests/servicestests/Android.mk @@ -33,7 +33,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ testables \ testng \ ub-uiautomator\ - platformprotosnano + platformprotosnano \ + hamcrest-library LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl diff --git a/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java index e53518cca21f..69d8e2574d8c 100644 --- a/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java @@ -28,8 +28,9 @@ import android.content.pm.PackageManagerInternal; import android.os.UserHandle; import android.os.UserManagerInternal; import android.os.storage.StorageManagerInternal; -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.Before; import org.junit.Test; diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java index 2b5b812af4c7..a847b6ab105c 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceTestable.java @@ -38,12 +38,13 @@ import android.os.UserHandle; import android.os.UserManager; import android.os.UserManagerInternal; import android.security.KeyChain; -import android.support.annotation.NonNull; import android.telephony.TelephonyManager; import android.util.ArrayMap; import android.util.Pair; import android.view.IWindowManager; +import androidx.annotation.NonNull; + import com.android.internal.util.FunctionalUtils.ThrowingRunnable; import com.android.internal.widget.LockPatternUtils; import com.android.server.net.NetworkPolicyManagerInternal; diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java index 213961c1e1d9..be00bb662d17 100644 --- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java +++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java @@ -30,11 +30,12 @@ import android.os.Bundle; import android.os.Handler; import android.os.UserHandle; import android.os.UserManagerInternal; -import android.support.annotation.NonNull; import android.test.mock.MockContext; import android.util.ArrayMap; import android.util.ExceptionUtils; +import androidx.annotation.NonNull; + import com.android.internal.util.FunctionalUtils; import org.junit.Assert; diff --git a/services/tests/wmtests/Android.mk b/services/tests/wmtests/Android.mk index dd656c30466e..9655b3d1e258 100644 --- a/services/tests/wmtests/Android.mk +++ b/services/tests/wmtests/Android.mk @@ -23,6 +23,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ truth-prebuilt \ testables \ ub-uiautomator \ + hamcrest-library LOCAL_JAVA_LIBRARIES := \ android.test.mock \ diff --git a/tests/utils/testutils/Android.bp b/tests/utils/testutils/Android.bp index 4be6534ce857..0a9e964d8d8d 100644 --- a/tests/utils/testutils/Android.bp +++ b/tests/utils/testutils/Android.bp @@ -19,7 +19,7 @@ java_library { srcs: ["java/**/*.java"], - static_libs: ["android-support-test"], + static_libs: ["junit"], libs: [ "android.test.runner", |