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
Loading
Please register or sign in to comment