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

Commit 97fcc180 authored by Mark Renouf's avatar Mark Renouf
Browse files

Adds DESTROY_CONTENT_ON_REMOVAL to VirtualDisplay flags

Currently when an ActivityView is removed/released, any remaining
tasks on the display are moved to the main display. This change
causes those tasks to be destroyed instead.

Bug: 111236845
Test: manual, built and tested with ActivityView SystemUI plugin
Change-Id: Ifaa9df6fab05ce82e1bad4e2f5a19c4c7476aec6
parent b85be436
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -361,7 +361,8 @@ public class ActivityView extends ViewGroup {
                DISPLAY_NAME + "@" + System.identityHashCode(this),
                width, height, getBaseDisplayDensity(), mTmpSurface,
                DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC
                        | DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY);
                        | DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
                        | DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL);
        if (mVirtualDisplay == null) {
            Log.e(TAG, "Failed to initialize ActivityView");
            return;