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

Commit fdf54813 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Binder tests: add explicit constructor to initialize ProcessSession

Bug: 289151149
Test: binder_rpc_test
Change-Id: I95da79d6707b77cfb7071aa91a65a25504a48fb3
parent d9154a7a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ struct BinderRpcTestProcessSession {
        expectAlreadyShutdown = true;
    }

    BinderRpcTestProcessSession(std::unique_ptr<ProcessSession> proc) : proc(std::move(proc)){};
    BinderRpcTestProcessSession(BinderRpcTestProcessSession&&) = default;
    ~BinderRpcTestProcessSession() {
        if (!expectAlreadyShutdown) {
@@ -138,9 +139,7 @@ public:
    }

    BinderRpcTestProcessSession createRpcTestSocketServerProcess(const BinderRpcOptions& options) {
        BinderRpcTestProcessSession ret{
                .proc = createRpcTestSocketServerProcessEtc(options),
        };
        BinderRpcTestProcessSession ret(createRpcTestSocketServerProcessEtc(options));

        ret.rootBinder = ret.proc->sessions.empty() ? nullptr : ret.proc->sessions.at(0).root;
        ret.rootIface = interface_cast<IBinderRpcTest>(ret.rootBinder);