summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2016-08-02 12:03:34 -0700
committerArne Coucheron <arco68@gmail.com>2017-05-27 00:15:02 +0200
commit14d0937792d73ee890a14ff45e11c5d552b722fc (patch)
tree38e5f6ed032e9129be454b78deded3e92a247dad
parent8b5e27a79493bba200ef040c8c6cc0ec3b496638 (diff)
downloadandroid_packages_apps_Trebuchet-14d0937792d73ee890a14ff45e11c5d552b722fc.tar.gz
android_packages_apps_Trebuchet-14d0937792d73ee890a14ff45e11c5d552b722fc.tar.bz2
android_packages_apps_Trebuchet-14d0937792d73ee890a14ff45e11c5d552b722fc.zip
Adding workaround to jump in wallpaper offsets.
- Just skip the animation if we are animating to the same wallpaper offset (which is the case when we are adding from all apps) Bug: 28587903 Change-Id: Ib7b1828c1b099a665d68c22cb33ee62693f33f35
-rw-r--r--src/com/android/launcher3/Workspace.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 7252ca47e..067228663 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1536,8 +1536,9 @@ public class Workspace extends PagedView
scheduleUpdate();
mFinalOffset = Math.max(0f, Math.min(x, 1.0f));
if (getNumScreensExcludingEmptyAndCustom() != mNumScreens) {
- if (mNumScreens > 0) {
- // Don't animate if we're going from 0 screens
+ if (mNumScreens > 0 && Float.compare(mCurrentOffset, mFinalOffset) != 0) {
+ // Don't animate if we're going from 0 screens, or if the final offset is the same
+ // as the current offset
animateToFinal();
}
mNumScreens = getNumScreensExcludingEmptyAndCustom();