Loading core/java/android/inputmethodservice/InputMethodService.java +15 −0 Original line number Diff line number Diff line Loading @@ -685,7 +685,12 @@ public class InputMethodService extends AbstractInputMethodService { private ImeTracker.Token mCurStatsToken; final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = info -> { Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, start info: " + info + " before onComputeInsets, tmpInsets: " + mTmpInsets, new Throwable()); onComputeInsets(mTmpInsets); Log.i("b/297000797", "IME#OnComputeInternalInsetsListener," + " after onComputeInsets, tmpInsets: " + mTmpInsets); if (!mViewsCreated) { // The IME views are not ready, keep visible insets untouched. mTmpInsets.visibleTopInsets = 0; Loading @@ -705,6 +710,7 @@ public class InputMethodService extends AbstractInputMethodService { } mNavigationBarController.updateTouchableInsets(mTmpInsets, info); Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, end info: " + info); if (mInputFrame != null) { setImeExclusionRect(mTmpInsets.visibleTopInsets); } Loading Loading @@ -1463,6 +1469,15 @@ public class InputMethodService extends AbstractInputMethodService { proto.write(TOUCHABLE_REGION, touchableRegion.toString()); proto.end(token); } @Override public String toString() { return "Insets{contentTopInsets=" + contentTopInsets + " visibleTopInsets=" + visibleTopInsets + " touchableInsets=" + touchableInsets + " touchableRegion=" + touchableRegion.getBounds() + "}"; } } /** Loading core/java/android/inputmethodservice/NavigationBarController.java +11 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.inputmethodservice.navigationbar.NavigationBarFrame; import android.inputmethodservice.navigationbar.NavigationBarView; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; Loading Loading @@ -114,6 +115,8 @@ final class NavigationBarController { } void onNavButtonFlagsChanged(@InputMethodNavButtonFlags int navButtonFlags) { Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged: " + navButtonFlags, new Throwable()); mImpl.onNavButtonFlagsChanged(navButtonFlags); } Loading Loading @@ -235,6 +238,10 @@ final class NavigationBarController { if (ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setOnApplyWindowInsetsListener((view, insets) -> { Log.i("b/297000797", "NavigationBarController#onApplyWindowInsetsListener:" + " mNavigationBarFrame: " + mNavigationBarFrame + " captionBar visible: " + insets.isVisible(captionBar()) + " insets: " + insets); if (mNavigationBarFrame != null) { boolean visible = insets.isVisible(captionBar()); mNavigationBarFrame.setVisibility(visible ? View.VISIBLE : View.GONE); Loading Loading @@ -453,6 +460,10 @@ final class NavigationBarController { mShouldShowImeSwitcherWhenImeIsShown = shouldShowImeSwitcherWhenImeIsShown; if (ENABLE_HIDE_IME_CAPTION_BAR) { Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged," + " calling setImeCaptionBarInsetsHeight" + " with: " + getImeCaptionBarHeight(), new Throwable()); mService.mWindow.getWindow().getDecorView().getWindowInsetsController() .setImeCaptionBarInsetsHeight(getImeCaptionBarHeight()); } Loading core/java/android/view/InsetsController.java +2 −0 Original line number Diff line number Diff line Loading @@ -1856,6 +1856,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation return; } Rect newFrame = new Rect(mFrame.left, mFrame.bottom - height, mFrame.right, mFrame.bottom); Log.i("b/297000797", "InsetsController#setImeCaptionBarInsetsHeight," + " height: " + height + " frame: " + mFrame); InsetsSource source = mState.peekSource(ID_IME_CAPTION_BAR); if (mImeCaptionBarInsetsHeight != height || (source != null && !newFrame.equals(source.getFrame()))) { Loading core/java/android/view/InsetsSource.java +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.Insets; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.WindowInsets.Type.InsetsType; Loading Loading @@ -196,6 +197,12 @@ public class InsetsSource implements Parcelable { * source. */ public Insets calculateInsets(Rect relativeFrame, boolean ignoreVisibility) { if (getType() == WindowInsets.Type.ime()) { Log.i("b/297000797", "InsetsSource#calculateInsets tmpFrame: " + mTmpFrame + " ignoreVisibility: " + ignoreVisibility + " frame: " + mFrame + " relativeFrame: " + relativeFrame, new Throwable()); } return calculateInsets(relativeFrame, mFrame, ignoreVisibility); } Loading @@ -203,6 +210,12 @@ public class InsetsSource implements Parcelable { * Like {@link #calculateInsets(Rect, boolean)}, but will return visible insets. */ public Insets calculateVisibleInsets(Rect relativeFrame) { if (getType() == WindowInsets.Type.ime()) { Log.i("b/297000797", "InsetsSource#calculateVisibleInsets tmpFrame: " + mTmpFrame + " frame: " + mFrame + " visibleFrame: " + mVisibleFrame + " relativeFrame: " + relativeFrame, new Throwable()); } return calculateInsets(relativeFrame, mVisibleFrame != null ? mVisibleFrame : mFrame, false /* ignoreVisibility */); } Loading core/java/android/view/InsetsState.java +4 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.graphics.Insets; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.util.Log; import android.util.SparseArray; import android.util.SparseIntArray; import android.util.proto.ProtoOutputStream; Loading Loading @@ -380,6 +381,9 @@ public class InsetsState implements Parcelable { @InternalInsetsSide @Nullable SparseIntArray idSideMap, @Nullable boolean[] typeVisibilityMap, Insets insets, int type) { int index = indexOf(type); if (source.getId() == InsetsSource.ID_IME) { Log.i("b/297000797", "InsetsState#processSourceAsPublicType, ime insets: " + insets); } // Don't put Insets.NONE into typeInsetsMap. Otherwise, two WindowInsets can be considered // as non-equal while they provide the same insets of each type from WindowInsets#getInsets Loading Loading
core/java/android/inputmethodservice/InputMethodService.java +15 −0 Original line number Diff line number Diff line Loading @@ -685,7 +685,12 @@ public class InputMethodService extends AbstractInputMethodService { private ImeTracker.Token mCurStatsToken; final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = info -> { Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, start info: " + info + " before onComputeInsets, tmpInsets: " + mTmpInsets, new Throwable()); onComputeInsets(mTmpInsets); Log.i("b/297000797", "IME#OnComputeInternalInsetsListener," + " after onComputeInsets, tmpInsets: " + mTmpInsets); if (!mViewsCreated) { // The IME views are not ready, keep visible insets untouched. mTmpInsets.visibleTopInsets = 0; Loading @@ -705,6 +710,7 @@ public class InputMethodService extends AbstractInputMethodService { } mNavigationBarController.updateTouchableInsets(mTmpInsets, info); Log.i("b/297000797", "IME#OnComputeInternalInsetsListener, end info: " + info); if (mInputFrame != null) { setImeExclusionRect(mTmpInsets.visibleTopInsets); } Loading Loading @@ -1463,6 +1469,15 @@ public class InputMethodService extends AbstractInputMethodService { proto.write(TOUCHABLE_REGION, touchableRegion.toString()); proto.end(token); } @Override public String toString() { return "Insets{contentTopInsets=" + contentTopInsets + " visibleTopInsets=" + visibleTopInsets + " touchableInsets=" + touchableInsets + " touchableRegion=" + touchableRegion.getBounds() + "}"; } } /** Loading
core/java/android/inputmethodservice/NavigationBarController.java +11 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.inputmethodservice.navigationbar.NavigationBarFrame; import android.inputmethodservice.navigationbar.NavigationBarView; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; Loading Loading @@ -114,6 +115,8 @@ final class NavigationBarController { } void onNavButtonFlagsChanged(@InputMethodNavButtonFlags int navButtonFlags) { Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged: " + navButtonFlags, new Throwable()); mImpl.onNavButtonFlagsChanged(navButtonFlags); } Loading Loading @@ -235,6 +238,10 @@ final class NavigationBarController { if (ENABLE_HIDE_IME_CAPTION_BAR) { mNavigationBarFrame.setOnApplyWindowInsetsListener((view, insets) -> { Log.i("b/297000797", "NavigationBarController#onApplyWindowInsetsListener:" + " mNavigationBarFrame: " + mNavigationBarFrame + " captionBar visible: " + insets.isVisible(captionBar()) + " insets: " + insets); if (mNavigationBarFrame != null) { boolean visible = insets.isVisible(captionBar()); mNavigationBarFrame.setVisibility(visible ? View.VISIBLE : View.GONE); Loading Loading @@ -453,6 +460,10 @@ final class NavigationBarController { mShouldShowImeSwitcherWhenImeIsShown = shouldShowImeSwitcherWhenImeIsShown; if (ENABLE_HIDE_IME_CAPTION_BAR) { Log.i("b/297000797", "NavigationBarController#onNavButtonFlagsChanged," + " calling setImeCaptionBarInsetsHeight" + " with: " + getImeCaptionBarHeight(), new Throwable()); mService.mWindow.getWindow().getDecorView().getWindowInsetsController() .setImeCaptionBarInsetsHeight(getImeCaptionBarHeight()); } Loading
core/java/android/view/InsetsController.java +2 −0 Original line number Diff line number Diff line Loading @@ -1856,6 +1856,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation return; } Rect newFrame = new Rect(mFrame.left, mFrame.bottom - height, mFrame.right, mFrame.bottom); Log.i("b/297000797", "InsetsController#setImeCaptionBarInsetsHeight," + " height: " + height + " frame: " + mFrame); InsetsSource source = mState.peekSource(ID_IME_CAPTION_BAR); if (mImeCaptionBarInsetsHeight != height || (source != null && !newFrame.equals(source.getFrame()))) { Loading
core/java/android/view/InsetsSource.java +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.graphics.Insets; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.util.Log; import android.util.proto.ProtoOutputStream; import android.view.WindowInsets.Type.InsetsType; Loading Loading @@ -196,6 +197,12 @@ public class InsetsSource implements Parcelable { * source. */ public Insets calculateInsets(Rect relativeFrame, boolean ignoreVisibility) { if (getType() == WindowInsets.Type.ime()) { Log.i("b/297000797", "InsetsSource#calculateInsets tmpFrame: " + mTmpFrame + " ignoreVisibility: " + ignoreVisibility + " frame: " + mFrame + " relativeFrame: " + relativeFrame, new Throwable()); } return calculateInsets(relativeFrame, mFrame, ignoreVisibility); } Loading @@ -203,6 +210,12 @@ public class InsetsSource implements Parcelable { * Like {@link #calculateInsets(Rect, boolean)}, but will return visible insets. */ public Insets calculateVisibleInsets(Rect relativeFrame) { if (getType() == WindowInsets.Type.ime()) { Log.i("b/297000797", "InsetsSource#calculateVisibleInsets tmpFrame: " + mTmpFrame + " frame: " + mFrame + " visibleFrame: " + mVisibleFrame + " relativeFrame: " + relativeFrame, new Throwable()); } return calculateInsets(relativeFrame, mVisibleFrame != null ? mVisibleFrame : mFrame, false /* ignoreVisibility */); } Loading
core/java/android/view/InsetsState.java +4 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.graphics.Insets; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; import android.util.Log; import android.util.SparseArray; import android.util.SparseIntArray; import android.util.proto.ProtoOutputStream; Loading Loading @@ -380,6 +381,9 @@ public class InsetsState implements Parcelable { @InternalInsetsSide @Nullable SparseIntArray idSideMap, @Nullable boolean[] typeVisibilityMap, Insets insets, int type) { int index = indexOf(type); if (source.getId() == InsetsSource.ID_IME) { Log.i("b/297000797", "InsetsState#processSourceAsPublicType, ime insets: " + insets); } // Don't put Insets.NONE into typeInsetsMap. Otherwise, two WindowInsets can be considered // as non-equal while they provide the same insets of each type from WindowInsets#getInsets Loading