mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Continue using window's sysui flags if task thumbnail unavailable" into ub-launcher3-qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7c278b62f9
@@ -698,12 +698,15 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
||||
|
||||
private void updateSysUiFlags(float windowProgress) {
|
||||
if (mRecentsView != null) {
|
||||
TaskView centermostTask = mRecentsView.getTaskViewAt(mRecentsView
|
||||
.getPageNearestToCenterOfScreen());
|
||||
int centermostTaskFlags = centermostTask == null ? 0
|
||||
: centermostTask.getThumbnail().getSysUiStatusNavFlags();
|
||||
boolean useHomeScreenFlags = windowProgress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD;
|
||||
// We will handle the sysui flags based on the centermost task view.
|
||||
mRecentsAnimationWrapper.setWindowThresholdCrossed(true);
|
||||
int sysuiFlags = windowProgress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD
|
||||
? 0
|
||||
: mRecentsView.getTaskViewAt(mRecentsView.getPageNearestToCenterOfScreen())
|
||||
.getThumbnail().getSysUiStatusNavFlags();
|
||||
mRecentsAnimationWrapper.setWindowThresholdCrossed(centermostTaskFlags != 0
|
||||
|| useHomeScreenFlags);
|
||||
int sysuiFlags = useHomeScreenFlags ? 0 : centermostTaskFlags;
|
||||
mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user