Merge "Prevent potential NPE of checking task drawn for logger" into sc-dev

This commit is contained in:
Riddle Hsu
2021-05-31 07:23:09 +00:00
committed by Android (Google) Code Review

View File

@@ -780,7 +780,7 @@ class ActivityMetricsLogger {
// window drawn event should report later to complete the transition. Otherwise all
// activities in this task may be finished, invisible or drawn, so the transition event
// should be cancelled.
if (t.forAllActivities(
if (t != null && t.forAllActivities(
a -> a.mVisibleRequested && !a.isReportedDrawn() && !a.finishing)) {
return;
}