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

Commit dc06020a authored by Jerry Zhang's avatar Jerry Zhang Committed by android-build-merger
Browse files

Merge "Always set sys.usb.ffs.mtp.ready during configure" am: 2eb29c0d

am: ea8dd2c7

Change-Id: Ied6c3c941931f52a58a4b10767b17d278dba2316
parents 9c59bc9c ea8dd2c7
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) {