summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuffin Alex Varghese <jalex@codeaurora.org>2014-11-26 10:44:46 +0530
committerJuffin Alex Varghese <jalex@codeaurora.org>2014-12-03 13:38:03 +0530
commit9acf0403cf8041e0943fd306d6affc242de2f10b (patch)
tree4b8f1b2cd2b95d61e5144073f0459894858b15ee
parentc7c9a230ac47120fc82739bac450e997cbb923f6 (diff)
downloadandroid_packages_apps_Bluetooth-9acf0403cf8041e0943fd306d6affc242de2f10b.tar.gz
android_packages_apps_Bluetooth-9acf0403cf8041e0943fd306d6affc242de2f10b.tar.bz2
android_packages_apps_Bluetooth-9acf0403cf8041e0943fd306d6affc242de2f10b.zip
Bluetooth-OPP: Send the share status of file once transfer is complete
Share status of the file will be sent with MSG_SHARE_COMPLETE to avoid sending the file again during batch transfer. Otherwise, if DUT is sending batch containing small files transfer will be completed immediately and status may not be updated to correct state. This will lead to send same file again and cause transfer failure which is already sent and removed from the hashmap of pending shares. CRs-Fixed: 765769 Change-Id: I6d1b708be014fe454357c5082e3e43a640a6f7d7
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java1
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppService.java3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java b/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java
index 159bb097e..6684b1fd7 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java
@@ -365,6 +365,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
if (status == BluetoothShare.STATUS_SUCCESS) {
Message msg = Message.obtain(mCallback);
msg.what = BluetoothOppObexSession.MSG_SHARE_COMPLETE;
+ mInfo.mStatus = status;
msg.obj = mInfo;
msg.sendToTarget();
} else {
diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java
index 5d1846f62..3e67f8f97 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppService.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppService.java
@@ -827,8 +827,7 @@ public class BluetoothOppService extends Service {
info.mConfirm = newConfirm;
int newStatus = cursor.getInt(statusColumn);
int oldStatus = info.mStatus;
- if (!BluetoothShare.isStatusCompleted(info.mStatus)
- && BluetoothShare.isStatusCompleted(newStatus)) {
+ if (BluetoothShare.isStatusCompleted(info.mStatus)) {
mNotifier.mNotificationMgr.cancel(info.mId);
}