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

Commit 3649d3f4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "OPP: Send proper share status of file once transfer is complete"

parents 1188453c a15afaba
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -288,19 +288,14 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession {
                Constants.updateShareStatus(mContext1, mInfo.mId, status);
            }

            if (status == BluetoothShare.STATUS_SUCCESS) {
                Message msg = Message.obtain(mCallback);
                msg.what = BluetoothOppObexSession.MSG_SHARE_COMPLETE;
                msg.obj = mInfo;
                msg.sendToTarget();
            } else {
            Message msg = Message.obtain(mCallback);
                msg.what = BluetoothOppObexSession.MSG_SESSION_ERROR;
            msg.what = (status == BluetoothShare.STATUS_SUCCESS) ?
                        BluetoothOppObexSession.MSG_SHARE_COMPLETE :
                        BluetoothOppObexSession.MSG_SESSION_ERROR;
            mInfo.mStatus = status;
            msg.obj = mInfo;
            msg.sendToTarget();
        }
        }

        /*
         * Validate this ShareInfo
+1 −2
Original line number Diff line number Diff line
@@ -721,8 +721,7 @@ public class BluetoothOppService extends Service {
                .getColumnIndexOrThrow(BluetoothShare.USER_CONFIRMATION));
        int newStatus = cursor.getInt(statusColumn);

        if (!BluetoothShare.isStatusCompleted(info.mStatus)
                && BluetoothShare.isStatusCompleted(newStatus)) {
        if (BluetoothShare.isStatusCompleted(info.mStatus)) {
            mNotifier.mNotificationMgr.cancel(info.mId);
        }