Skip to content

Commit

Permalink
Fix NPE in FallbackSwipeHandler when getRunningTask() returns null
Browse files Browse the repository at this point in the history
mGestureState.getRunningTask() is probably null in this situation, we
need to add a null check here refer to the usage in TaskAnimationManager.

Bug: 263041039
Test: manual
Change-Id: I7707bf204190ff506f40640ff764f07cb98aab68
  • Loading branch information
shawnlinboy authored and thestinger committed Sep 18, 2023
1 parent dfae148 commit cfbfcef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public FallbackSwipeHandler(Context context, RecentsAnimationDeviceState deviceS
super(context, deviceState, taskAnimationManager, gestureState, touchTimeMs,
continuingLastGesture, inputConsumer);

mRunningOverHome = mGestureState.getRunningTask().isHomeTask();
mRunningOverHome = mGestureState.getRunningTask() != null
&& mGestureState.getRunningTask().isHomeTask();
if (mRunningOverHome) {
runActionOnRemoteHandles(remoteTargetHandle ->
remoteTargetHandle.getTransformParams().setHomeBuilderProxy(
Expand Down

0 comments on commit cfbfcef

Please sign in to comment.