Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da90bd1f authored by Santos Cordon's avatar Santos Cordon
Browse files

Revert "Remove SystemProperty gating-flag for virtual displays."

Test team is still relying on this.  We'll keep this until the virtual display input code goes in this week.

This reverts commit abcc8e54.

Change-Id: Ic591f813289191b09367a76be3221183562256a7
parent abcc8e54
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -95,15 +95,20 @@ class CompatibilityDisplay {
     * Creates and Destroys the virtual display depending on the current state of VrMode.
     */
    private void updateVirtualDisplay() {
        boolean createVirtualDisplay = "true".equals(SystemProperties.get("vr_virtualdisplay"));
        if (DEBUG) {
            Log.i(TAG, "isVrMode: " + mIsVrModeEnabled + ", override: " + mIsVrModeOverrideEnabled);
            Log.i(TAG, "isVrMode: " + mIsVrModeEnabled + ", createVD: " + createVirtualDisplay +
                    ", override: " + mIsVrModeOverrideEnabled);
        }

        if (mIsVrModeEnabled || mIsVrModeOverrideEnabled) {
        if (mIsVrModeEnabled || (createVirtualDisplay && mIsVrModeOverrideEnabled)) {
            // TODO: Consider not creating the display until ActivityManager needs one on
            // which to display a 2D application.
            // TODO: STOPSHIP Remove createVirtualDisplay conditional before launching.
            if (createVirtualDisplay) {
                startVirtualDisplay();
                startImageReader();
            }
        } else {
            // Stop virtual display to test exit condition
            stopVirtualDisplay();