commit | 4c0751a1f6e4ee941791012b31f9dbc65601e1d6 | [log] [tgz] |
---|---|---|
author | Mathias Agopian <mathias@google.com> | Thu Sep 20 21:28:12 2012 -0700 |
committer | Mathias Agopian <mathias@google.com> | Thu Sep 20 21:28:12 2012 -0700 |
tree | 728034cbfb2509fa9d3bdc2347e64a846a4b7014 | |
parent | 38e623bc5c2d7224ebd5b82efaea401bc8e5367a [diff] [blame] |
return an error, as expected, when querying a disconnected display Change-Id: I405a3a7bb42b9bbd2ec7bfe09e60e1b7acf7389d
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 0ce5266..8164d20 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -536,6 +536,10 @@ } const HWComposer& hwc(getHwComposer()); + if (!hwc.isConnected(type)) { + return NAME_NOT_FOUND; + } + float xdpi = hwc.getDpiX(type); float ydpi = hwc.getDpiY(type);