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

Skip to content
Commit 8102e840 authored by Eric Lin's avatar Eric Lin
Browse files

Improve device state callback for thread context.

Optimize the initial device state callback execution in
DeviceStateManagerFoldingFeatureProducer (FFP) based on the calling
thread . If FFP is created on the main thread, execute the initial
`onDeviceStateChanged` callback directly. If FFP is created on a thread
other than the main thread, post the callback to the main thread.
This improves callback efficiency and maintains consistency across
thread contexts.

Bug: 337820752
Test: atest FrameworksCoreDeviceStateManagerTests:DeviceStateManagerGlobalTest
Test: atest WMJetpackUnitTests:DeviceStateManagerFoldingFeatureProducerTest
Flag: com.android.window.flags.wlinfo_oncreate
Change-Id: I3ee26a3427cf59c8da3366b48199e7703ec7c5e8
parent 320b9e02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment