diff options
author | Jon Miranda <jonmiranda@google.com> | 2019-10-11 10:58:24 -0700 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2019-10-11 11:03:26 -0700 |
commit | 1dd2e4819012b33588518ef434f996ac0b3ebbae (patch) | |
tree | 683160907fa1502a771264283c63c748a5d5e444 /src/com | |
parent | f2d486e5b09206061eefffb95591308289e93224 (diff) | |
download | android_packages_apps_Trebuchet-1dd2e4819012b33588518ef434f996ac0b3ebbae.tar.gz android_packages_apps_Trebuchet-1dd2e4819012b33588518ef434f996ac0b3ebbae.tar.bz2 android_packages_apps_Trebuchet-1dd2e4819012b33588518ef434f996ac0b3ebbae.zip |
Wait until listeners/end runnable is created before checking icon result.
This prevents the case where original icon is in hidden state, then the
view gets recycled and since there is no listener/end runnable the original
icon is left in the hidden state.
Bug: 142120338
Change-Id: I5f5bfa2a7c70d10869f51edf5c40bbaab1ef93bc
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/views/FloatingIconView.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java index 3912b4468..45c0d9097 100644 --- a/src/com/android/launcher3/views/FloatingIconView.java +++ b/src/com/android/launcher3/views/FloatingIconView.java @@ -767,11 +767,6 @@ public class FloatingIconView extends View implements // Match the position of the original view. view.matchPositionOf(launcher, originalView, isOpening, positionOut); - // Must be called after matchPositionOf so that we know what size to load. - if (shouldLoadIcon) { - view.checkIconResult(originalView, isOpening); - } - // We need to add it to the overlay, but keep it invisible until animation starts.. view.setVisibility(INVISIBLE); parent.addView(view); @@ -798,6 +793,14 @@ public class FloatingIconView extends View implements view.finish(dragLayer); } }; + + // Must be called after matchPositionOf so that we know what size to load. + // Must be called after the fastFinish listener and end runnable is created so that + // the icon is not left in a hidden state. + if (shouldLoadIcon) { + view.checkIconResult(originalView, isOpening); + } + return view; } |