HWC2On1Adapter: populateCapabilities: fix virtual display query
To determine whether a HWComposer implementation supports virtual
displays, HWC2On1Adapter::populateCapabilities() calls
query(HWC_DISPLAY_TYPES_SUPPORTED). However, it incorrectly uses
HWC_DISPLAY_VIRTUAL instead of HWC_DISPLAY_VIRTUAL_BIT. Update the
check to use the correct bitmask.
Change-Id: I1ad95d5222a0353816ee65936cf033e5244c80cc
diff --git a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp
index 2641ee6..e739ef4 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp
@@ -2333,7 +2333,7 @@
int supportedTypes = 0;
auto result = mHwc1Device->query(mHwc1Device,
HWC_DISPLAY_TYPES_SUPPORTED, &supportedTypes);
- if ((result == 0) && ((supportedTypes & HWC_DISPLAY_VIRTUAL) != 0)) {
+ if ((result == 0) && ((supportedTypes & HWC_DISPLAY_VIRTUAL_BIT) != 0)) {
ALOGI("Found support for HWC virtual displays");
mHwc1SupportsVirtualDisplays = true;
}