Reinitialize PowerManager in unit tests
PowerManager keeps a cache of isInteractive(). Therefore only the first call to PowerManager#isInteractive() can be mocked; for the next calls, the cache will be used. To avoid using the cache and to mock every call of PowerManager#isInteractive, PowerManager needs to be reinitialized on every call of HdmiControlManager#getPowerManager(). Bug: 187415933 Test: atest Change-Id: I9374cadd4f6e861ccf248d5758a86133c0dea8cd
Loading
Please register or sign in to comment