diff options
author | Bill Yi <byi@google.com> | 2018-10-19 21:19:30 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-10-19 21:19:30 +0000 |
commit | deea2c637cdf1d0d8c663cd215d7ec21c1156690 (patch) | |
tree | 5a4b908455f95b0de5292a78a8380107a7e9b840 /msm8998 | |
parent | 08a892226b41464a9a4ba805a5ed230cc5a0c1fc (diff) | |
parent | 6631dc3b825b899cdec14a0c7b4182a8761228be (diff) | |
download | display-deea2c637cdf1d0d8c663cd215d7ec21c1156690.tar.gz |
Merge "Merge pi-dr1-dev to aosp-master"
Diffstat (limited to 'msm8998')
-rw-r--r-- | msm8998/sdm/libs/hwc2/hwc_session.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/msm8998/sdm/libs/hwc2/hwc_session.cpp b/msm8998/sdm/libs/hwc2/hwc_session.cpp index a9c7e4e2..d58ce0f9 100644 --- a/msm8998/sdm/libs/hwc2/hwc_session.cpp +++ b/msm8998/sdm/libs/hwc2/hwc_session.cpp @@ -1250,6 +1250,11 @@ android::status_t HWCSession::SetColorModeOverride(const android::Parcel *input_ auto display = static_cast<hwc2_display_t >(input_parcel->readInt32()); auto mode = static_cast<android_color_mode_t>(input_parcel->readInt32()); auto device = static_cast<hwc2_device_t *>(this); + + if (display > HWC_DISPLAY_VIRTUAL) { + return -EINVAL; + } + auto err = CallDisplayFunction(device, display, &HWCDisplay::SetColorMode, mode); if (err != HWC2_ERROR_NONE) return -EINVAL; |