summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-11 22:17:30 (GMT)
committerSunny Goyal <sunnygoyal@google.com>2015-08-11 22:18:02 (GMT)
commit3fcab663a141b31916152c8bc185b93b718d79df (patch)
tree1a94897e601b20f3b0055d7962d25fc35997cfd0
parenta1ee659e748b02ed74d8cafd3796a5c8ce5f1c44 (diff)
downloadandroid_packages_apps_Trebuchet-3fcab663a141b31916152c8bc185b93b718d79df.zip
android_packages_apps_Trebuchet-3fcab663a141b31916152c8bc185b93b718d79df.tar.gz
android_packages_apps_Trebuchet-3fcab663a141b31916152c8bc185b93b718d79df.tar.bz2
Preventing zoom-in animation from running everytime the app updates.
Bug: 22557455 Change-Id: I3ac1212a2f319397cd18be8f4452047d974312b8
-rw-r--r--src/com/android/launcher3/PreloadIconDrawable.java4
-rw-r--r--src/com/android/launcher3/Workspace.java5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/launcher3/PreloadIconDrawable.java b/src/com/android/launcher3/PreloadIconDrawable.java
index bcb59c4..45e4b2c 100644
--- a/src/com/android/launcher3/PreloadIconDrawable.java
+++ b/src/com/android/launcher3/PreloadIconDrawable.java
@@ -213,6 +213,10 @@ class PreloadIconDrawable extends Drawable {
return mAnimationProgress;
}
+ public boolean hasNotCompleted() {
+ return mAnimationProgress < ANIMATION_PROGRESS_COMPLETED;
+ }
+
@Override
public int getIntrinsicHeight() {
return mIcon.getIntrinsicHeight();
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 17e59a6..e83ef7c 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -4334,8 +4334,9 @@ public class Workspace extends PagedView
updates.contains(info)) {
ShortcutInfo si = (ShortcutInfo) info;
BubbleTextView shortcut = (BubbleTextView) v;
- boolean oldPromiseState = getTextViewIcon(shortcut)
- instanceof PreloadIconDrawable;
+ Drawable oldIcon = getTextViewIcon(shortcut);
+ boolean oldPromiseState = (oldIcon instanceof PreloadIconDrawable)
+ && ((PreloadIconDrawable) oldIcon).hasNotCompleted();
shortcut.applyFromShortcutInfo(si, mIconCache,
si.isPromise() != oldPromiseState);