commit | ac0134bc53d063370d3c653947b09ad5cd357a13 | [log] [tgz] |
---|---|---|
author | Nathalie Le Clair <lcnathalie@google.com> | Thu May 06 18:17:33 2021 +0200 |
committer | Nathalie Le Clair <lcnathalie@google.com> | Tue May 11 18:25:51 2021 +0200 |
tree | f1dd494f79a423f3591ad56ba3a0a9f94735ef42 | |
parent | 30d28b1cbf6baed3403d4f17ea3a3748e47e629e [diff] |
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