summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2021-09-14 18:34:08 +0800
committer Riddle Hsu <riddlehsu@google.com> 2021-09-14 10:35:01 +0000
commit97f738a9c3db9ec68fb211e470091a37b8ca3c89 (patch)
treeebea86ccda7b6a033cb1ae25f1eeb76a046f68d9
parent0bce85311c3741afa6f96e52891eeb000236d70e (diff)
Use sync transaction for insets animation
Otherwise if the display is rotating with sync transaction, the insets animation leash may apply the rotated position too early. Bug: 199836343 Test: setprop persist.debug.shell_transit 1; reboot Rotate display and check status/nav bar won't show in weird position before executing rotation animation. Change-Id: I3989da3b689c77829d4f48b36ed14bed4e2ab5a3
-rw-r--r--services/core/java/com/android/server/wm/InsetsSourceProvider.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/InsetsSourceProvider.java b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
index f93e08531b67..767e2c2f1917 100644
--- a/services/core/java/com/android/server/wm/InsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
@@ -267,7 +267,7 @@ class InsetsSourceProvider {
&& mWin.okToDisplay()) {
mWin.applyWithNextDraw(mSetLeashPositionConsumer);
} else {
- mSetLeashPositionConsumer.accept(mWin.getPendingTransaction());
+ mSetLeashPositionConsumer.accept(mWin.getSyncTransaction());
}
}
if (mServerVisible && !mLastSourceFrame.equals(mSource.getFrame())) {
@@ -331,7 +331,7 @@ class InsetsSourceProvider {
if (getSource().getType() == ITYPE_IME) {
setClientVisible(target.getRequestedVisibility(mSource.getType()));
}
- final Transaction t = mDisplayContent.getPendingTransaction();
+ final Transaction t = mDisplayContent.getSyncTransaction();
mWin.startAnimation(t, mAdapter, !mClientVisible /* hidden */,
ANIMATION_TYPE_INSETS_CONTROL);