prevent crash with pin protected user and taskview

add forgotten null check

Bug: 265981088
Test: unit tests, CTS tests, manual tests on target
Change-Id: I16904357b28cbf73f19291010427854a45af6adc
This commit is contained in:
Carsten Rohn
2023-01-19 16:33:30 +01:00
parent 6964ec7ba2
commit a54df39cce

View File

@@ -1233,7 +1233,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
// Clear last paused activity if focused root task changed while sleeping, so that the // Clear last paused activity if focused root task changed while sleeping, so that the
// top activity of current focused task can be resumed. // top activity of current focused task can be resumed.
if (mDisplayContent.isSleeping()) { if (mDisplayContent.isSleeping() && currentFocusedTask != null) {
currentFocusedTask.clearLastPausedActivity(); currentFocusedTask.clearLastPausedActivity();
} }