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

Commit ada6dd9a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE : Always set sys.usb.ffs.mtp.ready during configure" into oc-mr1-dev

parents 094cdb13 9dc10038
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -614,7 +614,7 @@ int MtpFfsHandle::start() {


int MtpFfsHandle::configure(bool usePtp) {
int MtpFfsHandle::configure(bool usePtp) {
    // Wait till previous server invocation has closed
    // 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";
        LOG(ERROR) << "MtpServer was unable to get configure lock";
        return -1;
        return -1;
    }
    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -132,7 +132,7 @@ int MtpServer::configure(bool usePtp) {


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


    return ret;
    return ret;
}
}