Merge "Remove SystemProperty gating-flag for virtual displays." into oc-dev

This commit is contained in:
Santos Cordon
2017-04-06 01:48:06 +00:00
committed by Android (Google) Code Review

View File

@@ -95,20 +95,15 @@ class CompatibilityDisplay {
* Creates and Destroys the virtual display depending on the current state of VrMode. * Creates and Destroys the virtual display depending on the current state of VrMode.
*/ */
private void updateVirtualDisplay() { private void updateVirtualDisplay() {
boolean createVirtualDisplay = "true".equals(SystemProperties.get("vr_virtualdisplay"));
if (DEBUG) { if (DEBUG) {
Log.i(TAG, "isVrMode: " + mIsVrModeEnabled + ", createVD: " + createVirtualDisplay + Log.i(TAG, "isVrMode: " + mIsVrModeEnabled + ", override: " + mIsVrModeOverrideEnabled);
", override: " + mIsVrModeOverrideEnabled);
} }
if (mIsVrModeEnabled || (createVirtualDisplay && mIsVrModeOverrideEnabled)) { if (mIsVrModeEnabled || mIsVrModeOverrideEnabled) {
// TODO: Consider not creating the display until ActivityManager needs one on // TODO: Consider not creating the display until ActivityManager needs one on
// which to display a 2D application. // which to display a 2D application.
// TODO: STOPSHIP Remove createVirtualDisplay conditional before launching. startVirtualDisplay();
if (createVirtualDisplay) { startImageReader();
startVirtualDisplay();
startImageReader();
}
} else { } else {
// Stop virtual display to test exit condition // Stop virtual display to test exit condition
stopVirtualDisplay(); stopVirtualDisplay();