summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-06-10 10:16:32 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-06-10 10:16:32 +0000
commitee721fb600e6e17f1e65980e8ff05e714d90eb19 (patch)
tree3f39d23b9cd63bd3c9d6d227ebf57bb831161bee
parent263a8b3910df5774baafba76077d99693bbc814a (diff)
parent8973353855b9b73e4e84123b6ae282ccfe4d800a (diff)
Snap for 8705312 from 8973353855b9b73e4e84123b6ae282ccfe4d800a to s-keystone-qcom-release
Change-Id: Ie355faa1690b583f15b70eac4b457a9d4786dd2e
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 630997cd3a..e385c517ec 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -5045,7 +5045,8 @@ void SurfaceFlinger::checkVirtualDisplayHint(const Vector<DisplayState>& display
if (what & DisplayState::eSurfaceChanged) {
if (IInterface::asBinder(state.surface) != IInterface::asBinder(s.surface)) {
if (state.isVirtual() && s.surface != nullptr &&
- mVirtualDisplayIdGenerators.hal) {
+ mVirtualDisplayIdGenerators.hal &&
+ getHwComposer().getMaxVirtualDisplayCount() > 0) {
width = 0;
int status = s.surface->query(NATIVE_WINDOW_WIDTH, &width);
ALOGE_IF(status != NO_ERROR, "Unable to query width (%d)", status);