Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +6 −5 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetoothLeAudio; import android.bluetooth.IBluetoothLeAudioCallback; import android.bluetooth.IBluetoothLeBroadcastCallback; import android.bluetooth.IBluetoothVolumeControl; import android.content.AttributionSource; import android.content.BroadcastReceiver; import android.content.Context; Loading Loading @@ -414,10 +415,10 @@ public class LeAudioService extends ProfileService { private int getGroupVolume(int groupId) { if (mVolumeControlService == null) { mVolumeControlService = mServiceFactory.getVolumeControlService(); } if (mVolumeControlService == null) { Log.e(TAG, "Volume control service is not available"); return -1; return IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME; } } return mVolumeControlService.getGroupVolume(groupId); Loading Loading @@ -907,7 +908,7 @@ public class LeAudioService extends ProfileService { + previousOutDevice + ", mActiveOutDevice: " + mActiveAudioOutDevice + " isLeOutput: true"); } int volume = -1; int volume = IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME; if (mActiveAudioOutDevice != null) { volume = getGroupVolume(groupId); } Loading android/app/src/com/android/bluetooth/vc/VolumeControlService.java +2 −1 Original line number Diff line number Diff line Loading @@ -593,7 +593,8 @@ public class VolumeControlService extends ProfileService { * @param groupId */ public int getGroupVolume(int groupId) { return mGroupVolumeCache.getOrDefault(groupId, -1); return mGroupVolumeCache.getOrDefault(groupId, IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME); } /** Loading system/binder/android/bluetooth/IBluetoothVolumeControl.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ import com.android.modules.utils.SynchronousResultReceiver; * @hide */ oneway interface IBluetoothVolumeControl { const int VOLUME_CONTROL_UNKNOWN_VOLUME = -1; /* Public API */ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)") void connect(in BluetoothDevice device, in AttributionSource attributionSource, in SynchronousResultReceiver receiver); Loading Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +6 −5 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetoothLeAudio; import android.bluetooth.IBluetoothLeAudioCallback; import android.bluetooth.IBluetoothLeBroadcastCallback; import android.bluetooth.IBluetoothVolumeControl; import android.content.AttributionSource; import android.content.BroadcastReceiver; import android.content.Context; Loading Loading @@ -414,10 +415,10 @@ public class LeAudioService extends ProfileService { private int getGroupVolume(int groupId) { if (mVolumeControlService == null) { mVolumeControlService = mServiceFactory.getVolumeControlService(); } if (mVolumeControlService == null) { Log.e(TAG, "Volume control service is not available"); return -1; return IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME; } } return mVolumeControlService.getGroupVolume(groupId); Loading Loading @@ -907,7 +908,7 @@ public class LeAudioService extends ProfileService { + previousOutDevice + ", mActiveOutDevice: " + mActiveAudioOutDevice + " isLeOutput: true"); } int volume = -1; int volume = IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME; if (mActiveAudioOutDevice != null) { volume = getGroupVolume(groupId); } Loading
android/app/src/com/android/bluetooth/vc/VolumeControlService.java +2 −1 Original line number Diff line number Diff line Loading @@ -593,7 +593,8 @@ public class VolumeControlService extends ProfileService { * @param groupId */ public int getGroupVolume(int groupId) { return mGroupVolumeCache.getOrDefault(groupId, -1); return mGroupVolumeCache.getOrDefault(groupId, IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME); } /** Loading
system/binder/android/bluetooth/IBluetoothVolumeControl.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ import com.android.modules.utils.SynchronousResultReceiver; * @hide */ oneway interface IBluetoothVolumeControl { const int VOLUME_CONTROL_UNKNOWN_VOLUME = -1; /* Public API */ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)") void connect(in BluetoothDevice device, in AttributionSource attributionSource, in SynchronousResultReceiver receiver); Loading