From 4f165c948e81b2df3f30004cf1c977c3989de13d Mon Sep 17 00:00:00 2001 From: Etienne Ruffieux Date: Thu, 3 Feb 2022 10:59:08 +0000 Subject: [PATCH] Removed calls to connect/disconnect LeAudio Tag: #feature Bug: 200202780 Test: manual Change-Id: Ib4ce2776d1c1d1abee3b80f603294dc3af571440 --- .../settingslib/bluetooth/LeAudioProfile.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java index 209507ac7088e..eef2cd9a0ed1e 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LeAudioProfile.java @@ -144,20 +144,20 @@ public class LeAudioProfile implements LocalBluetoothProfile { * @hide */ public boolean connect(BluetoothDevice device) { - if (mService == null) { - return false; - } - return mService.connect(device); + if (mService == null) { + return false; + } + return mService.setConnectionPolicy(device, BluetoothProfile.CONNECTION_POLICY_ALLOWED); } /* * @hide */ public boolean disconnect(BluetoothDevice device) { - if (mService == null) { - return false; - } - return mService.disconnect(device); + if (mService == null) { + return false; + } + return mService.setConnectionPolicy(device, BluetoothProfile.CONNECTION_POLICY_FORBIDDEN); } public int getConnectionStatus(BluetoothDevice device) {