diff options
author | Liejun Tao <L.J.Tao@motorola.com> | 2011-06-15 16:58:21 -0500 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-06-15 18:17:13 -0700 |
commit | 44c347ad717ca51b00819736227f7a9c81905396 (patch) | |
tree | ede7c2a2e1a404f71de8d6d8adfc26cc89bc9f73 /src/com/android/bluetooth/opp/BluetoothOppTransfer.java | |
parent | d318d6a134efc5bd43653c463699802381f2e0cb (diff) | |
download | android_packages_apps_Bluetooth-44c347ad717ca51b00819736227f7a9c81905396.tar.gz android_packages_apps_Bluetooth-44c347ad717ca51b00819736227f7a9c81905396.tar.bz2 android_packages_apps_Bluetooth-44c347ad717ca51b00819736227f7a9c81905396.zip |
Modify the Rfcomm retry logic
In BluetoothOppTransfer where we check mRetry and e.getMessage()
if mRetry is false and e is not "Invalid exchange", the transfer is stuck
Change-Id: Ie7a4da215c9e74e167db9fa29c6e113a7a7a2c77
Diffstat (limited to 'src/com/android/bluetooth/opp/BluetoothOppTransfer.java')
-rw-r--r-- | src/com/android/bluetooth/opp/BluetoothOppTransfer.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java index 97a357cf0..78dd4f5bd 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java +++ b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java @@ -720,14 +720,14 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch // again, but we need to retry. There is no good way to // inform this socket asking it to retry apart from a blind // delayed retry. - if (mRetry) { - BluetoothOppPreference.getInstance(mContext) - .removeChannel(device, OPUSH_UUID16); - markConnectionFailed(btSocket); - } else if (e.getMessage().equals(SOCKET_LINK_KEY_ERROR)) { + if (!mRetry && e.getMessage().equals(SOCKET_LINK_KEY_ERROR)) { Message msg = mSessionHandler.obtainMessage(SOCKET_ERROR_RETRY, channel, -1, device); mSessionHandler.sendMessageDelayed(msg, 2500); + } else { + BluetoothOppPreference.getInstance(mContext) + .removeChannel(device, OPUSH_UUID16); + markConnectionFailed(btSocket); } } } |