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

Commit 8e9174b7 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Gerrit Code Review
Browse files

Merge "Binder tests: add explicit constructor to initialize ProcessSession"

parents 3e4713f5 fdf54813
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);