Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5acd27bb authored by Wenyu Zhang's avatar Wenyu Zhang
Browse files

Adjust the default gain in UI

Show a fixed full gain in UI before it really works per UX requirement.

Change-Id: I972cba2d74ce8a4880b4f5f02c52012b39f26dac
Bug: b/355684672, b/357123258
Test: atest InputRouteManagerTest
Flag: com.android.media.flags.enable_audio_input_device_routing_and_volume_control
parent bc57d803
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -212,13 +212,14 @@ public final class InputRouteManager {

    public int getMaxInputGain() {
        // TODO (b/357123335): use real input gain implementation.
        // Using 15 for now since it matches the max index for output.
        return 15;
        // Using 100 for now since it matches the maximum input gain index in classic ChromeOS.
        return 100;
    }

    public int getCurrentInputGain() {
        // TODO (b/357123335): use real input gain implementation.
        return 8;
        // Show a fixed full gain in UI before it really works per UX requirement.
        return 100;
    }

    public boolean isInputGainFixed() {
+2 −2
Original line number Diff line number Diff line
@@ -255,12 +255,12 @@ public class InputRouteManagerTest {

    @Test
    public void getMaxInputGain_returnMaxInputGain() {
        assertThat(mInputRouteManager.getMaxInputGain()).isEqualTo(15);
        assertThat(mInputRouteManager.getMaxInputGain()).isEqualTo(100);
    }

    @Test
    public void getCurrentInputGain_returnCurrentInputGain() {
        assertThat(mInputRouteManager.getCurrentInputGain()).isEqualTo(8);
        assertThat(mInputRouteManager.getCurrentInputGain()).isEqualTo(100);
    }

    @Test