Commit b0d868f7 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Preventing zoom-in animation from running everytime the app updates."...

Merge "Preventing zoom-in animation from running everytime the app updates." into ub-launcher3-burnaby
parents 6579e1ee 3fcab663
......@@ -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();
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment