am 3b4e55c0: am 9a143922: Ignore display state changes for disconnected displays

* commit '3b4e55c0442322823898dd838cb50fe589e1e9d7':
  Ignore display state changes for disconnected displays
This commit is contained in:
Jesse Hall 2012-10-04 18:01:50 -07:00 committed by Android Git Automerger
commit 178652a5d7

View File

@ -1707,8 +1707,12 @@ void SurfaceFlinger::setTransactionState(
uint32_t SurfaceFlinger::setDisplayStateLocked(const DisplayState& s) uint32_t SurfaceFlinger::setDisplayStateLocked(const DisplayState& s)
{ {
ssize_t dpyIdx = mCurrentState.displays.indexOfKey(s.token);
if (dpyIdx < 0)
return 0;
uint32_t flags = 0; uint32_t flags = 0;
DisplayDeviceState& disp(mCurrentState.displays.editValueFor(s.token)); DisplayDeviceState& disp(mCurrentState.displays.editValueAt(dpyIdx));
if (disp.isValid()) { if (disp.isValid()) {
const uint32_t what = s.what; const uint32_t what = s.what;
if (what & DisplayState::eSurfaceChanged) { if (what & DisplayState::eSurfaceChanged) {