Pipe appTransition signal to taskbar to pause region sampling when it's ongoing

Bug: 361593564
Test: https://android-build.corp.google.com/builds/abtd/run/L78300030006280283
Flag: EXEMPT bugfix
Change-Id: Ib874e2b44c1cc59280da1250fd35f01572c39221
This commit is contained in:
Tracy Zhou
2024-09-08 12:04:31 -07:00
parent 4cfbf6b7e0
commit 7b30d2d102
4 changed files with 29 additions and 2 deletions
@@ -94,6 +94,7 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
// States that affect whether region sampling is enabled or not
private boolean mIsStashed;
private boolean mIsLumaSamplingEnabled;
private boolean mIsAppTransitionPending;
private boolean mTaskbarHidden;
private float mTranslationYForSwipe;
@@ -267,6 +268,11 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
updateSamplingState();
}
public void setIsAppTransitionPending(boolean pending) {
mIsAppTransitionPending = pending;
updateSamplingState();
}
private void updateSamplingState() {
updateRegionSamplingWindowVisibility();
if (shouldSample()) {
@@ -278,7 +284,7 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
}
private boolean shouldSample() {
return mIsStashed && mIsLumaSamplingEnabled;
return mIsStashed && mIsLumaSamplingEnabled && !mIsAppTransitionPending;
}
protected void updateStashedHandleHintScale() {