Skip to content

Commit

Permalink
Launcher3: Fix monkey crash in RecentsLaunchAnimator
Browse files Browse the repository at this point in the history
It will appear a null object crash in quickstep launch
when monkey test. Althoough the 'View v' is declared as NonNull,
but there is a probability that it will return a null object
after the 'isTaskViewVisible' judgement in 'findTaskViewToLaunch',
Make a judgement before use to avoid crash.

Change-Id: I4606853325641feaf26a79791cce2514cee80d4c
Signed-off-by: Anle Pan <[email protected]>
Signed-off-by: Pranav Vashi <[email protected]>
  • Loading branch information
Anle Pan authored and MrSluffy committed Jan 28, 2024
1 parent 0681d11 commit 97c45a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions quickstep/src/com/android/quickstep/TaskViewUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ public static void composeRecentsLaunchAnimator(@NonNull AnimatorSet anim, @NonN
boolean skipLauncherChanges = !launcherClosing;

TaskView taskView = findTaskViewToLaunch(recentsView, v, appTargets);
if (taskView == null) return;
PendingAnimation pa = new PendingAnimation(RECENTS_LAUNCH_DURATION);
createRecentsWindowAnimator(recentsView, taskView, skipLauncherChanges, appTargets,
wallpaperTargets, nonAppTargets, depthController, pa);
Expand Down

0 comments on commit 97c45a0

Please sign in to comment.