summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Brian Lindahl <blindahl@google.com> 2024-05-24 20:15:26 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-05-24 20:15:26 +0000
commit81afac912242a9914f2e7edc290f7e346e96e148 (patch)
tree4f43d5fad551e51b7b26fc473adbcec8700fbfe9
parentdf55f52e05eaac908ac93e09e7ae95148d9a0006 (diff)
parent7685c4073fb2d6b50dab2b8df9dda055c0aabab0 (diff)
Merge "Differentiate between empty and unrecognizable display identification data" into main am: c683bc5b94 am: 7685c4073f
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3101643 Change-Id: Ia40ad82c648cdf318ac04d55d820983cb7b656a9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/ui/DisplayIdentification.cpp5
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp9
2 files changed, 12 insertions, 2 deletions
diff --git a/libs/ui/DisplayIdentification.cpp b/libs/ui/DisplayIdentification.cpp
index 0908ae85a8..e5af7406ed 100644
--- a/libs/ui/DisplayIdentification.cpp
+++ b/libs/ui/DisplayIdentification.cpp
@@ -320,6 +320,11 @@ std::optional<PnpId> getPnpId(PhysicalDisplayId displayId) {
std::optional<DisplayIdentificationInfo> parseDisplayIdentificationData(
uint8_t port, const DisplayIdentificationData& data) {
+ if (data.empty()) {
+ ALOGI("Display identification data is empty.");
+ return {};
+ }
+
if (!isEdid(data)) {
ALOGE("Display identification data has unknown format.");
return {};
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index b8b7a70677..9ca4234699 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -6522,12 +6522,17 @@ void SurfaceFlinger::dumpDisplayIdentificationData(std::string& result) const {
uint8_t port;
DisplayIdentificationData data;
if (!getHwComposer().getDisplayIdentificationData(*hwcDisplayId, &port, &data)) {
- result.append("no identification data\n");
+ result.append("no display identification data\n");
+ continue;
+ }
+
+ if (data.empty()) {
+ result.append("empty display identification data\n");
continue;
}
if (!isEdid(data)) {
- result.append("unknown identification data\n");
+ result.append("unknown format for display identification data\n");
continue;
}