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

Commit 16275802 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "AbsoluteVolume change custom call to official API" am:...

Merge "Merge "AbsoluteVolume change custom call to official API" am: d51c3f3a am: 29da6bb3 am: 548b9eaf am: 22968056 am: af22a31d"
parents d1773d2c 3cabddc6
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -5233,21 +5233,6 @@ public class AudioManager {
        }
    }

    /**
     * @hide
     * Notifies AudioService that it is connected to an A2DP device that supports absolute volume,
     * so that AudioService can send volume change events to the A2DP device, rather than handling
     * them.
     */
    public void avrcpSupportsAbsoluteVolume(String address, boolean support) {
        final IAudioService service = getService();
        try {
            service.avrcpSupportsAbsoluteVolume(address, support);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

     /**
      * {@hide}
      */
+0 −2
Original line number Diff line number Diff line
@@ -180,8 +180,6 @@ interface IAudioService {

    int getEncodedSurroundMode(int targetSdkVersion);

    oneway void avrcpSupportsAbsoluteVolume(String address, boolean support);

    void setSpeakerphoneOn(IBinder cb, boolean on);

    boolean isSpeakerphoneOn();
+6 −1
Original line number Diff line number Diff line
@@ -6163,6 +6163,11 @@ public class AudioService extends IAudioService.Stub
        if (pkgName == null) {
            pkgName = "";
        }
        if (device.getType() == AudioDeviceInfo.TYPE_BLUETOOTH_A2DP) {
            avrcpSupportsAbsoluteVolume(device.getAddress(),
                    deviceVolumeBehavior == AudioManager.DEVICE_VOLUME_BEHAVIOR_ABSOLUTE);
            return;
        }

        int audioSystemDeviceOut = AudioDeviceInfo.convertDeviceTypeToInternalDevice(
                device.getType());
@@ -7841,7 +7846,7 @@ public class AudioService extends IAudioService.Stub
        }
    }

    public void avrcpSupportsAbsoluteVolume(String address, boolean support) {
    private void avrcpSupportsAbsoluteVolume(String address, boolean support) {
        // address is not used for now, but may be used when multiple a2dp devices are supported
        sVolumeLogger.log(new AudioEventLogger.StringEvent("avrcpSupportsAbsoluteVolume addr="
                + address + " support=" + support));