mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Make keyguard exit animation to remote animation.
The change is disabled by default. To enable remote animation, one needs to set a property and to restart the WMS. % adb root % adb shell setprop persist.wm.enable_remote_keyguard_animation 1 % adb reboot Test: Existing tests pass. Bug: 175686676 Bug: 179122467 Exempt-From-Owner-Approval: The owner already gave +2 on the exactly same CL. Change-Id: I3054ce4bbb296f09ab8bc12595f2ad17b32db7b4
This commit is contained in:
@@ -56,17 +56,22 @@ public abstract class LauncherAnimationRunner implements RemoteAnimationRunnerCo
|
||||
return mHandler;
|
||||
}
|
||||
|
||||
// Called only in R+ platform
|
||||
// Called only in S+ platform
|
||||
@BinderThread
|
||||
public void onAnimationStart(RemoteAnimationTargetCompat[] appTargets,
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets, Runnable runnable) {
|
||||
public void onAnimationStart(
|
||||
int transit,
|
||||
RemoteAnimationTargetCompat[] appTargets,
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets,
|
||||
RemoteAnimationTargetCompat[] nonAppTargets,
|
||||
Runnable runnable) {
|
||||
Runnable r = () -> {
|
||||
finishExistingAnimation();
|
||||
mAnimationResult = new AnimationResult(() -> {
|
||||
UI_HELPER_EXECUTOR.execute(runnable);
|
||||
mAnimationResult = null;
|
||||
});
|
||||
onCreateAnimation(appTargets, wallpaperTargets, mAnimationResult);
|
||||
onCreateAnimation(transit, appTargets, wallpaperTargets, nonAppTargets,
|
||||
mAnimationResult);
|
||||
};
|
||||
if (mStartAtFrontOfQueue) {
|
||||
postAtFrontOfQueueAsynchronously(mHandler, r);
|
||||
@@ -75,6 +80,14 @@ public abstract class LauncherAnimationRunner implements RemoteAnimationRunnerCo
|
||||
}
|
||||
}
|
||||
|
||||
// Called only in R platform
|
||||
@BinderThread
|
||||
public void onAnimationStart(RemoteAnimationTargetCompat[] appTargets,
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets, Runnable runnable) {
|
||||
onAnimationStart(0 /* transit */, appTargets, wallpaperTargets,
|
||||
new RemoteAnimationTargetCompat[0], runnable);
|
||||
}
|
||||
|
||||
// Called only in Q platform
|
||||
@BinderThread
|
||||
@Deprecated
|
||||
@@ -88,8 +101,11 @@ public abstract class LauncherAnimationRunner implements RemoteAnimationRunnerCo
|
||||
*/
|
||||
@UiThread
|
||||
public abstract void onCreateAnimation(
|
||||
int transit,
|
||||
RemoteAnimationTargetCompat[] appTargets,
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets, AnimationResult result);
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets,
|
||||
RemoteAnimationTargetCompat[] nonAppTargets,
|
||||
AnimationResult result);
|
||||
|
||||
@UiThread
|
||||
private void finishExistingAnimation() {
|
||||
|
||||
Reference in New Issue
Block a user