summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hemant Gupta <hemantg@codeaurora.org> 2016-06-07 12:53:59 +0530
committer Ajay Panicker <apanicke@google.com> 2016-06-29 22:23:24 +0000
commitb8d267a4edc5170f58ac71bc99b9b32f98adec49 (patch)
tree367c73a9b30a57d2a718f57cc35115539fa56b0e
parent83485046a59c535cad917d2a1d75b405906e4581 (diff)
PBAP: Allow wearable handsfree device for PBAP Access
Allow wearable handsfree device for PBAP Access Usecase: 1) Pair and connect with Jabra Stealth Headset. 2) Go out of range so that connection gets disconnected 3) Come back in range, so that reconnection happens. Observation: Headset fails to reconnect with DUT in some scenarios. Root Cause: Headset does not send page request to DUT in some scenarios leading to reconnection issues. This propabaly happens because Headset fails to connect PBAP in previous iteration so it goes in bad state, and does not page after Link Supervision Timeout. Current Settings code only allows Audio_video_Handsfree Class of devices to have PBAP Access permission, and set Rejected Permission for other Audio Device Class. This headset being Wearable Class (0x0404) is set as PBAP Rejected, and all PBAP connection to DUT from this remote device are rejected leading to issue of bad state in headset. Fix: Allow wearable class audio devices to also have PBAP access permission. Bug: 29219133 Change-Id: I18d8412cbeb86c18610091898d1c79f26d3d808d
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index c0757035ffb3..a879d16f2d7c 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -809,7 +809,9 @@ public final class CachedBluetoothDevice implements Comparable<CachedBluetoothDe
// No separate prompt is displayed after pairing.
if (getPhonebookPermissionChoice() == CachedBluetoothDevice.ACCESS_UNKNOWN) {
if (mDevice.getBluetoothClass().getDeviceClass()
- == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
+ == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE ||
+ mDevice.getBluetoothClass().getDeviceClass()
+ == BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET) {
setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED);
} else {
setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);