From d9b6d6a86f28ce757160f10a2bd32d3527516af5 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Thu, 28 Jan 2021 16:16:33 -0800 Subject: [PATCH] Check whether the running task view is non null before setting it to be not clickable for live tile Fixes: 178746755 Test: N/A Change-Id: Ia8d8bc48a31e4d1babcb948bb27717d14cdb1247 --- quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 5a2d6daac0..39a3a7c40c 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1451,7 +1451,10 @@ public abstract class AbsSwipeUpHandler, Q extends private void finishCurrentTransitionToRecents() { if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED); - mRecentsView.getRunningTaskView().setIsClickableAsLiveTile(true); + final TaskView runningTaskView = mRecentsView.getRunningTaskView(); + if (runningTaskView != null) { + runningTaskView.setIsClickableAsLiveTile(true); + } } else if (!hasTargets() || mRecentsAnimationController == null) { // If there are no targets or the animation not started, then there is nothing to finish mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);