diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-08-14 15:21:45 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-08-14 15:22:12 -0700 |
commit | d230307a958189041a7d5616e89fb2966011b55e (patch) | |
tree | 0e3684f094f08066de7cb68d49779a60111feded /tests | |
parent | a950d40d0930abff76fd49a322715fd42cad80c9 (diff) | |
download | android_packages_apps_Trebuchet-d230307a958189041a7d5616e89fb2966011b55e.tar.gz android_packages_apps_Trebuchet-d230307a958189041a7d5616e89fb2966011b55e.tar.bz2 android_packages_apps_Trebuchet-d230307a958189041a7d5616e89fb2966011b55e.zip |
Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
Diffstat (limited to 'tests')
9 files changed, 32 insertions, 17 deletions
diff --git a/tests/Android.mk b/tests/Android.mk index 180fc0cb3..1531c32df 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -17,8 +17,11 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := tests -LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator mockito-target-minus-junit4 \ - ub-launcher-aosp-tapl +LOCAL_STATIC_JAVA_LIBRARIES := \ + android-support-test \ + ub-uiautomator \ + mockito-target-minus-junit4 \ + ub-launcher-aosp-tapl LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/AndroidManifest-common.xml @@ -36,7 +39,11 @@ include $(BUILD_PACKAGE) # Build rule for Tapl library. # include $(CLEAR_VARS) -LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator libSharedSystemUI +LOCAL_STATIC_JAVA_LIBRARIES := \ + androidx.annotation_annotation \ + android-support-test \ + ub-uiautomator \ + libSharedSystemUI LOCAL_SRC_FILES := $(call all-java-files-under, tapl) \ ../quickstep/src/com/android/quickstep/SwipeUpSetting.java diff --git a/tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java b/tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java index b217847f5..5d5af4f24 100644 --- a/tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java +++ b/tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java @@ -18,7 +18,6 @@ import android.graphics.Bitmap.Config; import android.graphics.Color; import android.os.Process; import android.os.UserHandle; -import android.support.annotation.NonNull; import android.support.test.InstrumentationRegistry; import android.support.test.rule.provider.ProviderTestRule; @@ -49,6 +48,8 @@ import java.util.HashMap; import java.util.List; import java.util.concurrent.Executor; +import androidx.annotation.NonNull; + /** * Base class for writing tests for Model update tasks. */ diff --git a/tests/src/com/android/launcher3/widget/WidgetsListAdapterTest.java b/tests/src/com/android/launcher3/widget/WidgetsListAdapterTest.java index 0185f130e..5befeb9ab 100644 --- a/tests/src/com/android/launcher3/widget/WidgetsListAdapterTest.java +++ b/tests/src/com/android/launcher3/widget/WidgetsListAdapterTest.java @@ -15,6 +15,11 @@ */ package com.android.launcher3.widget; +import static org.mockito.Matchers.eq; +import static org.mockito.Matchers.isNull; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + import android.appwidget.AppWidgetProviderInfo; import android.content.Context; import android.content.pm.PackageManager; @@ -22,7 +27,6 @@ import android.graphics.Bitmap; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import com.android.launcher3.IconCache; @@ -43,10 +47,7 @@ import org.mockito.MockitoAnnotations; import java.util.ArrayList; import java.util.Map; -import static org.mockito.Matchers.eq; -import static org.mockito.Matchers.isNull; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; +import androidx.recyclerview.widget.RecyclerView; @SmallTest @RunWith(AndroidJUnit4.class) diff --git a/tests/tapl/com/android/launcher3/tapl/AllApps.java b/tests/tapl/com/android/launcher3/tapl/AllApps.java index e270b4605..d64f86cbc 100644 --- a/tests/tapl/com/android/launcher3/tapl/AllApps.java +++ b/tests/tapl/com/android/launcher3/tapl/AllApps.java @@ -18,11 +18,12 @@ package com.android.launcher3.tapl; import static org.junit.Assert.assertTrue; -import android.support.annotation.NonNull; import android.support.test.uiautomator.BySelector; import android.support.test.uiautomator.Direction; import android.support.test.uiautomator.UiObject2; +import androidx.annotation.NonNull; + /** * Operations on AllApps opened from Home. Also a parent for All Apps opened from Overview. */ diff --git a/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java b/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java index 7ed2dc2f6..07e73fc9b 100644 --- a/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java +++ b/tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java @@ -17,9 +17,10 @@ package com.android.launcher3.tapl; import android.graphics.Point; -import android.support.annotation.NonNull; import android.support.test.uiautomator.UiObject2; +import androidx.annotation.NonNull; + /** * Operations on AllApps opened from Overview. */ diff --git a/tests/tapl/com/android/launcher3/tapl/Home.java b/tests/tapl/com/android/launcher3/tapl/Home.java index 436e5ff6b..786f260b8 100644 --- a/tests/tapl/com/android/launcher3/tapl/Home.java +++ b/tests/tapl/com/android/launcher3/tapl/Home.java @@ -16,9 +16,10 @@ package com.android.launcher3.tapl; -import android.support.annotation.NonNull; import android.support.test.uiautomator.UiObject2; +import androidx.annotation.NonNull; + /** * Operations on the home screen. * diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index b02ff93bc..fa282c333 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -26,8 +26,6 @@ import android.app.ActivityManager; import android.app.UiAutomation; import android.os.Bundle; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.support.test.InstrumentationRegistry; import android.support.test.uiautomator.By; import android.support.test.uiautomator.BySelector; @@ -41,6 +39,9 @@ import com.android.quickstep.SwipeUpSetting; import java.lang.ref.WeakReference; import java.util.concurrent.TimeoutException; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + /** * The main tapl object. The only object that can be explicitly constructed by the using code. It * produces all other objects. diff --git a/tests/tapl/com/android/launcher3/tapl/Overview.java b/tests/tapl/com/android/launcher3/tapl/Overview.java index 949399074..3c0ae2daf 100644 --- a/tests/tapl/com/android/launcher3/tapl/Overview.java +++ b/tests/tapl/com/android/launcher3/tapl/Overview.java @@ -19,13 +19,14 @@ package com.android.launcher3.tapl; import static org.junit.Assert.assertNotEquals; import android.graphics.Point; -import android.support.annotation.NonNull; import android.support.test.uiautomator.Direction; import android.support.test.uiautomator.UiObject2; import java.util.Collections; import java.util.List; +import androidx.annotation.NonNull; + /** * Overview pane. */ diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java index 045ab5fcf..c58c24443 100644 --- a/tests/tapl/com/android/launcher3/tapl/Workspace.java +++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java @@ -19,12 +19,13 @@ package com.android.launcher3.tapl; import static junit.framework.TestCase.assertTrue; import android.graphics.Point; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.support.test.uiautomator.Direction; import android.support.test.uiautomator.UiObject2; import android.view.KeyEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + /** * Operations on the workspace screen. */ |