summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
authorMichael Lentine <mlentine@google.com>2015-05-27 17:39:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-27 17:39:59 +0000
commit7fc3ef0eb0077eedaa09a7b505b6ec067e814170 (patch)
treebb837313b93ed085c2d7a8869e8501dea6956c37 /services/surfaceflinger
parent0e65e6c283c96d514c5ecefbb46a976939cfa64a (diff)
parent10613dc3b565e95d3d5f459ec70fd2f6a77f807a (diff)
downloadframeworks_native-7fc3ef0eb0077eedaa09a7b505b6ec067e814170.zip
frameworks_native-7fc3ef0eb0077eedaa09a7b505b6ec067e814170.tar.gz
frameworks_native-7fc3ef0eb0077eedaa09a7b505b6ec067e814170.tar.bz2
Merge "Add hotplug support for primary display." into mnc-dev
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 579b39e..02c31ff 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -305,13 +305,16 @@ 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);
- mEventHandler.onHotplugReceived(disp, bool(connected));
+ // 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) {