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

Commit cd191165 authored by Jon Miranda's avatar Jon Miranda Committed by Android (Google) Code Review
Browse files

Merge "Init FloatingIconView properties before fetching drawable. & Make sure...

Merge "Init FloatingIconView properties before fetching drawable. & Make sure properties are reset when recycled."
parents 652b9b55 b2670d20
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -560,6 +560,12 @@ public class FloatingIconView extends FrameLayout implements
                launcher, parent);
        view.recycle();

        // Init properties before getting the drawable.
        view.mIsVerticalBarLayout = launcher.getDeviceProfile().isVerticalBarLayout();
        view.mIsOpening = isOpening;
        view.mOriginalIcon = originalView;
        view.mPositionOut = positionOut;

        // Get the drawable on the background thread
        boolean shouldLoadIcon = originalView.getTag() instanceof ItemInfo && hideOriginal;
        if (shouldLoadIcon) {
@@ -573,11 +579,6 @@ public class FloatingIconView extends FrameLayout implements
        }
        sIconLoadResult = null;

        view.mIsVerticalBarLayout = launcher.getDeviceProfile().isVerticalBarLayout();
        view.mIsOpening = isOpening;
        view.mOriginalIcon = originalView;
        view.mPositionOut = positionOut;

        // Match the position of the original view.
        view.matchPositionOf(launcher, originalView, isOpening, positionOut);

@@ -635,6 +636,7 @@ public class FloatingIconView extends FrameLayout implements
        mLoadIconSignal = null;
        mEndRunnable = null;
        mFinalDrawableBounds.setEmpty();
        mIsOpening = false;
        mPositionOut = null;
        mListenerView.setListener(null);
        mOriginalIcon = null;