Fix wrong split percentage after split layout been pushed up

The task thumbnails of splitting task might not start with (0, 0), like
the case when IME panel pushing up split layout. Updated to consider
different start position while calculating split percentage.

Fix: 218704243
Test: enter split in portrait, toggle on IME panel, observed task
      thumbnails been placed properly after swiped up to overview.
Change-Id: I5b0d9710b56e9d77b86369c7fff4bc3ca75d9c7e
diff --git a/src/com/android/launcher3/util/SplitConfigurationOptions.java b/src/com/android/launcher3/util/SplitConfigurationOptions.java
index b40493a..6a336cc 100644
--- a/src/com/android/launcher3/util/SplitConfigurationOptions.java
+++ b/src/com/android/launcher3/util/SplitConfigurationOptions.java
@@ -154,10 +154,12 @@
                 }
             }
 
-            leftTaskPercent = this.leftTopBounds.width() / (float) rightBottomBounds.right;
-            topTaskPercent = this.leftTopBounds.height() / (float) rightBottomBounds.bottom;
-            dividerWidthPercent = visualDividerBounds.width() / (float) rightBottomBounds.right;
-            dividerHeightPercent = visualDividerBounds.height() / (float) rightBottomBounds.bottom;
+            float totalWidth = rightBottomBounds.right - leftTopBounds.left;
+            float totalHeight = rightBottomBounds.bottom - leftTopBounds.top;
+            leftTaskPercent = leftTopBounds.width() / totalWidth;
+            topTaskPercent = leftTopBounds.height() / totalHeight;
+            dividerWidthPercent = visualDividerBounds.width() / totalWidth;
+            dividerHeightPercent = visualDividerBounds.height() / totalHeight;
         }
     }