summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorMario Bertschler <bmario@google.com>2017-01-30 17:47:30 -0800
committerMario Bertschler <bmario@google.com>2017-01-31 23:21:37 +0000
commit5a2edd65f2ca3d83b1672835831e2f5b2f16ab82 (patch)
treeadb9d781fc00a48ce730cd09717e8d9c86128578 /src/com/android
parentbdbfd5bb3a25caaa438237d1ffbf5b5f7b051521 (diff)
downloadpackages_apps_Trebuchet-5a2edd65f2ca3d83b1672835831e2f5b2f16ab82.tar.gz
packages_apps_Trebuchet-5a2edd65f2ca3d83b1672835831e2f5b2f16ab82.tar.bz2
packages_apps_Trebuchet-5a2edd65f2ca3d83b1672835831e2f5b2f16ab82.zip
Fixes a bug where the workspace doesn't properly enter into freescroll mode
hence the overscroll will appear and you can wrongly enter into the -1 screen. The problem was that the state value in the workspace was set after enabling free scroll, but enabling free scroll checks the current state for validation. This bug was introduced by Icc3005fd431569e2b9e3f52d2249de8ba8d13eab. Bug: 34817798 Change-Id: I46802c93c49a2ae8ee5c40ef24e465d7fe63c4bb
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher3/Workspace.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 72dff6686..d2008a6a6 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2042,14 +2042,18 @@ public class Workspace extends PagedView
*/
public Animator setStateWithAnimation(State toState, boolean animated,
AnimationLayerSet layerViews) {
+ final State fromState = mState;
+
+ // Update the current state
+ mState = toState;
+
// Create the animation to the new state
- AnimatorSet workspaceAnim = mStateTransitionAnimation.getAnimationToState(mState,
+ AnimatorSet workspaceAnim = mStateTransitionAnimation.getAnimationToState(fromState,
toState, animated, layerViews);
- boolean shouldNotifyWidgetChange = !mState.shouldUpdateWidget
+ boolean shouldNotifyWidgetChange = !fromState.shouldUpdateWidget
&& toState.shouldUpdateWidget;
- // Update the current state
- mState = toState;
+
updateAccessibilityFlags();
if (shouldNotifyWidgetChange) {