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

Commit a19cfdca authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Make IME fit navgation bars at left and right sides" into rvc-dev am:...

Merge "Make IME fit navgation bars at left and right sides" into rvc-dev am: 12642393 am: 65d689f7 am: d2883015 am: 8619ab54

Change-Id: I1e6b8f589beb456b26eceebcc9f736499f46720c
parents 9bfa9e54 8619ab54
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static android.view.ViewRootImpl.NEW_INSETS_MODE_NONE;
import static android.view.WindowInsets.Type.navigationBars;
import static android.view.WindowInsets.Type.statusBars;
import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;

import static java.lang.annotation.RetentionPolicy.SOURCE;
@@ -71,6 +72,7 @@ import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowInsets.Side;
import android.view.WindowManager;
import android.view.animation.AnimationUtils;
import android.view.autofill.AutofillId;
@@ -1246,7 +1248,8 @@ public class InputMethodService extends AbstractInputMethodService {
                Context.LAYOUT_INFLATER_SERVICE);
        mWindow = new SoftInputWindow(this, "InputMethod", mTheme, null, null, mDispatcherState,
                WindowManager.LayoutParams.TYPE_INPUT_METHOD, Gravity.BOTTOM, false);
        mWindow.getWindow().getAttributes().setFitInsetsTypes(WindowInsets.Type.statusBars());
        mWindow.getWindow().getAttributes().setFitInsetsTypes(statusBars() | navigationBars());
        mWindow.getWindow().getAttributes().setFitInsetsSides(Side.all() & ~Side.BOTTOM);

        // IME layout should always be inset by navigation bar, no matter its current visibility,
        // unless automotive requests it, since automotive may hide the navigation bar.