am 4c0751a1: return an error, as expected, when querying a disconnected display

* commit '4c0751a1f6e4ee941791012b31f9dbc65601e1d6':
  return an error, as expected, when querying a disconnected display
This commit is contained in:
Mathias Agopian 2012-09-20 21:33:56 -07:00 committed by Android Git Automerger
commit 7afa3dce09

View File

@ -536,6 +536,10 @@ status_t SurfaceFlinger::getDisplayInfo(const sp<IBinder>& display, DisplayInfo*
}
const HWComposer& hwc(getHwComposer());
if (!hwc.isConnected(type)) {
return NAME_NOT_FOUND;
}
float xdpi = hwc.getDpiX(type);
float ydpi = hwc.getDpiY(type);