diff options
| author | 2024-11-21 20:28:01 +0800 | |
|---|---|---|
| committer | 2024-11-22 15:14:02 +0800 | |
| commit | 8102e8403961ab4b596e55092226cdc568501e4d (patch) | |
| tree | bb83b9255ebc60e5ecea90304fc485ee1b9642b1 /libs/androidfw/AttributeResolution.cpp | |
| parent | 320b9e02731e8abeb7e7034eb91239c48039535c (diff) | |
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
Diffstat (limited to 'libs/androidfw/AttributeResolution.cpp')
0 files changed, 0 insertions, 0 deletions