diff options
author | Mariusz Skamra <mariusz.skamra@codecoup.pl> | 2020-11-17 09:11:17 +0000 |
---|---|---|
committer | Ćukasz Rymanowski <lukasz.rymanowski@codecoup.pl> | 2021-12-17 07:56:45 +0000 |
commit | fbbb005a03fa7fb0fda87afd7d6015d44cae7a3c (patch) | |
tree | 0636cfacbab6bc0d05c97637a31011ca7e5abc33 /service/java/com/android/server/bluetooth/BluetoothManagerService.java | |
parent | 7c3c05e7b5caaa6c612941770c40edd59d9e4aa6 (diff) |
gtbs: Add Generic Telephone Bearer Service support
Tag: #feature
Bug: 159786353
Sponsor: jpawlowski@
Test: build
Change-Id: I8264ade4b07df17fc0207437dfdcae7028cc20ff
Diffstat (limited to 'service/java/com/android/server/bluetooth/BluetoothManagerService.java')
-rw-r--r-- | service/java/com/android/server/bluetooth/BluetoothManagerService.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothManagerService.java b/service/java/com/android/server/bluetooth/BluetoothManagerService.java index 8860a81641..2c6bf2bd37 100644 --- a/service/java/com/android/server/bluetooth/BluetoothManagerService.java +++ b/service/java/com/android/server/bluetooth/BluetoothManagerService.java @@ -46,6 +46,7 @@ import android.bluetooth.IBluetoothManager; import android.bluetooth.IBluetoothManagerCallback; import android.bluetooth.IBluetoothProfileServiceConnection; import android.bluetooth.IBluetoothStateChangeCallback; +import android.bluetooth.IBluetoothLeCallControl; import android.content.ActivityNotFoundException; import android.content.AttributionSource; import android.content.BroadcastReceiver; @@ -1328,11 +1329,15 @@ class BluetoothManagerService extends IBluetoothManager.Stub { + bluetoothProfile); } - if (bluetoothProfile != BluetoothProfile.HEADSET) { + Intent intent; + if (bluetoothProfile == BluetoothProfile.HEADSET) { + intent = new Intent(IBluetoothHeadset.class.getName()); + } else if (bluetoothProfile== BluetoothProfile.LE_CALL_CONTROL) { + intent = new Intent(IBluetoothLeCallControl.class.getName()); + } else { return false; } - Intent intent = new Intent(IBluetoothHeadset.class.getName()); psc = new ProfileServiceConnections(intent); if (!psc.bindService()) { return false; |