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

Commit ea8dd2c7 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

Change-Id: I890e74316a04fee3e74f90b6e640e0b527c8a57d
parents 5c4fbd28 2eb29c0d
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) {