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

Commit 31f65e72 authored by Tiger's avatar Tiger
Browse files

Make the content view of TestActivity fit system window insets

This CL fixes InputMethodServiceTest which was borken by the edge-to-
edge enforcement because the critical items would be obscured by
system bars. It can be fixed by calling setFitsSystemWindows(true) to
the content view.

Fix: 335382920
Bug: 309578419
Flag: com.android.window.flags.enforce_edge_to_edge
Test: atest FrameworksImeTests:InputMethodServiceTest#testFullScreenMode
Change-Id: Ib6d4adff9be448b4118a5077189c8234c51fa82b
parent e326b351
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ public class TestActivity extends Activity {
        mEditText = new EditText(this);
        mEditText.setContentDescription("Input box");
        rootView.addView(mEditText, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
        rootView.setFitsSystemWindows(true);
        setContentView(rootView);
        mEditText.requestFocus();
        sLastCreatedInstance = new WeakReference<>(this);