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

Commit 34947a58 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk: cpp asBinder/isRemote final

These shouldn't need to be overridden by clients, as requested on an
email thread. In the C++ backend, overriding asBinder incorrectly (to
return nullptr) has caused bugs as well.

Bug: N/A
Test: N/A
Change-Id: I305caf7624096bf42633df3f6cf6d28068d864ff
parent 7926d52f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -190,9 +190,9 @@ class BnCInterface : public INTERFACE {
    BnCInterface() {}
    virtual ~BnCInterface() {}

    SpAIBinder asBinder() override;
    SpAIBinder asBinder() override final;

    bool isRemote() override { return false; }
    bool isRemote() override final { return false; }

   protected:
    /**
@@ -215,9 +215,9 @@ class BpCInterface : public INTERFACE {
    explicit BpCInterface(const SpAIBinder& binder) : mBinder(binder) {}
    virtual ~BpCInterface() {}

    SpAIBinder asBinder() override;
    SpAIBinder asBinder() override final;

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

    binder_status_t dump(int fd, const char** args, uint32_t numArgs) override {
        return AIBinder_dump(asBinder().get(), fd, args, numArgs);