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

Commit 610d4a12 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Add comment for readPartialObject's NULL expected length.

BUG=26703522

Change-Id: I584c13e5e5d3f396aa2dfbd351c1c36f7bc0870d
parent 326edd98
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -778,6 +778,9 @@ bool MtpDevice::readPartialObject(MtpObjectHandle handle,
        ALOGE("Failed to send a read request.");
        return false;
    }
    // The expected size is null because it requires the exact number of bytes to read though
    // MTP_OPERATION_GET_PARTIAL_OBJECT allows devices to return shorter length of bytes than
    // requested. Destination's buffer length should be checked in |callback|.
    return readData(callback, nullptr /* expected size */, writtenSize, clientData);
}

@@ -798,6 +801,9 @@ bool MtpDevice::readPartialObject64(MtpObjectHandle handle,
        ALOGE("Failed to send a read request.");
        return false;
    }
    // The expected size is null because it requires the exact number of bytes to read though
    // MTP_OPERATION_GET_PARTIAL_OBJECT_64 allows devices to return shorter length of bytes than
    // requested. Destination's buffer length should be checked in |callback|.
    return readData(callback, nullptr /* expected size */, writtenSize, clientData);
}