Shows the default display only.
- Currently VNC doesn't support multi-display properly, so cuttlefish
shows the multi-display screens interchangeably.
Sadly, it's hard to understand any of displays.
Bug: 171305898
Test: Run cf_auto_x86, and check:
1. shows the default display only through VNC.
2. 'dumpsys display' still shows the multi-displays info.
Change-Id: Ib926818133103218a84860e248f427f62c78b018
diff --git a/guest/hals/hwcomposer/hwcomposer.cpp b/guest/hals/hwcomposer/hwcomposer.cpp
index 5ff1d2e..d9c761c 100644
--- a/guest/hals/hwcomposer/hwcomposer.cpp
+++ b/guest/hals/hwcomposer/hwcomposer.cpp
@@ -350,6 +350,12 @@
int retval = -1;
for (int disp = 0; disp < numDisplays; ++disp) {
+ // TODO(b/171305898): Remove the following condition after it supports
+ // multi-display properly.
+ if (disp > 0) {
+ // Skip the composition besides the default display.
+ break;
+ }
hwc_display_contents_1_t* contents = displays[disp];
if (!contents) return 0;