summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
index bf3e91ff6..e0a4bcad8 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
@@ -353,14 +353,15 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
mIconLoadRequest = iconCache.updateIconInBackground(mTask,
(task) -> {
setIcon(task.icon);
- if (isRunningTask()) {
+ if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask()) {
getRecentsView().updateLiveTileIcon(task.icon);
}
mDigitalWellBeingToast.initialize(
mTask,
contentDescription -> {
setContentDescription(contentDescription);
- if (mDigitalWellBeingToast.getVisibility() == VISIBLE) {
+ if (mDigitalWellBeingToast.getVisibility() == VISIBLE
+ && getRecentsView() != null) {
getRecentsView().onDigitalWellbeingToastShown();
}
});
@@ -716,6 +717,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
}
public boolean isRunningTask() {
+ if (getRecentsView() == null) {
+ return false;
+ }
return this == getRecentsView().getRunningTaskView();
}