summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-11 22:42:03 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-11 22:42:03 (GMT)
commitb0d868f73037e0f732fa71d4bf557d4fcb1ed36c (patch)
treea4a57f182df0edddcd27f4ecfa9755970f0b72d5
parent6579e1eee8a6fce44f020d40c3bbdbf245d6c12c (diff)
parent3fcab663a141b31916152c8bc185b93b718d79df (diff)
downloadandroid_packages_apps_Trebuchet-b0d868f73037e0f732fa71d4bf557d4fcb1ed36c.zip
android_packages_apps_Trebuchet-b0d868f73037e0f732fa71d4bf557d4fcb1ed36c.tar.gz
android_packages_apps_Trebuchet-b0d868f73037e0f732fa71d4bf557d4fcb1ed36c.tar.bz2
Merge "Preventing zoom-in animation from running everytime the app updates." into ub-launcher3-burnaby
-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);