diff options
| author | Taran Singh <tarandeep@google.com> | 2021-08-18 23:29:21 +0000 |
|---|---|---|
| committer | Taran Singh <tarandeep@google.com> | 2021-08-26 15:36:40 +0000 |
| commit | c4806aeee5aee2dd0fde618107ae1d763ca09564 (patch) | |
| tree | 4f61390b1aacc6a6bf2c9ffeb4e2cc6f5008981e /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | b082cf64e1131e9105449c9742564f0e0bc89599 (diff) | |
Fix NPE in IMS#onEvaluateFullscreenMode
Fix NPE when EditorInfo is null
Test: Manually using steps in bug
Fix: 197078413
Bug: 197258697
Change-Id: I7437dec66f2cfe7769b9448916998c40745c3ebc
Merged-In: I7437dec66f2cfe7769b9448916998c40745c3ebc
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 881e0cfb58d7..74cb42db7858 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -1749,12 +1749,12 @@ public class InputMethodService extends AbstractInputMethodService { if (config.orientation != Configuration.ORIENTATION_LANDSCAPE) { return false; } - if ((mInputEditorInfo != null - && (mInputEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0) + if (mInputEditorInfo != null + && ((mInputEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0 // If app window has portrait orientation, regardless of what display orientation // is, IME shouldn't use fullscreen-mode. || (mInputEditorInfo.internalImeOptions - & EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT) != 0) { + & EditorInfo.IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT) != 0)) { return false; } return true; |
