summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/opp/BluetoothOppService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/bluetooth/opp/BluetoothOppService.java')
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppService.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java
index 8e7b836c6..945d5475c 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppService.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppService.java
@@ -886,11 +886,20 @@ public class BluetoothOppService extends Service {
if (V) Log.v(TAG, "Service cancel batch for share " + info.mId);
batch.cancelBatch();
}
- if (mTransfer != null) {
- if (V) Log.v(TAG, "Stop transfer session");
+
+ /* Server/Client transfer cleanup */
+ if ((batch.mDirection == BluetoothShare.DIRECTION_OUTBOUND)
+ && (mTransfer != null)) {
+ if (V) Log.v(TAG, "Stop Client Transfer");
mTransfer.stop();
mTransfer = null;
+ } else if ((batch.mDirection == BluetoothShare.DIRECTION_INBOUND)
+ && (mServerTransfer != null)) {
+ if (V) Log.v(TAG, "Stop Server Transfer");
+ mServerTransfer.stop();
+ mServerTransfer = null;
}
+
if (batch.isEmpty()) {
if (V) Log.v(TAG, "Service remove batch " + batch.mId);
removeBatch(batch);