Set priority among various display devices
* When a non-WFD virtual display device (SSD/
screenrecord) is active along with
non-hybrid WFD solution(WFD faked on
external), give preference to non-hybrid WFD
device over non-WFD virtual display device.
* This is needed only in cases when WFD is
enabled via v4l2 rather than using VDS api's.
Change-Id: I63e53baa214bdcdac19430ca30b939cdd7416cbb
diff --git a/libqdutils/qd_utils.cpp b/libqdutils/qd_utils.cpp
index 5a457d0..0698b33 100644
--- a/libqdutils/qd_utils.cpp
+++ b/libqdutils/qd_utils.cpp
@@ -31,7 +31,6 @@
#define MAX_FRAME_BUFFER_NAME_SIZE (80)
-#define MAX_DISPLAY_DEVICES (3)
int getHDMINode(void)
{
@@ -40,7 +39,7 @@
char msmFbTypePath[MAX_FRAME_BUFFER_NAME_SIZE];
int j = 0;
- for(j = 0; j < MAX_DISPLAY_DEVICES; j++) {
+ for(j = 0; j < HWC_NUM_DISPLAY_TYPES; j++) {
snprintf (msmFbTypePath, sizeof(msmFbTypePath),
"/sys/class/graphics/fb%d/msm_fb_type", j);
displayDeviceFP = fopen(msmFbTypePath, "r");
@@ -58,7 +57,7 @@
}
}
- if (j < MAX_DISPLAY_DEVICES)
+ if (j < HWC_NUM_DISPLAY_TYPES)
return j;
else
ALOGE("%s: Failed to find HDMI node", __func__);