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

Commit 7926f3d8 authored by Louis Chang's avatar Louis Chang
Browse files

Fix CtsVirtualDevicesAppLaunchTestCases#RecentTasksTest

Removes the test activity when the virtual display is removed
if the DisplayInfo#removeMode is REMOVE_MODE_DESTROY_CONTENT
and the display-window-settings is undefined.

Bug: 359902777
Test: atest RecentTasksTest
Flag: EXEMPT bugfix
Change-Id: I2aaf2684777f8f950a157922104a5ae2024d58b0
parent 2962f79d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.wm;

import static android.view.Display.REMOVE_MODE_DESTROY_CONTENT;
import static android.view.WindowManager.DISPLAY_IME_POLICY_FALLBACK_DISPLAY;
import static android.view.WindowManager.DISPLAY_IME_POLICY_LOCAL;
import static android.view.WindowManager.REMOVE_CONTENT_MODE_DESTROY;
@@ -183,7 +184,7 @@ class DisplayWindowSettings {
        final DisplayInfo displayInfo = dc.getDisplayInfo();
        final SettingsProvider.SettingsEntry settings = mSettingsProvider.getSettings(displayInfo);
        if (settings.mRemoveContentMode == REMOVE_CONTENT_MODE_UNDEFINED) {
            if (dc.isPrivate()) {
            if (dc.isPrivate() || dc.getDisplay().getRemoveMode() == REMOVE_MODE_DESTROY_CONTENT) {
                // For private displays by default content is destroyed on removal.
                return REMOVE_CONTENT_MODE_DESTROY;
            }