diff options
| author | Alex Stetson <alexstetson@google.com> | 2022-05-13 20:59:38 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-05-13 20:59:38 +0000 |
| commit | a784a00759c6ed4d22a3452cc1fc9256b8411aa3 (patch) | |
| tree | d02ca2d4ddba4b31ba05176ba5a3a80d2a59df10 /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | a8def9731d40bb21ba8547b56c0545f0da73c39b (diff) | |
| parent | d9925dff1e676411f7c509df7347168d77f4e94b (diff) | |
Merge "Don't force nav bar shown if configured" into tm-dev
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 200fe22edaad..21ecf8b0888c 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -592,7 +592,7 @@ public class InputMethodService extends AbstractInputMethodService { private InlineSuggestionSessionController mInlineSuggestionSessionController; - private boolean mAutomotiveHideNavBarForKeyboard; + private boolean mHideNavBarForKeyboard; private boolean mIsAutomotive; private @NonNull OptionalInt mHandwritingRequestId = OptionalInt.empty(); private InputEventReceiver mHandwritingEventReceiver; @@ -1498,9 +1498,8 @@ public class InputMethodService extends AbstractInputMethodService { // shown the first time (cold start). mSettingsObserver.shouldShowImeWithHardKeyboard(); - mIsAutomotive = isAutomotive(); - mAutomotiveHideNavBarForKeyboard = getApplicationContext().getResources().getBoolean( - com.android.internal.R.bool.config_automotiveHideNavBarForKeyboard); + mHideNavBarForKeyboard = getApplicationContext().getResources().getBoolean( + com.android.internal.R.bool.config_hideNavBarForKeyboard); // TODO(b/111364446) Need to address context lifecycle issue if need to re-create // for update resources & configuration correctly when show soft input @@ -1539,11 +1538,11 @@ public class InputMethodService extends AbstractInputMethodService { window.setFlags(windowFlags, windowFlagsMask); // Automotive devices may request the navigation bar to be hidden when the IME shows up - // (controlled via config_automotiveHideNavBarForKeyboard) in order to maximize the - // visible screen real estate. When this happens, the IME window should animate from the + // (controlled via config_hideNavBarForKeyboard) in order to maximize the visible + // screen real estate. When this happens, the IME window should animate from the // bottom of the screen to reduce the jank that happens from the lack of synchronization // between the bottom system window and the IME window. - if (mIsAutomotive && mAutomotiveHideNavBarForKeyboard) { + if (mHideNavBarForKeyboard) { window.setDecorFitsSystemWindows(false); } } |
