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

Commit cae2ee03 authored by Denis Hsu's avatar Denis Hsu Committed by Automerger Merge Worker
Browse files

SF: update mInputFlinger on main thread am: 58fbf9fb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/13165039

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaadcaf40d980ad9c92bb404193da37614c576a0d
parents 995b2469 58fbf9fb
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -544,13 +544,6 @@ void SurfaceFlinger::bootFinished()
    if (window != 0) {
        window->linkToDeath(static_cast<IBinder::DeathRecipient*>(this));
    }
    sp<IBinder> input(defaultServiceManager()->getService(
            String16("inputflinger")));
    if (input == nullptr) {
        ALOGE("Failed to link to input service");
    } else {
        mInputFlinger = interface_cast<IInputFlinger>(input);
    }

    if (mVrFlinger) {
      mVrFlinger->OnBootFinished();
@@ -565,7 +558,15 @@ void SurfaceFlinger::bootFinished()
    LOG_EVENT_LONG(LOGTAG_SF_STOP_BOOTANIM,
                   ns2ms(systemTime(SYSTEM_TIME_MONOTONIC)));

    postMessageAsync(new LambdaMessage([this]() NO_THREAD_SAFETY_ANALYSIS {
    sp<IBinder> input(defaultServiceManager()->getService(String16("inputflinger")));

    postMessageAsync(new LambdaMessage([=]() NO_THREAD_SAFETY_ANALYSIS {
        if (input == nullptr) {
            ALOGE("Failed to link to input service");
        } else {
            mInputFlinger = interface_cast<IInputFlinger>(input);
        }

        readPersistentProperties();
        mBootStage = BootStage::FINISHED;