Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
diff --git a/tests/Android.mk b/tests/Android.mk
index 180fc0c..1531c32 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -17,8 +17,11 @@
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 @@
# 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 b217847..5d5af4f 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.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.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 0185f13..5befeb9 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.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 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 e270b46..d64f86c 100644
--- a/tests/tapl/com/android/launcher3/tapl/AllApps.java
+++ b/tests/tapl/com/android/launcher3/tapl/AllApps.java
@@ -18,11 +18,12 @@
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 7ed2dc2..07e73fc 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 436e5ff..786f260 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 b02ff93..fa282c3 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.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 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 9493990..3c0ae2d 100644
--- a/tests/tapl/com/android/launcher3/tapl/Overview.java
+++ b/tests/tapl/com/android/launcher3/tapl/Overview.java
@@ -19,13 +19,14 @@
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 045ab5f..c58c244 100644
--- a/tests/tapl/com/android/launcher3/tapl/Workspace.java
+++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java
@@ -19,12 +19,13 @@
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.
*/