commit | 01f38dc5bce19ddea80eaf5b4118c60cb7b74686 | [log] [tgz] |
---|---|---|
author | Philip Junker <philipjunker@google.com> | Mon Oct 10 08:45:18 2022 +0000 |
committer | Philip Junker <philipjunker@google.com> | Mon Oct 10 09:00:24 2022 +0000 |
tree | 0f838c6ccddf260b0a442c34f1cf2e3e000c690c | |
parent | 8fbb26bf9499d4d018f60533c6cceac03bfc1723 [diff] |
Initialize ContentObserver in startObserving(). This removes a race condition where ContentObserver is initialized while mHandler is null which causes the ContentObserver#onChange() callback to run on a different thread and can cause an NPE. Bug: 246843362 Test: manual Test: atest BrightnessSynchronizerTest Merged-In: Ib8e192c3961390ece721fa473d5c09323c30bafe Change-Id: Ia7443efb9e8020d46b251c7f7100adbf58072345