From 28fa1960903ab40773ed19aede35548cea792d89 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Tue, 7 Jun 2022 16:04:55 -0400 Subject: [PATCH] Fix issue where System UI crashing resulted in no unlock animation. Fixes: 235254892 Test: adb shell am crash com.android.systemui Test: adb shell am crash com.google.android.apps.nexuslauncher Change-Id: Ia9644f8d1d5ffc9b162ce1608f8dd9ea9e1e3622 --- .../src/com/android/quickstep/SystemUiProxy.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 9a2619b3df..cb80b4d979 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -96,7 +96,7 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI private IPipAnimationListener mPipAnimationListener; private ISplitScreenListener mSplitScreenListener; private IStartingWindowListener mStartingWindowListener; - private ILauncherUnlockAnimationController mPendingLauncherUnlockAnimationController; + private ILauncherUnlockAnimationController mLauncherUnlockAnimationController; private IRecentTasksListener mRecentTasksListener; private final ArrayList mRemoteTransitions = new ArrayList<>(); private IOnBackInvokedCallback mBackToLauncherCallback; @@ -189,10 +189,8 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI if (mStartingWindowListener != null && mStartingWindow != null) { setStartingWindowListener(mStartingWindowListener); } - if (mPendingLauncherUnlockAnimationController != null - && mSysuiUnlockAnimationController != null) { - setLauncherUnlockAnimationController(mPendingLauncherUnlockAnimationController); - mPendingLauncherUnlockAnimationController = null; + if (mSysuiUnlockAnimationController != null && mLauncherUnlockAnimationController != null) { + setLauncherUnlockAnimationController(mLauncherUnlockAnimationController); } for (int i = mRemoteTransitions.size() - 1; i >= 0; --i) { registerRemoteTransition(mRemoteTransitions.get(i)); @@ -757,11 +755,11 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI controller.dispatchSmartspaceStateToSysui(); } } catch (RemoteException e) { - Log.w(TAG, "Failed call setStartingWindowListener", e); + Log.w(TAG, "Failed call setLauncherUnlockAnimationController", e); } - } else { - mPendingLauncherUnlockAnimationController = controller; } + + mLauncherUnlockAnimationController = controller; } /**