From 688148ac693a17f248c021319eae2b6a24e0dc66 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 7 Jan 2022 18:32:14 +0000 Subject: [PATCH] Add null check when logging quick switch Test: none Fixes: 209993127 Change-Id: I927f8969cf5ef3759b501fe1ada4d3b061b53d06 --- quickstep/src/com/android/quickstep/views/TaskView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index 9887630e7d..6a2c997e05 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -470,7 +470,9 @@ public class TaskView extends FrameLayout implements Reusable { stubInfo.user = componentKey.user; stubInfo.intent = new Intent().setComponent(componentKey.componentName); stubInfo.title = task.title; - stubInfo.screenId = getRecentsView().indexOfChild(this); + if (getRecentsView() != null) { + stubInfo.screenId = getRecentsView().indexOfChild(this); + } return stubInfo; }