Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fcab663 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

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

Bug: 22557455
Change-Id: I3ac1212a2f319397cd18be8f4452047d974312b8
parent a1ee659e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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();
+3 −2
Original line number Diff line number Diff line
@@ -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);