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

Commit bee6be16 authored by Parth Sane's avatar Parth Sane
Browse files

Remove onAsBinder() override for BackendUnifiedServiceManager

The implementation of onAsBinder was bypassing the
BackendUnifiedServiceManager when called in Java.

Test: N/A
Bug: 333854840
Flag: exempt. Bugfix
Change-Id: I0c364c3cb3c7ccbd59a3da041ec801357433479e
parent 382fc4d2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -57,8 +57,6 @@ public:
        return mTheRealServiceManager->getInterfaceDescriptor();
    }

    IBinder* onAsBinder() override { return IInterface::asBinder(mTheRealServiceManager).get(); }

private:
    sp<os::IServiceManager> mTheRealServiceManager;
    void toBinderService(const os::Service& in, os::Service* _out);
+2 −1
Original line number Diff line number Diff line
@@ -301,7 +301,8 @@ TEST_P(BinderRpc, CannotSendRegularBinderOverSocketBinder) {

    auto proc = createRpcTestSocketServerProcess({});

    sp<IBinder> someRealBinder = IInterface::asBinder(defaultServiceManager());
    sp<IBinder> someRealBinder = defaultServiceManager()->getService(String16("activity"));
    ASSERT_NE(someRealBinder, nullptr);
    sp<IBinder> outBinder;
    EXPECT_EQ(INVALID_OPERATION,
              proc.rootIface->repeatBinder(someRealBinder, &outBinder).transactionError());