Merge "Re-enable bulk icon loading"
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index cdb8082..488789b 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -464,11 +464,15 @@
return getItemInfo(mTask);
}
- protected WorkspaceItemInfo getItemInfo(Task task) {
- ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key);
+ protected WorkspaceItemInfo getItemInfo(@Nullable Task task) {
WorkspaceItemInfo stubInfo = new WorkspaceItemInfo();
stubInfo.itemType = LauncherSettings.Favorites.ITEM_TYPE_TASK;
stubInfo.container = LauncherSettings.Favorites.CONTAINER_TASKSWITCHER;
+ if (task == null) {
+ return stubInfo;
+ }
+
+ ComponentKey componentKey = TaskUtils.getLaunchComponentKeyForTask(task.key);
stubInfo.user = componentKey.user;
stubInfo.intent = new Intent().setComponent(componentKey.componentName);
stubInfo.title = task.title;
diff --git a/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java b/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java
index 122a130..d0daefc 100644
--- a/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java
+++ b/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java
@@ -64,8 +64,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testDragIconToRightPanel() {
Workspace workspace = mLauncher.getWorkspace();
@@ -79,8 +78,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testSinglePageDragIconWhenMultiplePageScrollingIsPossible() {
Workspace workspace = mLauncher.getWorkspace();
@@ -134,8 +132,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testDragIconToPage2() {
Workspace workspace = mLauncher.getWorkspace();
@@ -151,8 +148,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testDragIconToPage3() {
Workspace workspace = mLauncher.getWorkspace();
@@ -168,8 +164,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testMultiplePageDragIcon() {
Workspace workspace = mLauncher.getWorkspace();
@@ -215,8 +210,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testEmptyPageDoesNotGetRemovedIfPagePairIsNotEmpty() {
Workspace workspace = mLauncher.getWorkspace();
@@ -256,8 +250,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testEmptyPagesGetRemovedIfBothPagesAreEmpty() {
Workspace workspace = mLauncher.getWorkspace();
@@ -284,8 +277,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testMiddleEmptyPagesGetRemoved() {
Workspace workspace = mLauncher.getWorkspace();
diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java
index 6e10b28..4f4ce30 100644
--- a/tests/tapl/com/android/launcher3/tapl/Workspace.java
+++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java
@@ -385,7 +385,8 @@
// Since the destination can be on another page, we need to drag to the edge first
// until we reach the target page
while (targetDest.x > displayX || targetDest.x < 0) {
- int edgeX = targetDest.x > 0 ? displayX : 0;
+ // TODO: b/219919285
+ int edgeX = targetDest.x > 0 ? displayX - 1 : 1;
Point screenEdge = new Point(edgeX, targetDest.y);
Point finalDragStart = dragStart;
executeAndWaitForPageScroll(launcher,