diff options
| author | Yohei Yukawa <yukawa@google.com> | 2022-01-24 19:00:42 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-01-24 19:00:42 +0000 |
| commit | dcd02645845f4b174ecd0892010eaed0728e3e27 (patch) | |
| tree | b7b1938ae82d51d1105cff38ec8deedb5412a47e /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | 2b4f585211452c56ec5496c032b7bb9d586f29a6 (diff) | |
| parent | ff7b453ca8e23b4ef75ba2c3f5becaf511cb07d3 (diff) | |
Merge "Minimum impl of nav buttons rendered by IME"
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 09d50850788b..5d2d8eafb3a8 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -469,6 +469,10 @@ public class InputMethodService extends AbstractInputMethodService { InputMethodManager mImm; private InputMethodPrivilegedOperations mPrivOps = new InputMethodPrivilegedOperations(); + @NonNull + private final NavigationBarController mNavigationBarController = + new NavigationBarController(this); + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) int mTheme = 0; @@ -611,6 +615,7 @@ public class InputMethodService extends AbstractInputMethodService { info.touchableRegion.set(mTmpInsets.touchableRegion); info.setTouchableInsets(mTmpInsets.touchableInsets); } + mNavigationBarController.updateTouchableInsets(mTmpInsets, info); if (mInputFrame != null) { setImeExclusionRect(mTmpInsets.visibleTopInsets); @@ -1534,6 +1539,7 @@ public class InputMethodService extends AbstractInputMethodService { mCandidatesVisibility = getCandidatesHiddenVisibility(); mCandidatesFrame.setVisibility(mCandidatesVisibility); mInputFrame.setVisibility(View.GONE); + mNavigationBarController.onViewInitialized(); Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } @@ -1543,6 +1549,7 @@ public class InputMethodService extends AbstractInputMethodService { mRootView.getViewTreeObserver().removeOnComputeInternalInsetsListener( mInsetsComputer); doFinishInput(); + mNavigationBarController.onDestroy(); mWindow.dismissForDestroyIfNecessary(); if (mSettingsObserver != null) { mSettingsObserver.unregister(); @@ -2451,6 +2458,7 @@ public class InputMethodService extends AbstractInputMethodService { setImeWindowStatus(nextImeWindowStatus, mBackDisposition); } + mNavigationBarController.onWindowShown(); // compute visibility onWindowShown(); mWindowVisible = true; @@ -3656,6 +3664,7 @@ public class InputMethodService extends AbstractInputMethodService { + " touchableInsets=" + mTmpInsets.touchableInsets + " touchableRegion=" + mTmpInsets.touchableRegion); p.println(" mSettingsObserver=" + mSettingsObserver); + p.println(" mNavigationBarController=" + mNavigationBarController.toDebugString()); } private final ImeTracing.ServiceDumper mDumper = new ImeTracing.ServiceDumper() { |
