Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +0 −14 Original line number Diff line number Diff line Loading @@ -718,15 +718,7 @@ public class A2dpService extends ProfileService { .getProfileConnectionPolicy(device, BluetoothProfile.A2DP); } public boolean isAvrcpAbsoluteVolumeSupported() { // TODO (apanicke): Add a hook here for the AvrcpTargetService. return false; } public void setAvrcpAbsoluteVolume(int volume) { // TODO (apanicke): Instead of using A2DP as a middleman for volume changes, add a binder // service to the new AVRCP Profile and have the audio manager use that instead. if (mFactory.getAvrcpTargetService() != null) { mFactory.getAvrcpTargetService().sendVolumeChanged(volume); return; Loading Loading @@ -1560,12 +1552,6 @@ public class A2dpService extends ProfileService { } } @Override public void isAvrcpAbsoluteVolumeSupported(SynchronousResultReceiver receiver) { // TODO (apanicke): Add a hook here for the AvrcpTargetService. receiver.send(false); } @Override public void setAvrcpAbsoluteVolume(int volume, AttributionSource source) { A2dpService service = getService(source); Loading framework/java/android/bluetooth/BluetoothA2dp.java +0 −27 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.bluetooth.BluetoothUtils.getSyncTimeout; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -669,32 +668,6 @@ public final class BluetoothA2dp implements BluetoothProfile { return defaultValue; } /** * Checks if Avrcp device supports the absolute volume feature. * * @return true if device supports absolute volume * @hide */ @RequiresNoPermission public boolean isAvrcpAbsoluteVolumeSupported() { if (DBG) Log.d(TAG, "isAvrcpAbsoluteVolumeSupported"); final IBluetoothA2dp service = getService(); final boolean defaultValue = false; if (service == null) { Log.w(TAG, "Proxy not attached to service"); if (DBG) log(Log.getStackTraceString(new Throwable())); } else if (isEnabled()) { try { final SynchronousResultReceiver<Boolean> recv = SynchronousResultReceiver.get(); service.isAvrcpAbsoluteVolumeSupported(recv); return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue); } catch (RemoteException | TimeoutException e) { Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return defaultValue; } /** * Tells remote device to set an absolute volume. Only if absolute volume is supported * Loading system/binder/android/bluetooth/IBluetoothA2dp.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,6 @@ oneway interface IBluetoothA2dp { void setConnectionPolicy(in BluetoothDevice device, int connectionPolicy, in AttributionSource attributionSource, in SynchronousResultReceiver receiver); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.BLUETOOTH_PRIVILEGED})") void getConnectionPolicy(in BluetoothDevice device, in AttributionSource attributionSource, in SynchronousResultReceiver receiver); @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission") void isAvrcpAbsoluteVolumeSupported(in SynchronousResultReceiver receiver); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.BLUETOOTH_PRIVILEGED})") oneway void setAvrcpAbsoluteVolume(int volume, in AttributionSource attributionSource); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)") Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +0 −14 Original line number Diff line number Diff line Loading @@ -718,15 +718,7 @@ public class A2dpService extends ProfileService { .getProfileConnectionPolicy(device, BluetoothProfile.A2DP); } public boolean isAvrcpAbsoluteVolumeSupported() { // TODO (apanicke): Add a hook here for the AvrcpTargetService. return false; } public void setAvrcpAbsoluteVolume(int volume) { // TODO (apanicke): Instead of using A2DP as a middleman for volume changes, add a binder // service to the new AVRCP Profile and have the audio manager use that instead. if (mFactory.getAvrcpTargetService() != null) { mFactory.getAvrcpTargetService().sendVolumeChanged(volume); return; Loading Loading @@ -1560,12 +1552,6 @@ public class A2dpService extends ProfileService { } } @Override public void isAvrcpAbsoluteVolumeSupported(SynchronousResultReceiver receiver) { // TODO (apanicke): Add a hook here for the AvrcpTargetService. receiver.send(false); } @Override public void setAvrcpAbsoluteVolume(int volume, AttributionSource source) { A2dpService service = getService(source); Loading
framework/java/android/bluetooth/BluetoothA2dp.java +0 −27 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.bluetooth.BluetoothUtils.getSyncTimeout; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresNoPermission; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; Loading Loading @@ -669,32 +668,6 @@ public final class BluetoothA2dp implements BluetoothProfile { return defaultValue; } /** * Checks if Avrcp device supports the absolute volume feature. * * @return true if device supports absolute volume * @hide */ @RequiresNoPermission public boolean isAvrcpAbsoluteVolumeSupported() { if (DBG) Log.d(TAG, "isAvrcpAbsoluteVolumeSupported"); final IBluetoothA2dp service = getService(); final boolean defaultValue = false; if (service == null) { Log.w(TAG, "Proxy not attached to service"); if (DBG) log(Log.getStackTraceString(new Throwable())); } else if (isEnabled()) { try { final SynchronousResultReceiver<Boolean> recv = SynchronousResultReceiver.get(); service.isAvrcpAbsoluteVolumeSupported(recv); return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue); } catch (RemoteException | TimeoutException e) { Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); } } return defaultValue; } /** * Tells remote device to set an absolute volume. Only if absolute volume is supported * Loading
system/binder/android/bluetooth/IBluetoothA2dp.aidl +0 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,6 @@ oneway interface IBluetoothA2dp { void setConnectionPolicy(in BluetoothDevice device, int connectionPolicy, in AttributionSource attributionSource, in SynchronousResultReceiver receiver); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.BLUETOOTH_PRIVILEGED})") void getConnectionPolicy(in BluetoothDevice device, in AttributionSource attributionSource, in SynchronousResultReceiver receiver); @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission") void isAvrcpAbsoluteVolumeSupported(in SynchronousResultReceiver receiver); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.BLUETOOTH_PRIVILEGED})") oneway void setAvrcpAbsoluteVolume(int volume, in AttributionSource attributionSource); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)") Loading