Merge "Send display-OFF event if that is initial state." into sc-dev am: 7fe46bae14
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13583070 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I76425dd254ad0ef71338efe29d1bd8b36dbcd87d
This commit is contained in:
@@ -718,7 +718,12 @@ final class LocalDisplayAdapter extends DisplayAdapter {
|
||||
setDisplayState(Display.STATE_ON);
|
||||
currentState = Display.STATE_ON;
|
||||
} 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