Skip to content
Commit 71afeaa6 authored by Yan Han's avatar Yan Han
Browse files

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