Loading core/java/android/bluetooth/BluetoothA2dp.java +21 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.content.Context; import android.os.IBinder; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.ServiceManager; import android.server.BluetoothA2dpService; Loading Loading @@ -338,6 +339,26 @@ public final class BluetoothA2dp implements BluetoothProfile { return false; } /** * This function checks if the remote device is an AVCRP * target and thus whether we should send volume keys * changes or not. * @hide */ public boolean shouldSendVolumeKeys(BluetoothDevice device) { if (isEnabled() && isValidDevice(device)) { ParcelUuid[] uuids = device.getUuids(); if (uuids == null) return false; for (ParcelUuid uuid: uuids) { if (BluetoothUuid.isAvrcpTarget(uuid)) { return true; } } } return false; } /** * Helper for converting a state to a string. * Loading Loading
core/java/android/bluetooth/BluetoothA2dp.java +21 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.content.Context; import android.os.IBinder; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.ServiceManager; import android.server.BluetoothA2dpService; Loading Loading @@ -338,6 +339,26 @@ public final class BluetoothA2dp implements BluetoothProfile { return false; } /** * This function checks if the remote device is an AVCRP * target and thus whether we should send volume keys * changes or not. * @hide */ public boolean shouldSendVolumeKeys(BluetoothDevice device) { if (isEnabled() && isValidDevice(device)) { ParcelUuid[] uuids = device.getUuids(); if (uuids == null) return false; for (ParcelUuid uuid: uuids) { if (BluetoothUuid.isAvrcpTarget(uuid)) { return true; } } } return false; } /** * Helper for converting a state to a string. * Loading