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

Commit 949865b8 authored by Yue Li's avatar Yue Li Committed by Yue Li
Browse files

Make sendVolumeUpdate method and VolumeAlias visible to ArcAudioService

- change mStreamVolumeAlias from private to protected
  ArcAudioService will use it to revert rescaled volume
- change sendVolumeUpdate method from private to protected
  ArcAudioService will override it to send request to the Host

Bug: 36129286
Test: Make such changes will allow ArcAudioService to successfully
      handle volume update requests.

Change-Id: I1e294d20187c6aa6d158a981814aa9b9a87a336c
parent 024fba87
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ public class AudioService extends IAudioService.Stub
        AudioSystem.STREAM_MUSIC,           // STREAM_TTS
        AudioSystem.STREAM_MUSIC            // STREAM_ACCESSIBILITY
    };
    private int[] mStreamVolumeAlias;
    protected static int[] mStreamVolumeAlias;

    /**
     * Map AudioSystem.STREAM_* constants to app ops.  This should be used
@@ -1817,7 +1817,7 @@ public class AudioService extends IAudioService.Stub
    }

    // UI update and Broadcast Intent
    private void sendVolumeUpdate(int streamType, int oldIndex, int index, int flags) {
    protected void sendVolumeUpdate(int streamType, int oldIndex, int index, int flags) {
        streamType = mStreamVolumeAlias[streamType];

        if (streamType == AudioSystem.STREAM_MUSIC) {