diff options
author | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-06-19 23:13:23 +0000 |
---|---|---|
committer | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-06-19 23:13:23 +0000 |
commit | 4d90d0f9bb97a93d1c3e60162c83cdf5f721bde4 (patch) | |
tree | 147f833b2eb15bc3c3cea54881f7d279d7f3b8e1 /quickstep | |
parent | e390d25b689e87d716e265cae92a20633593bd8e (diff) | |
parent | 53246e5fdc681b43337e5f0bb1eeae0d1b51a428 (diff) | |
download | android_packages_apps_Trebuchet-4d90d0f9bb97a93d1c3e60162c83cdf5f721bde4.tar.gz android_packages_apps_Trebuchet-4d90d0f9bb97a93d1c3e60162c83cdf5f721bde4.tar.bz2 android_packages_apps_Trebuchet-4d90d0f9bb97a93d1c3e60162c83cdf5f721bde4.zip |
[automerger] Fix bug where floating view is removed before window animation is complete. am: 53246e5fdc
Change-Id: I1b8f651b200396819bbf9c1caee799b2d1f325e8
Diffstat (limited to 'quickstep')
-rw-r--r-- | quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java index 13530b2e5..14633afa5 100644 --- a/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +++ b/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java @@ -195,7 +195,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag mLauncher.getStateManager().setCurrentAnimation(anim); Rect windowTargetBounds = getWindowTargetBounds(targetCompats); - anim.play(getIconAnimator(v, windowTargetBounds)); + playIconAnimators(anim, v, windowTargetBounds); if (launcherClosing) { Pair<AnimatorSet, Runnable> launcherContentAnimator = getLauncherContentAnimator(true /* isAppOpening */); @@ -420,9 +420,9 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag } /** - * @return Animator that controls the icon used to launch the target. + * Animators for the "floating view" of the view used to launch the target. */ - private AnimatorSet getIconAnimator(View v, Rect windowTargetBounds) { + private void playIconAnimators(AnimatorSet appOpenAnimator, View v, Rect windowTargetBounds) { final boolean isBubbleTextView = v instanceof BubbleTextView; mFloatingView = new View(mLauncher); if (isBubbleTextView && v.getTag() instanceof ItemInfoWithIcon ) { @@ -477,7 +477,6 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag ((ViewGroup) mDragLayer.getParent()).addView(mFloatingView); v.setVisibility(View.INVISIBLE); - AnimatorSet appIconAnimatorSet = new AnimatorSet(); int[] dragLayerBounds = new int[2]; mDragLayer.getLocationOnScreen(dragLayerBounds); @@ -507,8 +506,8 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag } x.setInterpolator(AGGRESSIVE_EASE); y.setInterpolator(AGGRESSIVE_EASE); - appIconAnimatorSet.play(x); - appIconAnimatorSet.play(y); + appOpenAnimator.play(x); + appOpenAnimator.play(y); // Scale the app icon to take up the entire screen. This simplifies the math when // animating the app window position / scale. @@ -519,7 +518,7 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag .ofFloat(mFloatingView, SCALE_PROPERTY, startScale, scale); scaleAnim.setDuration(APP_LAUNCH_DURATION) .setInterpolator(Interpolators.EXAGGERATED_EASE); - appIconAnimatorSet.play(scaleAnim); + appOpenAnimator.play(scaleAnim); // Fade out the app icon. ObjectAnimator alpha = ObjectAnimator.ofFloat(mFloatingView, View.ALPHA, 1f, 0f); @@ -532,9 +531,9 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag alpha.setDuration((long) (APP_LAUNCH_DOWN_DUR_SCALE_FACTOR * APP_LAUNCH_ALPHA_DURATION)); } alpha.setInterpolator(LINEAR); - appIconAnimatorSet.play(alpha); + appOpenAnimator.play(alpha); - appIconAnimatorSet.addListener(new AnimatorListenerAdapter() { + appOpenAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { // Reset launcher to normal state @@ -542,7 +541,6 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag ((ViewGroup) mDragLayer.getParent()).removeView(mFloatingView); } }); - return appIconAnimatorSet; } /** |