diff options
author | Mariusz Skamra <mariusz.skamra@codecoup.pl> | 2020-11-17 09:11:17 +0000 |
---|---|---|
committer | Jack He <siyuanh@google.com> | 2022-01-11 19:36:33 +0000 |
commit | 90bd65132b36a8d9225b5645e14d1f54083fa108 (patch) | |
tree | 30e3592857dcbd3d44e33d0ac6f29216554875b1 /service/java/com/android/server/bluetooth/BluetoothManagerService.java | |
parent | 2e710d49816b4c8c5b4daf1940c1769f0bc50376 (diff) |
gtbs: Add Generic Telephone Bearer Service support
Tag: #feature
Bug: 159786353
Bug: 213412267
Sponsor: jpawlowski@
Test: build
Change-Id: Iecd56b91ce59f6b014878691fe4c6fae826b73f9
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 450e9881be..c8b4f1109b 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; |