[automerge] Init FloatingIconView properties before fetching drawable. 2p: 35d294387c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16908749 Bug: 207389002 Change-Id: I3815ebc0a26f61950d03b63a011dce9e42adb036 Merged-In: Ifdbf3e733e27918c57a5e9b23e5a11b65f8f338c
This commit is contained in:
@@ -564,6 +564,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) {
|
||||
@@ -577,11 +583,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);
|
||||
|
||||
@@ -639,6 +640,7 @@ public class FloatingIconView extends FrameLayout implements
|
||||
mLoadIconSignal = null;
|
||||
mEndRunnable = null;
|
||||
mFinalDrawableBounds.setEmpty();
|
||||
mIsOpening = false;
|
||||
mPositionOut = null;
|
||||
mListenerView.setListener(null);
|
||||
mOriginalIcon = null;
|
||||
|
||||
Reference in New Issue
Block a user