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

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

Remove SystemProperty gating-flag for virtual displays.

Virtual Display creating previously gated by SystemProperty.  This CL
removes it.

Test: Go into VR, run an app, ensure that the app is running within a
virtual display via "adb shell am stack list".

Change-Id: I10e8483cea3dc785eb448811b3ba96b8b8624f93
parent be436bde
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();