diff options
author | 2020-07-10 21:32:16 +0000 | |
---|---|---|
committer | 2020-07-10 21:32:16 +0000 | |
commit | 8dcf124c0894e90b932ff5501892dacc37f36fad (patch) | |
tree | 757fb91c0d9b8f65b336d4887344bd59e0d0804d | |
parent | 9ef3d40403d2cd72a05adc908d4967825516c2d5 (diff) | |
parent | e70cc6c64870cbfa7a73de89502632b718cfebcc (diff) |
Merge "SF: update mInputFlinger on main thread"
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 2564600f6b..e5e3f48732 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -603,13 +603,6 @@ void SurfaceFlinger::bootFinished() if (mWindowManager != 0) { mWindowManager->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(); @@ -624,7 +617,15 @@ void SurfaceFlinger::bootFinished() LOG_EVENT_LONG(LOGTAG_SF_STOP_BOOTANIM, ns2ms(systemTime(SYSTEM_TIME_MONOTONIC))); - static_cast<void>(schedule([this] { + sp<IBinder> input(defaultServiceManager()->getService(String16("inputflinger"))); + + static_cast<void>(schedule([=] { + if (input == nullptr) { + ALOGE("Failed to link to input service"); + } else { + mInputFlinger = interface_cast<IInputFlinger>(input); + } + readPersistentProperties(); mPowerAdvisor.onBootFinished(); mBootStage = BootStage::FINISHED; |