commit | 7302505c7d643e1a9f47fd257935e45b9bb110aa | [log] [tgz] |
---|---|---|
author | Evan Laird <evanlaird@google.com> | Wed Apr 28 16:04:46 2021 -0400 |
committer | Evan Laird <evanlaird@google.com> | Tue May 04 15:43:34 2021 -0400 |
tree | a4e2f7c9e5b8778223a6f208995dce9b3800dc73 | |
parent | 08d64fbc050c7893227f873cd342665dfe7f3289 [diff] |
Use synchronize instead of Assert.isMainThread DemoModeController tried to make sure adding callbacks always happened on the main thread. But it's breaking some tests if it somehow gets instantiated (lazily, by Dagger) on a background thread. It should be fine to just use a couple of locks and call it a day, but eventually it'd be better to fix that dagger problem... Test: atest SystemUITests Fixes: 170122983 Change-Id: Ieff52b268aec4194e932823353c739c1e0641acc