am 9a143922: Ignore display state changes for disconnected displays

* commit '9a14392256354538f1f43a5e80fe46c2c2b965cb':
  Ignore display state changes for disconnected displays
This commit is contained in:
Jesse Hall 2012-10-04 17:59:26 -07:00 committed by Android Git Automerger
commit 3b4e55c044

View File

@ -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) {