mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Merge "Add onEndCallback to ContainerAnimationRunner" into tm-qpr-dev am: 83683829f7 am: 72313feac1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21750179 Change-Id: I55a17ffd869cd33e53296d7aef80e27e88a1cf4b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -300,7 +300,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
ItemInfo tag = (ItemInfo) v.getTag();
|
||||
if (tag != null && tag.shouldUseBackgroundAnimation()) {
|
||||
ContainerAnimationRunner containerAnimationRunner =
|
||||
ContainerAnimationRunner.from(v, mStartingWindowListener);
|
||||
ContainerAnimationRunner.from(v, mStartingWindowListener, onEndCallback);
|
||||
if (containerAnimationRunner != null) {
|
||||
delegateRunner = containerAnimationRunner;
|
||||
}
|
||||
@@ -1764,7 +1764,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
|
||||
@Nullable
|
||||
private static ContainerAnimationRunner from(
|
||||
View v, StartingWindowListener startingWindowListener) {
|
||||
View v, StartingWindowListener startingWindowListener, RunnableList onEndCallback) {
|
||||
View viewToUse = findViewWithBackground(v);
|
||||
if (viewToUse == null) {
|
||||
viewToUse = v;
|
||||
@@ -1791,8 +1791,15 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
ActivityLaunchAnimator.Callback callback = task -> ColorUtils.setAlphaComponent(
|
||||
startingWindowListener.getBackgroundColor(), 255);
|
||||
|
||||
ActivityLaunchAnimator.Listener listener = new ActivityLaunchAnimator.Listener() {
|
||||
@Override
|
||||
public void onLaunchAnimationEnd() {
|
||||
onEndCallback.executeAllAndDestroy();
|
||||
}
|
||||
};
|
||||
|
||||
return new ContainerAnimationRunner(
|
||||
new ActivityLaunchAnimator.AnimationDelegate(controller, callback));
|
||||
new ActivityLaunchAnimator.AnimationDelegate(controller, callback, listener));
|
||||
}
|
||||
|
||||
/** Finds the closest parent of [view] (inclusive) with a background drawable. */
|
||||
|
||||
Reference in New Issue
Block a user