diff options
| author | 2023-12-04 16:28:30 +0000 | |
|---|---|---|
| committer | 2023-12-04 16:56:31 +0000 | |
| commit | 1400c20fa92ecbf10bf4bcb7a45f0948cd39fdbe (patch) | |
| tree | b32065c6d14bc4d738970aeb79383150fdd2db94 | |
| parent | 1b679fb54cc54d196f95d2917a9ddd61104e1c64 (diff) | |
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
| -rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/utils/TestActivity.java | 14 |
1 files changed, 0 insertions, 14 deletions
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 c12dcddd1b36..242996b7848d 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 @@ import androidx.annotation.Nullable; * 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 @@ public class TestActivity extends Activity { 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()) { |