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

Commit 2eb29c0d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Always set sys.usb.ffs.mtp.ready during configure"

parents 2a18bd96 fbc8b068
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ int MtpFfsHandle::start() {

int MtpFfsHandle::configure(bool usePtp) {
    // Wait till previous server invocation has closed
    if (!mLock.try_lock_for(std::chrono::milliseconds(1000))) {
    if (!mLock.try_lock_for(std::chrono::milliseconds(300))) {
        LOG(ERROR) << "MtpServer was unable to get configure lock";
        return -1;
    }
+4 −5
Original line number Diff line number Diff line
@@ -134,12 +134,11 @@ int MtpServer::configure(bool usePtp) {
            sHandle = new MtpDevHandle();
        }
    }
    if (sHandle->configure(usePtp)) {
        ALOGE("Failed to configure Mtp driver!");
        return -1;
    }

    int ret = sHandle->configure(usePtp);
    if (ret) ALOGE("Failed to configure MTP driver!");
    android::base::SetProperty("sys.usb.ffs.mtp.ready", "1");
    return 0;
    return ret;
}

void MtpServer::addStorage(MtpStorage* storage) {