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

Skip to content
Commit 2fa48adb authored by Eric Lin's avatar Eric Lin
Browse files

Revert DeviceState callback to main thread in FFP.

This partially reverts commit I8a4af1c5ac98f5653e4293a049291ba5ff7cd464.

Revert device state callback to the main thread in FFP to fix crashes in
Chrome and Photos. The original change allowed callbacks off the main
thread but this caused crashes because:
1. Chrome loads window extension directly; it crashs when receiving
   callbacks on binder thread.
2. Photos uses Java API with Runnable::run, breaking the flowOn main
   operator; it crashs when receiving callbacks on the binder thread.

Window layout info remains available via getter because the device state
is available synchronously in the DeviceStateManagerGlobal constructor,
so this rollback does not impact functionality.

Bug: 337820752
Bug: 379501835
Test: atest WMJetpackUnitTests:DeviceStateManagerFoldingFeatureProducerTest
Test: Run with latest Chrome (131.0.6778.39)
Flag: com.android.window.flags.wlinfo_oncreate
Change-Id: Ifc5af9955a27b6cfb5405e63c0763f3c55a5a75e
parent 99e033fd
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