Skip to content
Commit da438a1d authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

Fix crash in LocalDisplayAdapter

findMatchingModeIdLocked can crash with ArrayIndexOutOfBounds
if passed a bad configId. In this situation will be better to
return NO_DISPLAY_MODE_ID and let the caller handle it.

This solves random restarts when hotplug reconnect events are
send for AndroidTV devices. The root cause for this is
getDesiredDisplayConfigSpecs returning an outdated baseModeId
after the list of supported display modes was updated after
hotplug.

Bug: 167966667
Test: manual
Change-Id: I92f5da0ef2539b0a02d9ad6da46fa095eaab1650
parent 3142e684
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment