Introduce new lock to avoid lock-ordering issues.
Because of the way DMD was designed, technically the class lock is below the syncroot in the lock ordering, meaning we can't call into any general display classes while holding the class lock without creating the possibility of deadlock. There's no real reason to use the class lock in this situation though, so just introduce a local lock to SensorObserver that can be above the syncroot and thus call into the rest of the display stack at will. Bug: 195713475 Test: atest DisplayModeDirectorTest Change-Id: Ie32660ae3a3935f0fd4001ca73fecba1e4bbba7d
Loading
Please register or sign in to comment