Merge 54cf610849 on remote branch

Change-Id: I6ccfd47fa65442fc0e589db7df71db5f24a8cf71
This commit is contained in:
Linux Build Service Account 2018-02-21 14:57:57 -07:00
commit 5ac2a300d8
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 - 2017, The Linux Foundation. All rights reserved.
* Copyright (c) 2014 - 2018, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@ -1009,7 +1009,7 @@ android::status_t HWCSession::HandleGetDisplayAttributesForConfig(const android:
DisplayPort sdm_disp_port = kPortDefault;
int hwc_disp_port = qdutils::DISPLAY_PORT_DEFAULT;
if (dpy > HWC_DISPLAY_VIRTUAL) {
if (dpy < HWC_DISPLAY_PRIMARY || dpy >= HWC_NUM_DISPLAY_TYPES || config < 0) {
return android::BAD_VALUE;
}
@ -1690,7 +1690,7 @@ android::status_t HWCSession::GetVisibleDisplayRect(const android::Parcel *input
android::Parcel *output_parcel) {
int dpy = input_parcel->readInt32();
if (dpy < HWC_DISPLAY_PRIMARY || dpy > HWC_DISPLAY_VIRTUAL) {
if (dpy < HWC_DISPLAY_PRIMARY || dpy >= HWC_NUM_DISPLAY_TYPES) {
return android::BAD_VALUE;;
}