Loading quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -1065,6 +1065,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener new SurfaceControl.Transaction().remove(dimLayer).apply())); } backgroundRadiusAnim.addListener( AnimatorListeners.forEndCallback(depthController::dispose)); return backgroundRadiusAnim; } Loading quickstep/src/com/android/launcher3/statehandlers/DepthController.java +22 −2 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ public class DepthController extends BaseDepthController implements StateHandler @Override public void onViewDetachedFromWindow(View view) { CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener); mLauncher.getScrimView().removeOpaquenessListener(mOpaquenessListener); removeSecondaryListeners(); } }; rootView.addOnAttachStateChangeListener(mOnAttachListener); Loading @@ -95,6 +94,27 @@ public class DepthController extends BaseDepthController implements StateHandler } } /** * Cleans up after this controller so it can be garbage collected without leaving traces. */ public void dispose() { removeSecondaryListeners(); if (mLauncher.getRootView() != null && mOnAttachListener != null) { mLauncher.getRootView().removeOnAttachStateChangeListener(mOnAttachListener); mOnAttachListener = null; } } private void removeSecondaryListeners() { if (mCrossWindowBlurListener != null) { CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener); } if (mOpaquenessListener != null) { mLauncher.getScrimView().removeOpaquenessListener(mOpaquenessListener); } } /** * Sets if the underlying activity is started or not */ Loading Loading
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -1065,6 +1065,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener new SurfaceControl.Transaction().remove(dimLayer).apply())); } backgroundRadiusAnim.addListener( AnimatorListeners.forEndCallback(depthController::dispose)); return backgroundRadiusAnim; } Loading
quickstep/src/com/android/launcher3/statehandlers/DepthController.java +22 −2 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ public class DepthController extends BaseDepthController implements StateHandler @Override public void onViewDetachedFromWindow(View view) { CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener); mLauncher.getScrimView().removeOpaquenessListener(mOpaquenessListener); removeSecondaryListeners(); } }; rootView.addOnAttachStateChangeListener(mOnAttachListener); Loading @@ -95,6 +94,27 @@ public class DepthController extends BaseDepthController implements StateHandler } } /** * Cleans up after this controller so it can be garbage collected without leaving traces. */ public void dispose() { removeSecondaryListeners(); if (mLauncher.getRootView() != null && mOnAttachListener != null) { mLauncher.getRootView().removeOnAttachStateChangeListener(mOnAttachListener); mOnAttachListener = null; } } private void removeSecondaryListeners() { if (mCrossWindowBlurListener != null) { CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener); } if (mOpaquenessListener != null) { mLauncher.getScrimView().removeOpaquenessListener(mOpaquenessListener); } } /** * Sets if the underlying activity is started or not */ Loading