From 5686333117ff6e2e4add6b2f32edcf047f241466 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Wed, 22 May 2019 14:13:53 -0700 Subject: Adding a utility class to cache views at an activity level Bug: 122345781 Change-Id: I9a939e0b19c06c1089c1ceb515f8b97fb5dbb49e --- .../android/launcher3/QuickstepAppTransitionManagerImpl.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'quickstep/src') diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java index 91c460148..95ae31289 100644 --- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java +++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java @@ -142,7 +142,6 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans private final float mClosingWindowTransY; private DeviceProfile mDeviceProfile; - private FloatingIconView mFloatingView; private RemoteAnimationProvider mRemoteAnimationProvider; @@ -411,15 +410,15 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans private ValueAnimator getOpeningWindowAnimators(View v, RemoteAnimationTargetCompat[] targets, Rect windowTargetBounds, boolean toggleVisibility) { RectF bounds = new RectF(); - mFloatingView = FloatingIconView.getFloatingIconView(mLauncher, v, toggleVisibility, - bounds, true /* isOpening */, mFloatingView); + FloatingIconView floatingView = FloatingIconView.getFloatingIconView(mLauncher, v, + toggleVisibility, bounds, true /* isOpening */); Rect crop = new Rect(); Matrix matrix = new Matrix(); RemoteAnimationTargetSet openingTargets = new RemoteAnimationTargetSet(targets, MODE_OPENING); SyncRtSurfaceTransactionApplierCompat surfaceApplier = - new SyncRtSurfaceTransactionApplierCompat(mFloatingView); + new SyncRtSurfaceTransactionApplierCompat(floatingView); openingTargets.addDependentTransactionApplier(surfaceApplier); // Scale the app icon to take up the entire screen. This simplifies the math when @@ -463,7 +462,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans ValueAnimator appAnimator = ValueAnimator.ofFloat(0, 1); appAnimator.setDuration(APP_LAUNCH_DURATION); appAnimator.setInterpolator(LINEAR); - appAnimator.addListener(mFloatingView); + appAnimator.addListener(floatingView); appAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { @@ -557,7 +556,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans } else { currentBounds.bottom -= croppedHeight; } - mFloatingView.update(currentBounds, mIconAlpha.value, percent, 0f, + floatingView.update(currentBounds, mIconAlpha.value, percent, 0f, cornerRadius * scale, true /* isOpening */); } else { matrix.setTranslate(target.position.x, target.position.y); -- cgit v1.2.3