Merge "Send display-OFF event if that is initial state." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7fe46bae14
@@ -718,7 +718,12 @@ final class LocalDisplayAdapter extends DisplayAdapter {
|
|||||||
setDisplayState(Display.STATE_ON);
|
setDisplayState(Display.STATE_ON);
|
||||||
currentState = Display.STATE_ON;
|
currentState = Display.STATE_ON;
|
||||||
} else {
|
} else {
|
||||||
return; // old state and new state is off
|
if (oldState == Display.STATE_UNKNOWN) {
|
||||||
|
// There's no guarantee about what the initial state is
|
||||||
|
// at startup, so we have to set it if previous was UNKNOWN.
|
||||||
|
setDisplayState(state);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user