diff options
| author | Jason Macnak <natsu@google.com> | 2022-02-09 13:39:02 -0800 |
|---|---|---|
| committer | Jason Macnak <natsu@google.com> | 2022-02-23 18:07:05 +0000 |
| commit | 734c1178140cb785eeb806dd53f1761ed0cae2d7 (patch) | |
| tree | b6262bf2f119a3019413bc5375c6a1cebe000256 /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | 14a9a37227f2a4331dfd21241fc46706874a4bbf (diff) | |
Map SurfaceFlinger display mode ids to Display.Mode ids
Noticed while trying to switch Cuttlefish to HWComposer3
with ag/16624862. By default, Cuttlefish has a single display
with a single config:
`RanchuHwc: config: id: 0 w:720 h:1280 dpi-x:320 dpi-y:320 ...`
In `LocalDeviceDisplay::updateDisplayModesLocked()`, the display
config ids which come from HWComposer via SurfaceFlinger are mapped
to DisplayRecord's Display.Mode's `mModeId` which are globally
unique ids created from the atomic integer
`DisplayAdapter.NEXT_DISPLAY_MODE_ID` (which defaults to 1).
However, the preferred display config id (`mSystemPreferredModeId`)
was not being mapped. This would lead to boot failures such as:
`
AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: android.anim
AndroidRuntime: java.lang.IllegalStateException: Unable to locate mode 0
`
with ag/16774826 because `mDefaultModeId` was being set to
`mSystemPreferredModeId` which was the unmapped `0` from HWComposer.
(Perhaps the need for this change suggests there should be strongly
typed integers to represent the different id spaces,
`SurfaceFlingerModeId` vs `DisplayAdapaterModeId` or something)
Bug: b/193240715
Test: lunch cf_x86_64_phone-userdebug && cherry-pick ag/16624862 &&
m && cvd start
Change-Id: I8fc0fca6816e037196f51d256430fad480f3b0ff
(cherry picked from commit 53a296d20f4765572190358d9c2982f1f97a2d3d)
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions
