From 5f24a24004a9694db757dd6e666d0061dfbdf2b0 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Mon, 30 Nov 2009 14:17:30 -0800 Subject: Register Handsfree profile before headset profile. DO NOT MERGE. There is a delay between registering the two profiles, and handsfree profile is a superset of the headset profile. So some devices do an SDP and get the headset profile record before we have registered the handsfree profile. a) We can reject all incoming connections till all profiles are registered, but then this would mean we connect later in some cases. Registering profiles in this order seems fine to me. Note: There is a also the need to fix forking sdptool to register profiles, which would obliviate the need to wait 500 msecs between profile registrations. Bug: 2293792 Dr No: Eastham --- core/java/android/server/BluetoothService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index db9f34a68c38..765d510e96e0 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -344,14 +344,14 @@ public class BluetoothService extends IBluetooth.Stub { // records, use a DBUS call instead. switch (msg.arg1) { case 1: - Log.d(TAG, "Registering hsag record"); - SystemService.start("hsag"); + Log.d(TAG, "Registering hfag record"); + SystemService.start("hfag"); mHandler.sendMessageDelayed( mHandler.obtainMessage(MESSAGE_REGISTER_SDP_RECORDS, 2, -1), 500); break; case 2: - Log.d(TAG, "Registering hfag record"); - SystemService.start("hfag"); + Log.d(TAG, "Registering hsag record"); + SystemService.start("hsag"); mHandler.sendMessageDelayed( mHandler.obtainMessage(MESSAGE_REGISTER_SDP_RECORDS, 3, -1), 500); break; -- cgit v1.2.3-59-g8ed1b