diff options
author | 2024-05-24 19:56:11 +0000 | |
---|---|---|
committer | 2024-05-24 19:56:11 +0000 | |
commit | 7685c4073fb2d6b50dab2b8df9dda055c0aabab0 (patch) | |
tree | 1e1b3612850a6832eb57458cab3d7c5559c2183b /libs/ui/DisplayIdentification.cpp | |
parent | a99e1cd67b5d2237200bf23b44a03e0eb31e9326 (diff) | |
parent | c683bc5b940728569da57962cdab3f76b2a408e1 (diff) |
Merge "Differentiate between empty and unrecognizable display identification data" into main am: c683bc5b94
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3101643
Change-Id: I97571511421cb5aa460a3466448531fd869382fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/ui/DisplayIdentification.cpp')
-rw-r--r-- | libs/ui/DisplayIdentification.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ui/DisplayIdentification.cpp b/libs/ui/DisplayIdentification.cpp index 82e5427317..ed7f1930aa 100644 --- a/libs/ui/DisplayIdentification.cpp +++ b/libs/ui/DisplayIdentification.cpp @@ -374,6 +374,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 {}; |