Defer triggering notifyLidSwitchChanged() until the system is ready.
Before the system is ready getSwitchState() returns KEY_STATE_UNKNOWN for the lid switch causing the initial lidOpen value to be false on boot even if the lid is currently open. This defers the triggering of any callbacks registered before the system is ready to ensure that the initial callback value is correct. Bug: 159401801 Test: Manual - ensure first callback value matches lid state on boot. Change-Id: I9351312e5ecf8b1984ae11a47ed9b89dab1aa07f
Loading
Please register or sign in to comment