commit | 7fe18ea17d1e0759424dd7eaa2586b4219504aea | [log] [tgz] |
---|---|---|
author | Riddle Hsu <riddlehsu@google.com> | Mon May 31 12:40:07 2021 +0800 |
committer | Riddle Hsu <riddlehsu@google.com> | Mon May 31 12:40:07 2021 +0800 |
tree | b779f84cb83008f12b904e01478ae5e8ac677c0c | |
parent | 0a40c03eb1a0583c7cac687d679d281683fae293 [diff] |
Prevent potential NPE of checking task drawn for logger The place is only called from: 1. notifyActivityLaunched (more likely) The activity must be launched successfully so ideally its task shouldn't be null. 2. notifyVisibilityChanged The only caller (setVisibility) has checked non-null parent (task). Still add a simple check for the unknown case. Bug: 189540136 Test: ActivityMetricsLaunchObserverTests Change-Id: Iae4a3ad1ae35f1a206d5cf47c7e41e0013aa5077