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

Commit d9684d59 authored by Josh Gao's avatar Josh Gao
Browse files

Reland "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor"

This reverts commit ba4684c2.

Bug: http://b/129283234
Test: manually unplugged/replugged
Change-Id: I9c8cfebe09b2855cab986068273a835a13247b77
(cherry picked from commit bfe3dac3)
parent 9e1bcc25
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -299,6 +299,7 @@ bool open_functionfs(android::base::unique_fd* out_control, android::base::uniqu
        }
        }
        // Signal only when writing the descriptors to ffs
        // Signal only when writing the descriptors to ffs
        android::base::SetProperty("sys.usb.ffs.ready", "1");
        android::base::SetProperty("sys.usb.ffs.ready", "1");
        *out_control = std::move(control);
    }
    }


    bulk_out.reset(adb_open(USB_FFS_ADB_OUT, O_RDONLY));
    bulk_out.reset(adb_open(USB_FFS_ADB_OUT, O_RDONLY));
@@ -313,7 +314,6 @@ bool open_functionfs(android::base::unique_fd* out_control, android::base::uniqu
        return false;
        return false;
    }
    }


    *out_control = std::move(control);
    *out_bulk_in = std::move(bulk_in);
    *out_bulk_in = std::move(bulk_in);
    *out_bulk_out = std::move(bulk_out);
    *out_bulk_out = std::move(bulk_out);
    return true;
    return true;