From 19666ccb534d0228d7212d4ef5e84855b9e29af0 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Mon, 9 Jun 2025 12:16:15 +0100 Subject: [PATCH 1/2] Mark TaskSnapshot from onAnimationCanceled Nullable - TaskSnapshot from onAnimationCanceled can be null, and our Kotlin assumes it's not and throws NullPointerException. Handle it gracefully instead. - Even though onAnimationCanceled doesn't provide updated screenshot, we still have the screenshot taken on swipe up as backup to show Fix: 413581605 Test: Manual (see steps in bug) Flag: EXEMPT bug fix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7eb6b3fa1557873423d2fc6c286103ef141a24ff) Merged-In: Ic4aaa8e1a50a4e2a8b7b87baff5f2b1819a7e8ab Change-Id: Ic4aaa8e1a50a4e2a8b7b87baff5f2b1819a7e8ab --- quickstep/src/com/android/quickstep/SystemUiProxy.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.kt b/quickstep/src/com/android/quickstep/SystemUiProxy.kt index b90862d2c9..d9cd79d4bd 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.kt +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.kt @@ -1304,8 +1304,9 @@ class SystemUiProxy @Inject constructor(@ApplicationContext private val context: transitionInfo, ) - override fun onAnimationCanceled(taskIds: IntArray?, taskSnapshots: Array?) = + override fun onAnimationCanceled(taskIds: IntArray?, taskSnapshots: Array?) { listener.onAnimationCanceled(wrap(taskIds, taskSnapshots)) + } override fun onTasksAppeared( apps: Array?, From 202bb8e7974da3d2a43a83f8264c8a293274b6cc Mon Sep 17 00:00:00 2001 From: Schneider Victor-Tulias Date: Wed, 11 Jun 2025 16:03:21 -0400 Subject: [PATCH 2/2] Fix a missing null-check in AbsSwipeUpHandler Flag: EXEMPT bug fix Fixes: 423027896 Test: ran launcher (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c633e26434aeb9d1a4c4630d6db1d4ab477a1a1d) Merged-In: I44ae9215a83f169c1fa052d322ba5346312536b3 Change-Id: I44ae9215a83f169c1fa052d322ba5346312536b3 --- .../src/com/android/quickstep/AbsSwipeUpHandler.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 86fa65047c..aa9371d655 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1073,12 +1073,10 @@ public abstract class AbsSwipeUpHandler< } mHandled = true; - InteractionJankMonitorWrapper.begin(mRecentsView, Cuj.CUJ_LAUNCHER_QUICK_SWITCH, - 2000 /* ms timeout */); - InteractionJankMonitorWrapper.begin(mRecentsView, - Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); - InteractionJankMonitorWrapper.begin(mRecentsView, - Cuj.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS); + InteractionJankMonitorWrapper.begin( + rv, Cuj.CUJ_LAUNCHER_QUICK_SWITCH, /* timeoutMs= */ 2000); + InteractionJankMonitorWrapper.begin(rv, Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); + InteractionJankMonitorWrapper.begin(rv, Cuj.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS); rv.post(() -> rv.getViewTreeObserver().removeOnDrawListener(this)); }