diff options
Diffstat (limited to 'services/surfaceflinger/DisplayHardware/HWComposer.cpp')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 8107828..987cc64 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -337,7 +337,12 @@ status_t HWComposer::queryDisplayProperties(int disp) { return err; } - mHwc->getDisplayAttributes(mHwc, disp, config, DISPLAY_ATTRIBUTES, values); + err = mHwc->getDisplayAttributes(mHwc, disp, config, DISPLAY_ATTRIBUTES, values); + if (err != NO_ERROR) { + // we can't get this display's info. turn it off. + mDisplayData[disp].connected = false; + return err; + } int32_t w = 0, h = 0; for (size_t i = 0; i < NUM_DISPLAY_ATTRIBUTES - 1; i++) { |