From fe57103cf33827c5d3a244f37f0f0f9cd8623d69 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 18 Jun 2019 11:22:53 -0700 Subject: [PATCH] Continue with the animation if wallpaper fails to draw - This is preferable to canceling the animation, which the user just interprets as the nav gesture not working, and may fix some cases where the user may interpret a swipe up as not working if the wallpaper is slow to draw. Bug: 135536076 Bug: 134091263 Test: atest RecentsAnimationTests Test: atest RecentsAnimationControllerTests Change-Id: Icf9ed20971a701a254383c65aa1811a99680ba51 --- .../java/com/android/server/wm/WallpaperController.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java index da873b8bc3082..21410c4448e50 100644 --- a/services/core/java/com/android/server/wm/WallpaperController.java +++ b/services/core/java/com/android/server/wm/WallpaperController.java @@ -24,7 +24,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER; import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; -import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_TO_ORIGINAL_POSITION; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_SCREENSHOT; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WALLPAPER; @@ -612,10 +611,10 @@ class WallpaperController { if (DEBUG_APP_TRANSITIONS || DEBUG_WALLPAPER) Slog.v(TAG, "*** WALLPAPER DRAW TIMEOUT"); - // If there was a recents animation in progress, cancel that animation + // If there was a pending recents animation, start the animation anyways (it's better + // to not see the wallpaper than for the animation to not start) if (mService.getRecentsAnimationController() != null) { - mService.getRecentsAnimationController().cancelAnimation( - REORDER_MOVE_TO_ORIGINAL_POSITION, "wallpaperDrawPendingTimeout"); + mService.getRecentsAnimationController().startAnimation(); } return true; }