LocalDisplayAdapter: don't crash when no color modes available
Test: none Change-Id: Ic11b5b66864fdd97b290722cba534b2aa38ac054
This commit is contained in:
committed by
Thecrazyskull
parent
5a45170f95
commit
b34c8104cb
@@ -285,6 +285,7 @@ final class LocalDisplayAdapter extends DisplayAdapter {
|
||||
int activeColorMode) {
|
||||
List<Integer> pendingColorModes = new ArrayList<>();
|
||||
|
||||
if (colorModes == null) return false;
|
||||
// Build an updated list of all existing color modes.
|
||||
boolean colorModesAdded = false;
|
||||
for (int colorMode: colorModes) {
|
||||
|
||||
Reference in New Issue
Block a user