diff options
| author | 2022-11-30 15:44:52 -0500 | |
|---|---|---|
| committer | 2022-12-01 12:28:21 -0500 | |
| commit | c132a15668ee26b5c6e193f3898808a80174c57b (patch) | |
| tree | 0fcd9bb62ba70684aaddd72e7c7939768fddfea4 /libs/jpegrecoverymap/jpegencoder.cpp | |
| parent | a6a0e3e776e1d8d0a6f58e117a2e9ff3b9a2e7f0 (diff) | |
SF: Fix condition to activate display on power-on
Since [1], getDefaultDisplayDeviceLocked's fallback when the active
display is outdated is to return the primary display, not `nullptr`.
During the initial call to setPowerModeInternal, `activeDisplay` is
no longer `nullptr`, but the primary display.
After [2], onActiveDisplayChangedLocked is expected to be called for
the primary display during boot. This was not the case though, since
the DisplayDevice::setPowerMode() update precedes the DisplayDevice::
isPoweredOn() query.
Fix this by querying before updating. Also, clean up `nullptr` checks
around onActiveDisplayChangedLocked.
[1] If83c908446e5e5267dfcb15189a26b779d75b216
[2] I15e0f5a280e62baf6d4e6ea2748d95342e79ac44
Fixes: 260663220
Test: The leader display ID is logged during single-display boot.
Test: SetPowerModeInternalTest.designatesLeaderDisplay
Change-Id: I0d20ce7f7ab3f9e90ef1c72263b8166865486d62
Diffstat (limited to 'libs/jpegrecoverymap/jpegencoder.cpp')
0 files changed, 0 insertions, 0 deletions