Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95a0b591 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add some additional protologs for ime visibility" into main

parents 81515a9e e44a419f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -773,6 +773,9 @@ public class BubbleController implements ConfigurationChangeListener,
     * Hides the current input method, wherever it may be focused, via InputMethodManagerInternal.
     */
    void hideCurrentInputMethod(@Nullable Runnable onImeHidden) {
        final boolean isDeviceLocked = isDeviceLocked();
        ProtoLog.d(WM_SHELL_BUBBLES, "hideCurrentInputMethod, runnable=%s, deviceLocked=%b",
                onImeHidden, isDeviceLocked);
        mOnImeHidden = onImeHidden;
        mBubblePositioner.setImeVisible(false /* visible */, 0 /* height */);
        int displayId = mWindowManager.getDefaultDisplay().getDisplayId();
@@ -780,7 +783,7 @@ public class BubbleController implements ConfigurationChangeListener,
        // the IME state is frozen and it will lead to internal IME state going out of sync. This
        // will make the IME visible when the device is unlocked. Instead we use
        // DisplayImeController directly to make sure the state is correct when the device unlocks.
        if (isDeviceLocked()) {
        if (isDeviceLocked) {
            mDisplayImeController.hideImeForBubblesWhenLocked(displayId);
            return;
        }
@@ -796,6 +799,7 @@ public class BubbleController implements ConfigurationChangeListener,
     * {@link #hideCurrentInputMethod(Runnable)}
     */
    void clearImeHiddenRunnable() {
        ProtoLog.d(WM_SHELL_BUBBLES, "clearImeHiddenRunnable, runnable=%s", mOnImeHidden);
        mOnImeHidden = null;
    }

@@ -3192,6 +3196,9 @@ public class BubbleController implements ConfigurationChangeListener,
            if (getDisplayId() != mContext.getDisplayId()) {
                return;
            }
            ProtoLog.d(WM_SHELL_BUBBLES,
                    "onImeVisibilityChanged visible=%b runnable=%s stackView=%s",
                    imeVisible, mOnImeHidden, mStackView);
            // the imeHeight here is actually the ime inset; it only includes the part of the ime
            // that overlaps with the Bubbles window. adjust it to include the bottom screen inset,
            // so we have the total height of the ime.
+2 −0
Original line number Diff line number Diff line
@@ -362,6 +362,7 @@ public class BubbleStackView extends FrameLayout
        pw.print("  stack visibility :       "); pw.println(getVisibility());
        pw.print("  temporarilyInvisible:    "); pw.println(mTemporarilyInvisible);
        pw.print("  expandedViewTemporarilyHidden: "); pw.println(mExpandedViewTemporarilyHidden);
        pw.print("  imeVisible:              "); pw.println(mIsImeVisible);
        mStackAnimationController.dump(pw);
        mExpandedAnimationController.dump(pw);
        mExpandedViewAnimationController.dump(pw);
@@ -2601,6 +2602,7 @@ public class BubbleStackView extends FrameLayout
        // order to avoid flickers
        // TODO: b/424812643 - clean up the onImeHidden runnable
        Runnable onImeHidden = () -> {
            ProtoLog.d(WM_SHELL_BUBBLES, "running on ime hidden");
            if (!isAttachedToWindow()) {
                Log.w(TAG, "onImeHidden runnable running but we're not attached.");
            }