diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java b/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java index 143b42a1ec96..893111100919 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java @@ -171,6 +171,9 @@ public class TransitionUtil { if (isOpeningType(mode)) { t.setAlpha(leash, 0.f); } + // Set the transition leash position to 0 in case the divider leash position being + // taking down. + t.setPosition(leash, 0, 0); t.setLayer(leash, Integer.MAX_VALUE); return; } @@ -229,7 +232,11 @@ public class TransitionUtil { t.reparent(change.getLeash(), leashSurface); t.setAlpha(change.getLeash(), 1.0f); t.show(change.getLeash()); - t.setPosition(change.getLeash(), 0, 0); + if (!isDividerBar(change)) { + // For divider, don't modify its inner leash position when creating the outer leash + // for the transition. In case the position being wrong after the transition finished. + t.setPosition(change.getLeash(), 0, 0); + } t.setLayer(change.getLeash(), 0); return leashSurface; } |