mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Merge "Play the nav bar animation for app launch from recent in live tile" into sc-dev am: f0ebf00394
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14878297 Change-Id: Ie63f9cc2645c21c4a3de111b9c3411ff66616c6d
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.quickstep;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
|
||||
import android.view.IRecentsAnimationController;
|
||||
import android.view.SurfaceControl;
|
||||
import android.window.PictureInPictureSurfaceTransaction;
|
||||
|
||||
@@ -162,6 +163,14 @@ public class RecentsAnimationController {
|
||||
UI_HELPER_EXECUTOR.execute(() -> mController.detachNavigationBarFromApp(moveHomeToTop));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IRecentsAnimationController#animateNavigationBarToApp(long)
|
||||
*/
|
||||
@UiThread
|
||||
public void animateNavigationBarToApp(long duration) {
|
||||
UI_HELPER_EXECUTOR.execute(() -> mController.animateNavigationBarToApp(duration));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the final surface transaction on a Task. This is used by Launcher to notify the system
|
||||
* that animating Activity to PiP has completed and the associated task surface should be
|
||||
|
||||
@@ -263,6 +263,14 @@ public final class TaskViewUtils {
|
||||
finalParams.applySurfaceParams(navBuilder.build());
|
||||
}
|
||||
});
|
||||
} else if (inLiveTileMode) {
|
||||
// There is no transition animation for app launch from recent in live tile mode so
|
||||
// we have to trigger the navigation bar animation from system here.
|
||||
final RecentsAnimationController controller =
|
||||
recentsView.getRecentsAnimationController();
|
||||
if (controller != null) {
|
||||
controller.animateNavigationBarToApp(RECENTS_LAUNCH_DURATION);
|
||||
}
|
||||
}
|
||||
topMostSimulator = tsv;
|
||||
}
|
||||
|
||||
@@ -3911,4 +3911,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
// The Black blending is temporary until we have the proper color token.
|
||||
return ColorUtils.blendARGB(Color.BLACK, baseColor, 0.25f);
|
||||
}
|
||||
|
||||
/** Get the RecentsAnimationController */
|
||||
@Nullable
|
||||
public RecentsAnimationController getRecentsAnimationController() {
|
||||
return mRecentsAnimationController;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user