Skip to content

Commit 8b4ca7a

Browse files
author
Matthew Xie
committed
Increase the setup-sdp delay to cover for all the devices.
20 ms worked well for GN hspa for stress test, but failed sometimes for other platform. Increased it to 50ms. Tested on all the device types bug 6438556 Change-Id: Ic5fcde3de7ea6d3d983edab7ae3df5684637bd20
1 parent 9cb376e commit 8b4ca7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/server/BluetoothService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public boolean enableNoAutoConnect() {
530530
// Bluetooth stack needs a small delay here before adding
531531
// SDP records, otherwise dbus stalls for over 30 seconds 1 out of 50 runs
532532
try {
533-
Thread.sleep(20);
533+
Thread.sleep(50);
534534
} catch (InterruptedException e) {}
535535
updateSdpRecords();
536536
return true;
@@ -602,7 +602,7 @@ private synchronized void updateSdpRecords() {
602602
// Bluetooth stack need some a small delay here before adding more
603603
// SDP records, otherwise dbus stalls for over 30 seconds 1 out of 50 runs
604604
try {
605-
Thread.sleep(20);
605+
Thread.sleep(50);
606606
} catch (InterruptedException e) {}
607607

608608
if (R.getBoolean(com.android.internal.R.bool.config_bluetooth_default_profiles)) {

0 commit comments

Comments
 (0)