Merge "Don't use sync transactions if not needed" into rvc-dev am: 27c733c7f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11922716 Change-Id: I0a41f865546d6b1c170378ac9eb9eb07ae758d72
This commit is contained in:
@@ -387,6 +387,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
|||||||
}
|
}
|
||||||
// Always set this because we could be entering split when mMinimized is already true
|
// Always set this because we could be entering split when mMinimized is already true
|
||||||
wct.setFocusable(mSplits.mPrimary.token, !mMinimized);
|
wct.setFocusable(mSplits.mPrimary.token, !mMinimized);
|
||||||
|
boolean onlyFocusable = true;
|
||||||
|
|
||||||
// Update home-stack resizability
|
// Update home-stack resizability
|
||||||
final boolean homeResizableChanged = mHomeStackResizable != homeStackResizable;
|
final boolean homeResizableChanged = mHomeStackResizable != homeStackResizable;
|
||||||
@@ -395,6 +396,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
|||||||
if (isDividerVisible()) {
|
if (isDividerVisible()) {
|
||||||
WindowManagerProxy.applyHomeTasksMinimized(
|
WindowManagerProxy.applyHomeTasksMinimized(
|
||||||
mSplitLayout, mSplits.mSecondary.token, wct);
|
mSplitLayout, mSplits.mSecondary.token, wct);
|
||||||
|
onlyFocusable = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,8 +418,16 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateTouchable();
|
updateTouchable();
|
||||||
|
if (onlyFocusable) {
|
||||||
|
// If we are only setting focusability, a sync transaction isn't necessary (in fact it
|
||||||
|
// can interrupt other animations), so see if it can be submitted on pending instead.
|
||||||
|
if (!mSplits.mDivider.getWmProxy().queueSyncTransactionIfWaiting(wct)) {
|
||||||
|
WindowOrganizer.applyTransaction(wct);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
mWindowManagerProxy.applySyncTransaction(wct);
|
mWindowManagerProxy.applySyncTransaction(wct);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void setAdjustedForIme(boolean adjustedForIme) {
|
void setAdjustedForIme(boolean adjustedForIme) {
|
||||||
if (mAdjustedForIme == adjustedForIme) {
|
if (mAdjustedForIme == adjustedForIme) {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import android.view.SurfaceControl;
|
|||||||
import android.window.TaskOrganizer;
|
import android.window.TaskOrganizer;
|
||||||
import android.window.WindowContainerToken;
|
import android.window.WindowContainerToken;
|
||||||
import android.window.WindowContainerTransaction;
|
import android.window.WindowContainerTransaction;
|
||||||
|
import android.window.WindowOrganizer;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
@@ -173,6 +174,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateImeAdjustState() {
|
private void updateImeAdjustState() {
|
||||||
|
if (mAdjusted != mTargetAdjusted) {
|
||||||
// Reposition the server's secondary split position so that it evaluates
|
// Reposition the server's secondary split position so that it evaluates
|
||||||
// insets properly.
|
// insets properly.
|
||||||
WindowContainerTransaction wct = new WindowContainerTransaction();
|
WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||||
@@ -212,7 +214,10 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
|||||||
SCREEN_WIDTH_DP_UNDEFINED, SCREEN_HEIGHT_DP_UNDEFINED);
|
SCREEN_WIDTH_DP_UNDEFINED, SCREEN_HEIGHT_DP_UNDEFINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
mSplits.mDivider.getWmProxy().applySyncTransaction(wct);
|
if (!mSplits.mDivider.getWmProxy().queueSyncTransactionIfWaiting(wct)) {
|
||||||
|
WindowOrganizer.applyTransaction(wct);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update all the adjusted-for-ime states
|
// Update all the adjusted-for-ime states
|
||||||
if (!mPaused) {
|
if (!mPaused) {
|
||||||
|
|||||||
Reference in New Issue
Block a user