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

Commit 4609a4a6 authored by Carlos Martinez Romero's avatar Carlos Martinez Romero
Browse files

Call bootFinished using JNI.

This way we dont need to use FIRST_CALL_TRANSACTION which forces us to
set bootFinished as the first method in the class.

These files have also been formatted with clang.

Test: Manually booted the device after changes.
Bug: 221898546
Change-Id: Ifd04938a22da9b811c6c032c229c9b58e8c1b4c7
parent a9a058fe
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2144,6 +2144,12 @@ void SurfaceComposerClient::dispose() {
    mStatus = NO_INIT;
}

status_t SurfaceComposerClient::bootFinished() {
    sp<gui::ISurfaceComposer> sf(ComposerServiceAIDL::getComposerService());
    binder::Status status = sf->bootFinished();
    return statusTFromBinderStatus(status);
}

sp<SurfaceControl> SurfaceComposerClient::createSurface(const String8& name, uint32_t w, uint32_t h,
                                                        PixelFormat format, int32_t flags,
                                                        const sp<IBinder>& parentHandle,
+0 −2
Original line number Diff line number Diff line
@@ -62,8 +62,6 @@ interface ISurfaceComposer {
     * Signal that we're done booting.
     * Requires ACCESS_SURFACE_FLINGER permission
     */
    // Note this must be the 1st method, so IBinder::FIRST_CALL_TRANSACTION
    // is assigned, as it is called from Java by ActivityManagerService.
    void bootFinished();

    /**
+3 −0
Original line number Diff line number Diff line
@@ -145,6 +145,9 @@ public:
    status_t linkToComposerDeath(const sp<IBinder::DeathRecipient>& recipient,
            void* cookie = nullptr, uint32_t flags = 0);

    // Notify the SurfaceComposerClient that the boot procedure has completed
    static status_t bootFinished();

    // Get transactional state of given display.
    static status_t getDisplayState(const sp<IBinder>& display, ui::DisplayState*);