Add wrapper for AudioManager, allowing it to be faked in tests
Makes HdmiControlService's test constructor take a wrapper for AudioManager, allowing it to be to be faked in unit tests in a similar way to AudioDeviceVolumeManager. Adds the FakeAudioFramework class, which exposes a fake for both AudioManager and AudioDeviceVolumeManager. FakeAudioFramework stores the shared internal state for both managers, simulating AudioService. Renames the existing wrapper and wrapper interface for AudioDeviceVolumeManager to make it more consistent with PowerManagerInternal. For example, instead of ThingWrapper and FakeThingWrapper implementing ThingWrapperInterface, we have DefaultThingWrapper and FakeThingWrapper implementing ThingWrapper. Bug: 217923086 Test: atest com.android.server.hdmi Change-Id: Ia9d5f7aa382223d523771b8d0382d40d622aa292
Loading
Please register or sign in to comment