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

Commit 68a349ad authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

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

am: 3649d3f4

Change-Id: I5a05ffc7e00f740da2fc264017bc18c46f57e95d
parents e69c3ee9 3649d3f4
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);
        }