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

Commit 75eda5be authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Merge "Allow getResponseCode to block if response hasn't been received from...

Merge "Allow getResponseCode to block if response hasn't been received from remote" am: 834e5ce1 am: b9878329 am: 3cc3bd3f
am: 9af2967a

Change-Id: If9f871b89a290b1c90e229e11a7a1ae957e9708d
parents 1da4f947 9af2967a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -207,7 +207,6 @@ public final class ClientOperation implements Operation, BaseStream {
     *         object
     */
    public synchronized int getResponseCode() throws IOException {
        //avoid dup validateConnection
        if ((mReplyHeader.responseCode == -1)
                || (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE)) {
            validateConnection();
@@ -423,8 +422,9 @@ public final class ClientOperation implements Operation, BaseStream {
    private void validateConnection() throws IOException {
        ensureOpen();

        // to sure only one privateInput object exist.
        if (mPrivateInput == null) {
        // Make sure that a response has been recieved from remote
        // before continuing
        if (mPrivateInput == null || mReplyHeader.responseCode == -1) {
            startProcessing();
        }
    }