diff options
author | Juffin Alex Varghese <jalex@codeaurora.org> | 2014-11-12 13:36:14 +0530 |
---|---|---|
committer | Juffin Alex Varghese <jalex@codeaurora.org> | 2014-11-14 15:34:48 +0530 |
commit | 45f7fd51100ebc26ddef291e715aec243c33b1f0 (patch) | |
tree | 71d1097cec02ade9499321c814cf9789b10a1b3a /src/com/android/bluetooth/opp/BluetoothOppTransfer.java | |
parent | 6d4632478511eee6f0bc333f244b9bfab42248d3 (diff) | |
download | android_packages_apps_Bluetooth-45f7fd51100ebc26ddef291e715aec243c33b1f0.tar.gz android_packages_apps_Bluetooth-45f7fd51100ebc26ddef291e715aec243c33b1f0.tar.bz2 android_packages_apps_Bluetooth-45f7fd51100ebc26ddef291e715aec243c33b1f0.zip |
Bluetooth-OPP: Remove OBEX session cleanup from OPP Service
OBEX session cleanup should be initiated from corresponding session
instead of OPP Service. Otherwise, during batch transfer if next file
in the batch starts before updating the previous transfer that will
lead to mismatch in status. This will cause UI progress bar stall
and transfer failure.
CRs-Fixed: 756084
Change-Id: Ibfa787396fe5f4f5b678ebcb4bdd36cb6641a161
Diffstat (limited to 'src/com/android/bluetooth/opp/BluetoothOppTransfer.java')
-rw-r--r-- | src/com/android/bluetooth/opp/BluetoothOppTransfer.java | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java index 55d116f73..acdd188de 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java +++ b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java @@ -564,31 +564,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch setConfirmed(); } } - public void markShareComplete(int newstatus) { - Log.d(TAG,"markShareComplete: newStatus = " + newstatus); - if (newstatus == BluetoothShare.STATUS_SUCCESS) { - Message msg = Message.obtain(mSessionHandler); - msg.what = BluetoothOppObexSession.MSG_SHARE_COMPLETE; - msg.obj = mCurrentShare; - msg.sendToTarget(); - } else if ((newstatus == BluetoothShare.STATUS_FORBIDDEN) && - Constants.ZERO_LENGTH_FILE) { - /* Mark the status as success when a zero length file is rejected - * by the remote device. It allows us to continue the transfer if - * we have a batch and the file(s) are yet to be sent in the row. - */ - Message msg = Message.obtain(mSessionHandler); - msg.what = BluetoothOppObexSession.MSG_SHARE_COMPLETE; - msg.obj = mCurrentShare; - msg.sendToTarget(); - Constants.ZERO_LENGTH_FILE = false; - } else { - Message msg = Message.obtain(mSessionHandler); - msg.what = BluetoothOppObexSession.MSG_SESSION_ERROR; - msg.obj = mCurrentShare; - msg.sendToTarget(); - } - } + /** * Set transfer confirmed status. It should only be called for inbound * transfer |