Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5542d052 authored by Hemant Gupta's avatar Hemant Gupta Committed by Myles Watson
Browse files

OPP: Interrup Obex Client thread while sending ABORT

Precondition: PTS 7.2.1

Use case:
1. Execute test case TC_OPP_CL_OPH_BV_27_I for OPP
2. Try to cancel the transfer as requested by PTS, by cancelling the transfer.

Expectation:
Test case should pass

Observation:
Test case fails

Root cause:
While aborting put operation IO exception is seen
because of timeout and dut closes Obex session.

Fix:
First interrupt Obex client thread, during abort
request while file transfer is active.

Test: TC_OPP_CL_OPH_BV_27_I can be passed after the patch.

Fixes: 77306447
Change-Id: I06f4a4c63999df1beb0c8913251f576636518ff8
(cherry picked from commit 6a36546d)
parent 16fb9f65
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -505,6 +505,13 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch
        if (V) {
            Log.v(TAG, "stop");
        }
        if (mSession != null) {
            if (V) {
                Log.v(TAG, "Stop mSession");
            }
            mSession.stop();
        }

        cleanUp();
        if (mConnectThread != null) {
            try {
@@ -520,12 +527,6 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch
            }
            mConnectThread = null;
        }
        if (mSession != null) {
            if (V) {
                Log.v(TAG, "Stop mSession");
            }
            mSession.stop();
        }
        // Prevent concurrent access
        synchronized (this) {
            if (mHandlerThread != null) {