diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-01-10 23:14:51 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-01-10 23:14:51 +0000 |
| commit | 22d5e0c2e168df6541f959137b6e08181bd3c0e7 (patch) | |
| tree | bb3ad0f046c5a1f6b9145185c8e946d9d7c4aa0b /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | c66fd4a4212f982969ea445b791f9f876ad05bd9 (diff) | |
| parent | 8f162c6e846ac99d6aac4473d7903722e9d6e54b (diff) | |
Merge "DecorView#mNavigationGuard is gone"
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 02b1c658b2ec..8937490091d0 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -18,6 +18,7 @@ package android.inputmethodservice; import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; +import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; import android.annotation.CallSuper; import android.annotation.DrawableRes; @@ -852,6 +853,11 @@ 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); + // For ColorView in DecorView to work, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS needs to be set + // by default (but IME developers can opt this out later if they want a new behavior). + mWindow.getWindow().setFlags( + FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + initViews(); mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT); } @@ -882,8 +888,6 @@ public class InputMethodService extends AbstractInputMethodService { mThemeAttrs = obtainStyledAttributes(android.R.styleable.InputMethodService); mRootView = mInflater.inflate( com.android.internal.R.layout.input_method, null); - mRootView.setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); mWindow.setContentView(mRootView); mRootView.getViewTreeObserver().removeOnComputeInternalInsetsListener(mInsetsComputer); mRootView.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsComputer); |
