am 7fc3ef0e: Merge "Add hotplug support for primary display." into mnc-dev

* commit '7fc3ef0eb0077eedaa09a7b505b6ec067e814170':
  Add hotplug support for primary display.
This commit is contained in:
Michael Lentine 2015-05-27 20:24:54 +00:00 committed by Android Git Automerger
commit a71c03e9fa

View File

@ -305,14 +305,17 @@ void HWComposer::vsync(int disp, int64_t timestamp) {
}
void HWComposer::hotplug(int disp, int connected) {
if (disp == HWC_DISPLAY_PRIMARY || disp >= VIRTUAL_DISPLAY_ID_BASE) {
if (disp >= VIRTUAL_DISPLAY_ID_BASE) {
ALOGE("hotplug event received for invalid display: disp=%d connected=%d",
disp, connected);
return;
}
queryDisplayProperties(disp);
// Do not teardown or recreate the primary display
if (disp != HWC_DISPLAY_PRIMARY) {
mEventHandler.onHotplugReceived(disp, bool(connected));
}
}
static float getDefaultDensity(uint32_t width, uint32_t height) {
// Default density is based on TVs: 1080p displays get XHIGH density,