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

Commit 639808f1 authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by android-build-merger
Browse files

Merge "switch to native_handle_create() for passing ownership"

am: 5fe8e519

Change-Id: I101de0e7e76f61bd3f05183f4a13ac94c79ae1aa
parents c54162d3 5fe8e519
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -74,10 +74,9 @@ int conntrackSocket(unsigned groups) {
hidl_handle handleFromFileDescriptor(base::unique_fd fd) {
    hidl_handle h;

    NATIVE_HANDLE_DECLARE_STORAGE(storage, 0, 0);
    static constexpr int kNumFds = 1;
    static constexpr int kNumInts = 0;
    native_handle_t *nh = native_handle_init(storage, kNumFds, kNumInts);
    native_handle_t *nh = native_handle_create(kNumFds, kNumInts);
    nh->data[0] = fd.release();

    static constexpr bool kTakeOwnership = true;