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

Commit 54d488d4 authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

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

parents 781fdfaf abcc8e54
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -95,20 +95,15 @@ 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 + ", createVD: " + createVirtualDisplay +
                    ", override: " + mIsVrModeOverrideEnabled);
            Log.i(TAG, "isVrMode: " + mIsVrModeEnabled + ", override: " + mIsVrModeOverrideEnabled);
        }

        if (mIsVrModeEnabled || (createVirtualDisplay && mIsVrModeOverrideEnabled)) {
        if (mIsVrModeEnabled || 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();