Ignore display state changes for disconnected displays
When a display is disconnected, removing it from SurfaceFlinger's display list is non-atomic with removing it from the Display Manager and any in-flight transactions. So SurfaceFlinger might get a display state change transaction for a display it has already forgotten about. Just ignore these. Bug: 7288082 Change-Id: Ic27e55377f3db40fb34e3b1cd67e43297df117a2
This commit is contained in:
parent
81cd5d3b94
commit
9a14392256
@ -1707,8 +1707,12 @@ void SurfaceFlinger::setTransactionState(
|
||||
|
||||
uint32_t SurfaceFlinger::setDisplayStateLocked(const DisplayState& s)
|
||||
{
|
||||
ssize_t dpyIdx = mCurrentState.displays.indexOfKey(s.token);
|
||||
if (dpyIdx < 0)
|
||||
return 0;
|
||||
|
||||
uint32_t flags = 0;
|
||||
DisplayDeviceState& disp(mCurrentState.displays.editValueFor(s.token));
|
||||
DisplayDeviceState& disp(mCurrentState.displays.editValueAt(dpyIdx));
|
||||
if (disp.isValid()) {
|
||||
const uint32_t what = s.what;
|
||||
if (what & DisplayState::eSurfaceChanged) {
|
||||
|
Loading…
Reference in New Issue
Block a user