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

Commit d98952d0 authored by Steven Moreland's avatar Steven Moreland
Browse files

servicemanager: log if doesn't become ctx mgr

Currently, this is a silent failure.

This is made to be fatal in a separate patch, for
revertability.

Bug: 280514080
Test: boot
Change-Id: If5a524f056d77905c818f466c5c677666caa1640
parent 71ea90d3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -131,7 +131,10 @@ int main(int argc, char** argv) {
    }

    IPCThreadState::self()->setTheContextObject(manager);
    ps->becomeContextManager();
    if (!ps->becomeContextManager()) {
        LOG(ERROR) << "Could not become context manager";
        // TODO(b/280514080): fatal
    }

    sp<Looper> looper = Looper::prepare(false /*allowNonCallbacks*/);

+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public:
    // For main functions - dangerous for libraries to use
    void startThreadPool();

    bool becomeContextManager();
    [[nodiscard]] bool becomeContextManager();

    sp<IBinder> getStrongProxyForHandle(int32_t handle);
    void expungeHandle(int32_t handle, IBinder* binder);