Change TestActivity to not be immersive
Focus tests will fail if the immersive window is shown on top.
Dismissing the immersive window doesn't to seem to work in all cases,
likely due to a race.
Instead, no longer make the activity immersive.
Test: requestFocusWithMultipleWindows
Bug: 313674425
Change-Id: Idc9d3031a75f59fc1ce8591a168d56217f9c5b48
diff --git a/services/tests/wmtests/src/com/android/server/wm/utils/TestActivity.java b/services/tests/wmtests/src/com/android/server/wm/utils/TestActivity.java
index c12dcdd..242996b 100644
--- a/services/tests/wmtests/src/com/android/server/wm/utils/TestActivity.java
+++ b/services/tests/wmtests/src/com/android/server/wm/utils/TestActivity.java
@@ -16,17 +16,11 @@
package com.android.server.wm.utils;
-import static android.view.WindowInsets.Type.displayCutout;
-import static android.view.WindowInsets.Type.systemBars;
-import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
-
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import android.app.Activity;
import android.app.KeyguardManager;
import android.os.Bundle;
-import android.view.WindowInsetsController;
-import android.view.WindowManager;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
@@ -35,7 +29,6 @@
* TestActivity that will ensure it dismisses keyguard and shows as a fullscreen activity.
*/
public class TestActivity extends Activity {
- private static final int sTypeMask = systemBars() | displayCutout();
private FrameLayout mParentLayout;
@Override
@@ -48,13 +41,6 @@
FrameLayout.LayoutParams.MATCH_PARENT);
setContentView(mParentLayout, layoutParams);
- WindowInsetsController windowInsetsController = getWindow().getInsetsController();
- windowInsetsController.hide(sTypeMask);
- WindowManager.LayoutParams params = getWindow().getAttributes();
- params.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
- getWindow().setAttributes(params);
- getWindow().setDecorFitsSystemWindows(false);
-
final KeyguardManager keyguardManager = getInstrumentation().getContext().getSystemService(
KeyguardManager.class);
if (keyguardManager != null && keyguardManager.isKeyguardLocked()) {