summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Albert Chaulk <achaulk@google.com> 2017-04-05 18:01:58 -0400
committer Albert Chaulk <achaulk@google.com> 2017-04-05 18:12:27 -0400
commit356bc37719bb748346a79935e1979e264c81c296 (patch)
tree3cc144d6649afa3bce76e38628d0092839909a74
parent5db4c0c58e6980e160603f7975eb82c202255770 (diff)
Check if a visible layer exists instead of an invisible layer exists
Multiple layers may exist at index 0 and what we really want to know is if any of them are active, not if any aren't. Bug: 36867186, 36036583 Test: Launch ithaca then youtube Change-Id: I5881a838c7df8670fa42eece558717140d4cb021
-rw-r--r--libs/vr/libvrflinger/display_service.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/vr/libvrflinger/display_service.cpp b/libs/vr/libvrflinger/display_service.cpp
index 3750ea37a4..bb8613cb5b 100644
--- a/libs/vr/libvrflinger/display_service.cpp
+++ b/libs/vr/libvrflinger/display_service.cpp
@@ -361,10 +361,10 @@ void DisplayService::NotifyDisplayConfigurationUpdate() {
}
int DisplayService::IsVrAppRunning(pdx::Message& message) {
- bool visible = true;
+ bool visible = false;
ForEachDisplaySurface([&visible](const std::shared_ptr<DisplaySurface>& surface) {
- if (surface->client_z_order() == 0 && !surface->IsVisible())
- visible = false;
+ if (surface->client_z_order() == 0 && surface->IsVisible())
+ visible = true;
});
REPLY_SUCCESS_RETURN(message, visible, 0);