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

Commit 72b12e42 authored by Primiano Tucci's avatar Primiano Tucci Committed by android-build-merger
Browse files

Merge "DropboxManager: Add err message if passing an invalid fd to addFile()" am: 90529d21

am: 13d6ac4a

Change-Id: I2ef468422d41228ce5b10028b4f8da4e3c5d23ce
parents 371cb6c4 13d6ac4a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -185,6 +185,11 @@ DropBoxManager::addFile(const String16& tag, const string& filename, int flags)
Status
DropBoxManager::addFile(const String16& tag, int fd, int flags)
{
    if (fd == -1) {
        string message("invalid fd (-1) passed to to addFile");
        ALOGW("DropboxManager: %s", message.c_str());
        return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE, message.c_str());
    }
    Entry entry(tag, flags, fd);
    return add(entry);
}
@@ -201,4 +206,3 @@ DropBoxManager::add(const Entry& entry)
}

}} // namespace android::os