From 52e22aab2bc5c77908f42eb18c7d5a8737d3e500 Mon Sep 17 00:00:00 2001 From: Issei Suzuki Date: Wed, 9 Jun 2021 10:06:58 +0200 Subject: [PATCH] Stop animating wallpaper and non-app windows in WM When keyguard is going away, WM applies animation on the wallpaper and non-app windows. With remote animation enabled, all animation will be handled in KeyguardService, so WM shouldn't apply animation locally. Bug: 175686682 Test: Manual. Tap notification on the lock screen to dismiss keyguard, verify alpha value of the wallpaper surface unchanged. Change-Id: I46879ef872cfa38e99586cbeb4c991d1ec359e87 --- .../com/android/server/wm/AppTransitionController.java | 8 +++++--- services/core/java/com/android/server/wm/Transition.java | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/wm/AppTransitionController.java b/services/core/java/com/android/server/wm/AppTransitionController.java index e7c51a4ac65ad..eaebb6f1ce748 100644 --- a/services/core/java/com/android/server/wm/AppTransitionController.java +++ b/services/core/java/com/android/server/wm/AppTransitionController.java @@ -800,7 +800,8 @@ public class AppTransitionController { } private void handleNonAppWindowsInTransition(@TransitionOldType int transit, int flags) { - if (transit == TRANSIT_OLD_KEYGUARD_GOING_AWAY) { + if (transit == TRANSIT_OLD_KEYGUARD_GOING_AWAY + && !WindowManagerService.sEnableRemoteKeyguardGoingAwayAnimation) { if ((flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER) != 0 && (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION) == 0 && (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_SUBTLE_ANIMATION) == 0) { @@ -812,8 +813,9 @@ public class AppTransitionController { } } } - if (transit == TRANSIT_OLD_KEYGUARD_GOING_AWAY - || transit == TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER) { + if ((transit == TRANSIT_OLD_KEYGUARD_GOING_AWAY + || transit == TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER) + && !WindowManagerService.sEnableRemoteKeyguardGoingAwayAnimation) { mDisplayContent.startKeyguardExitOnNonAppWindows( transit == TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER, (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE) != 0, diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java index 42e2d2fc79d38..0cd0980704014 100644 --- a/services/core/java/com/android/server/wm/Transition.java +++ b/services/core/java/com/android/server/wm/Transition.java @@ -401,7 +401,8 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe if (dc == null) { return; } - if (transit == TRANSIT_KEYGUARD_GOING_AWAY) { + if (transit == TRANSIT_KEYGUARD_GOING_AWAY + && !WindowManagerService.sEnableRemoteKeyguardGoingAwayAnimation) { if ((flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER) != 0 && (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION) == 0 && (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_SUBTLE_ANIMATION) == 0) {