BluetoothAvrcpController: Fix getPlayerSettings return
This is a no-op as AvrcpControllerServiceBinder#getPlayerSettings
always return null
Bug: 314402244
Test: m framework-bluetooth
Flag: EXEMPT, no-op
Change-Id: Ie3027a4eb094fba40d476366b04e2e009ade2e1a
diff --git a/framework/java/android/bluetooth/BluetoothAvrcpController.java b/framework/java/android/bluetooth/BluetoothAvrcpController.java
index 216ef30..d033d53 100644
--- a/framework/java/android/bluetooth/BluetoothAvrcpController.java
+++ b/framework/java/android/bluetooth/BluetoothAvrcpController.java
@@ -215,7 +215,6 @@
@RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
public BluetoothAvrcpPlayerSettings getPlayerSettings(BluetoothDevice device) {
if (DBG) Log.d(TAG, "getPlayerSettings");
- BluetoothAvrcpPlayerSettings settings = null;
final IBluetoothAvrcpController service = getService();
final BluetoothAvrcpPlayerSettings defaultValue = null;
if (service == null) {
@@ -226,7 +225,7 @@
final SynchronousResultReceiver<BluetoothAvrcpPlayerSettings> recv =
SynchronousResultReceiver.get();
service.getPlayerSettings(device, mAttributionSource, recv);
- settings = recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
+ return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
} catch (RemoteException | TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
}