Update external display property in hardware_composer.
This change removes the "persist.vr.use_external_display" property and
updates the code path to always allow external displays.
Bug: 140287770
Test: Manual, ran on device and verified that it works
Change-Id: I8bedeb18c93b2a9dc3815177aa9a6a897b63c81e
diff --git a/libs/vr/libvrflinger/hardware_composer.cpp b/libs/vr/libvrflinger/hardware_composer.cpp
index e1240d6..9072d89 100644
--- a/libs/vr/libvrflinger/hardware_composer.cpp
+++ b/libs/vr/libvrflinger/hardware_composer.cpp
@@ -51,8 +51,6 @@
const char kRightEyeOffsetProperty[] = "dvr.right_eye_offset_ns";
-const char kUseExternalDisplayProperty[] = "persist.vr.use_external_display";
-
// Surface flinger uses "VSYNC-sf" and "VSYNC-app" for its version of these
// events. Name ours similarly.
const char kVsyncTraceEventName[] = "VSYNC-vrflinger";
@@ -965,18 +963,9 @@
external_display_ = GetDisplayParams(composer_.get(),
*displays.external_display, /*is_primary*/ false);
- if (property_get_bool(kUseExternalDisplayProperty, false)) {
- ALOGI("External display connected. Switching to external display.");
- target_display_ = &(*external_display_);
- target_display_changed = true;
- } else {
- ALOGI("External display connected, but sysprop %s is unset, so"
- " using primary display.", kUseExternalDisplayProperty);
- if (was_using_external_display) {
- target_display_ = &primary_display_;
- target_display_changed = true;
- }
- }
+ ALOGI("External display connected. Switching to external display.");
+ target_display_ = &(*external_display_);
+ target_display_changed = true;
} else {
// External display was disconnected
external_display_ = std::nullopt;