diff options
author | Nitin Shivpure <nshivpur@codeaurora.org> | 2014-01-31 18:39:17 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-02-28 03:31:41 -0800 |
commit | 82f570b67226182884de7d2c20500196c2f37dfb (patch) | |
tree | 274474f775ef1d85f3d23d8ca5fb2758a9f12f62 /src | |
parent | 8aebd33674634f2f1caa994a95ff95c9f592091e (diff) | |
download | android_packages_apps_BluetoothExt-82f570b67226182884de7d2c20500196c2f37dfb.tar.gz android_packages_apps_BluetoothExt-82f570b67226182884de7d2c20500196c2f37dfb.tar.bz2 android_packages_apps_BluetoothExt-82f570b67226182884de7d2c20500196c2f37dfb.zip |
Bluetooth: Avoiding a ANR, if FTP service record is not registered
A case where monkey is running. When BT is turned on, Rfcomm
Server Socket is not created during FTP SDP registration on 1st
attempt. So FTP was retrying to create RFCOMM server socket after
sleeping 3 second. As it was running under main thread context. So
ANR was occurred due to longer sleep(3s). Reducing the sleep from 3s
to 300ms to solve the issue.
Change-Id: I93b9e6f77dc1a1f3d941571299e86285f0b44b32
CRs-Fixed: 611677
Diffstat (limited to 'src')
-rw-r--r-- | src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java index 9eea7e3..9fe8c63 100644 --- a/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java +++ b/src/org/codeaurora/bluetooth/ftp/BluetoothFtpService.java @@ -410,8 +410,8 @@ public class BluetoothFtpService extends Service { if (!initSocketOK) { synchronized (this) { try { - if (VERBOSE) Log.v(TAG, "wait 3 seconds"); - Thread.sleep(3000); + if (VERBOSE) Log.v(TAG, "wait 300 ms"); + Thread.sleep(300); } catch (InterruptedException e) { Log.e(TAG, "socketAcceptThread thread was interrupted (3)"); mInterrupted = true; |