From 8d994cd6d503b2c281e7da253798b6f80f9e26c6 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Wed, 16 May 2018 11:31:22 -0700 Subject: [PATCH] Fix bug where Workspace page alpha stays 0 in SpringLoaded mode. The page alpha gets set to 0 by updatePageAlphaValues sometime between Workspace calling goToState(SPRING_LOADED) and onStartStateTransition. By the time the transition is over, Workspace is no longer in a modal state and so alpha never gets restored via updatePageAlphaValues. Bug: 76449277 Change-Id: I95241395594dd9084763cc3bc51bc55319cadb73 --- src/com/android/launcher3/Workspace.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index a03a7a8b21..2df34d51fc 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1297,7 +1297,9 @@ public class Workspace extends PagedView } private void updatePageAlphaValues() { - if (!workspaceInModalState() && !mIsSwitchingState) { + // We need to check the isDragging case because updatePageAlphaValues is called between + // goToState(SPRING_LOADED) and onStartStateTransition. + if (!workspaceInModalState() && !mIsSwitchingState && !mDragController.isDragging()) { int screenCenter = getScrollX() + getMeasuredWidth() / 2; for (int i = 0; i < getChildCount(); i++) { CellLayout child = (CellLayout) getChildAt(i);