Skip to content
Commit ac0134bc authored by Nathalie Le Clair's avatar Nathalie Le Clair
Browse files

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
parent 30d28b1c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment