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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user