Fix two panel tapl test dragging issue

It seems if the dragging target position's X coordinate is 0
then there is a weird bug in portrait mode.

Test: atest TwoPanelWorkspaceTest
Bug: 197631877
Change-Id: I7d8702b06e5ed396814339080f8e814e9f8a6a65
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 1947da3..20d860d 100644
--- a/tests/tapl/com/android/launcher3/tapl/Workspace.java
+++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java
@@ -411,7 +411,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,