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

Commit d277fb70 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski Committed by Android (Google) Code Review
Browse files

Merge "Clean up the VDM default virtual display flags." into main

parents f5372054 00343c66
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -106,10 +106,7 @@ final class VirtualDeviceImpl extends IVirtualDevice.Stub
    private static final String TAG = "VirtualDeviceImpl";

    private static final int DEFAULT_VIRTUAL_DISPLAY_FLAGS =
            DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC
                    | DisplayManager.VIRTUAL_DISPLAY_FLAG_ROTATES_WITH_CONTENT
                    | DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
                    | DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL
            DisplayManager.VIRTUAL_DISPLAY_FLAG_TOUCH_FEEDBACK_DISABLED
                    | DisplayManager.VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH
                    | DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_FOCUS;

@@ -286,6 +283,10 @@ final class VirtualDeviceImpl extends IVirtualDevice.Stub
        if (mParams.getLockState() == VirtualDeviceParams.LOCK_STATE_ALWAYS_UNLOCKED) {
            flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_ALWAYS_UNLOCKED;
        }
        if (mParams.getDevicePolicy(VirtualDeviceParams.POLICY_TYPE_RECENTS)
                == VirtualDeviceParams.DEVICE_POLICY_CUSTOM) {
            flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL;
        }
        return flags;
    }