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

Commit 374bde37 authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "OBEX: Avoid pre-sending CONTINUE for SRM enabled case" am: edfb333a

am: cca3c9bb

Change-Id: Ia9edce62a31b5344b5627bf0d141d72d40d6e37c
parents 9a612c73 cca3c9bb
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -195,7 +195,12 @@ public final class ServerOperation implements Operation, BaseStream {
            if(!handleObexPacket(packet)) {
                return;
            }
            if (!mHasBody) {
            /* Don't Pre-Send continue when Remote requested for SRM
             * Let the Application confirm.
             */
            if (V) Log.v(TAG, "Get App confirmation if SRM ENABLED case: " + mSrmEnabled
                    + " not hasBody case: " + mHasBody);
            if (!mHasBody && !mSrmEnabled) {
                while ((!mGetOperation) && (!finalBitSet)) {
                    sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
                    if (mPrivateInput.available() > 0) {
@@ -204,8 +209,13 @@ public final class ServerOperation implements Operation, BaseStream {
                }
            }
        }

        while ((!mGetOperation) && (!finalBitSet) && (mPrivateInput.available() == 0)) {
        /* Don't Pre-Send continue when Remote requested for SRM
          * Let the Application confirm.
          */
        if (V) Log.v(TAG, "Get App confirmation if SRM ENABLED case: " + mSrmEnabled
            + " not finalPacket: " + finalBitSet + " not GETOp Case: " + mGetOperation);
        while ((!mSrmEnabled) && (!mGetOperation) && (!finalBitSet)
                && (mPrivateInput.available() == 0)) {
            sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
            if (mPrivateInput.available() > 0) {
                break;