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

Commit a7dab6e8 authored by Frederick Mayle's avatar Frederick Mayle
Browse files

binder: ndk: add asBinderReference method to BpCInterface

This is more efficient than `asBinder` when the caller doesn't need to
increment the ref count. Used in https://r.android.com/3211938

Test: m
Bug: 338458975
Change-Id: I15dd9b5c1033c58760e1038f09190bbbafc4bf49
parent 07889b16
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -225,6 +225,8 @@ class BpCInterface : public INTERFACE {

    SpAIBinder asBinder() override final;

    const SpAIBinder& asBinderReference() { return mBinder; }

    bool isRemote() override final { return AIBinder_isRemote(mBinder.get()); }

    binder_status_t dump(int fd, const char** args, uint32_t numArgs) override {