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

Commit aa2eb4d5 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "leaudio: Add set volume API"

parents ac42efbd 3b186a23
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -1008,6 +1008,16 @@ public class LeAudioService extends ProfileService {
        return LE_AUDIO_GROUP_ID_INVALID;
    }

    /**
     * Set volume for streaming devices
     * @param volume volume to set
     */
    public void setVolume(int volume) {
        if (DBG) {
            Log.d(TAG, "SetVolume " + volume);
        }
    }

    /**
     * Binder object: must be a static class or memory leak may occur
     */
@@ -1127,6 +1137,16 @@ public class LeAudioService extends ProfileService {

            return service.getGroupId(device);
        }

        @Override
        public void setVolume(int volume, AttributionSource source) {
            LeAudioService service = getService(source);
            if (service == null) {
                return;
            }

            service.setVolume(volume);
        }
    }

    @Override