OSDN Git Service

Fixes first jump of dividerview when invoking splitscreen
authorMatthew Ng <ngmatthew@google.com>
Mon, 7 May 2018 19:11:13 +0000 (12:11 -0700)
committerMatthew Ng <ngmatthew@google.com>
Mon, 7 May 2018 19:11:13 +0000 (12:11 -0700)
The divider's position at the beginning is set to empty rect because
splitscreen is not ready yet so it sets the previous position that is
empty rect. In this case, the divider is positioned when splitscreen is
not ready yet but divider becomes visible so it shows this jump. If
the divider was set to splitscreen ignoring visibility then the divider
will be positioned correctly.

Change-Id: Ic959a4ade89d07ccfeeb8179e2f08e34d31860d6
Fixes: 79262454
Test: reboot, invoke splitscreen via overview

services/core/java/com/android/server/wm/DockedStackDividerController.java

index c8baced..39a3629 100644 (file)
@@ -408,7 +408,7 @@ public class DockedStackDividerController {
     }
 
     void positionDockedStackedDivider(Rect frame) {
-        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStack();
+        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
         if (stack == null) {
             // Unfortunately we might end up with still having a divider, even though the underlying
             // stack was already removed. This is because we are on AM thread and the removal of the