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