Merge "Restore strong reference to animation runner" into udc-dev am: 1f3c56af5b am: 7733c11623
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23793397 Change-Id: Idacab10522770903c5f5932842964f7b0077c5f0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -229,6 +229,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
|||||||
private RemoteAnimationProvider mRemoteAnimationProvider;
|
private RemoteAnimationProvider mRemoteAnimationProvider;
|
||||||
// Strong refs to runners which are cleared when the launcher activity is destroyed
|
// Strong refs to runners which are cleared when the launcher activity is destroyed
|
||||||
private RemoteAnimationFactory mWallpaperOpenRunner;
|
private RemoteAnimationFactory mWallpaperOpenRunner;
|
||||||
|
private RemoteAnimationFactory mAppLaunchRunner;
|
||||||
private RemoteAnimationFactory mKeyguardGoingAwayRunner;
|
private RemoteAnimationFactory mKeyguardGoingAwayRunner;
|
||||||
|
|
||||||
private RemoteAnimationFactory mWallpaperOpenTransitionRunner;
|
private RemoteAnimationFactory mWallpaperOpenTransitionRunner;
|
||||||
@@ -298,17 +299,17 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
|||||||
boolean fromRecents = isLaunchingFromRecents(v, null /* targets */);
|
boolean fromRecents = isLaunchingFromRecents(v, null /* targets */);
|
||||||
RunnableList onEndCallback = new RunnableList();
|
RunnableList onEndCallback = new RunnableList();
|
||||||
|
|
||||||
RemoteAnimationFactory delegateRunner = new AppLaunchAnimationRunner(v, onEndCallback);
|
mAppLaunchRunner = new AppLaunchAnimationRunner(v, onEndCallback);
|
||||||
ItemInfo tag = (ItemInfo) v.getTag();
|
ItemInfo tag = (ItemInfo) v.getTag();
|
||||||
if (tag != null && tag.shouldUseBackgroundAnimation()) {
|
if (tag != null && tag.shouldUseBackgroundAnimation()) {
|
||||||
ContainerAnimationRunner containerAnimationRunner =
|
ContainerAnimationRunner containerAnimationRunner =
|
||||||
ContainerAnimationRunner.from(v, mStartingWindowListener, onEndCallback);
|
ContainerAnimationRunner.from(v, mStartingWindowListener, onEndCallback);
|
||||||
if (containerAnimationRunner != null) {
|
if (containerAnimationRunner != null) {
|
||||||
delegateRunner = containerAnimationRunner;
|
mAppLaunchRunner = containerAnimationRunner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RemoteAnimationRunnerCompat runner = new LauncherAnimationRunner(
|
RemoteAnimationRunnerCompat runner = new LauncherAnimationRunner(
|
||||||
mHandler, delegateRunner, true /* startAtFrontOfQueue */);
|
mHandler, mAppLaunchRunner, true /* startAtFrontOfQueue */);
|
||||||
|
|
||||||
// Note that this duration is a guess as we do not know if the animation will be a
|
// Note that this duration is a guess as we do not know if the animation will be a
|
||||||
// recents launch or not for sure until we know the opening app targets.
|
// recents launch or not for sure until we know the opening app targets.
|
||||||
@@ -1164,6 +1165,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
|||||||
// Also clear strong references to the runners registered with the remote animation
|
// Also clear strong references to the runners registered with the remote animation
|
||||||
// definition so we don't have to wait for the system gc
|
// definition so we don't have to wait for the system gc
|
||||||
mWallpaperOpenRunner = null;
|
mWallpaperOpenRunner = null;
|
||||||
|
mAppLaunchRunner = null;
|
||||||
mKeyguardGoingAwayRunner = null;
|
mKeyguardGoingAwayRunner = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user