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

Commit c7005ced authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Hide the keyboard when remote input hides." into sc-dev am: 7900e984

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15283872

Change-Id: I4719f3922e16786423957ad2530d161df4846b3a
parents 3e1311a4 7900e984
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -131,7 +131,7 @@ public class RemoteInputController {
     */
     */
    public void removeRemoteInput(NotificationEntry entry, Object token) {
    public void removeRemoteInput(NotificationEntry entry, Object token) {
        Objects.requireNonNull(entry);
        Objects.requireNonNull(entry);
        if (entry.mRemoteEditImeVisible) return;
        if (entry.mRemoteEditImeVisible && entry.mRemoteEditImeAnimatingAway) return;
        // If the view is being removed, this may be called even though we're not active
        // If the view is being removed, this may be called even though we're not active
        if (!isRemoteInputActive(entry)) return;
        if (!isRemoteInputActive(entry)) return;


+1 −0
Original line number Original line Diff line number Diff line
@@ -183,6 +183,7 @@ public final class NotificationEntry extends ListEntry {
    private boolean mIsMarkedForUserTriggeredMovement;
    private boolean mIsMarkedForUserTriggeredMovement;
    private boolean mIsAlerting;
    private boolean mIsAlerting;


    public boolean mRemoteEditImeAnimatingAway;
    public boolean mRemoteEditImeVisible;
    public boolean mRemoteEditImeVisible;
    private boolean mExpandAnimationRunning;
    private boolean mExpandAnimationRunning;


+2 −0
Original line number Original line Diff line number Diff line
@@ -272,6 +272,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
            public void onEnd(@NonNull WindowInsetsAnimation animation) {
            public void onEnd(@NonNull WindowInsetsAnimation animation) {
                super.onEnd(animation);
                super.onEnd(animation);
                if (animation.getTypeMask() == WindowInsets.Type.ime()) {
                if (animation.getTypeMask() == WindowInsets.Type.ime()) {
                    mEntry.mRemoteEditImeAnimatingAway = false;
                    mEntry.mRemoteEditImeVisible =
                    mEntry.mRemoteEditImeVisible =
                            mEditText.getRootWindowInsets().isVisible(WindowInsets.Type.ime());
                            mEditText.getRootWindowInsets().isVisible(WindowInsets.Type.ime());
                    if (!mEntry.mRemoteEditImeVisible && !mEditText.mShowImeOnInputConnection) {
                    if (!mEntry.mRemoteEditImeVisible && !mEditText.mShowImeOnInputConnection) {
@@ -392,6 +393,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
        mSendButton.setVisibility(INVISIBLE);
        mSendButton.setVisibility(INVISIBLE);
        mProgressBar.setVisibility(VISIBLE);
        mProgressBar.setVisibility(VISIBLE);
        mEntry.lastRemoteInputSent = SystemClock.elapsedRealtime();
        mEntry.lastRemoteInputSent = SystemClock.elapsedRealtime();
        mEntry.mRemoteEditImeAnimatingAway = true;
        mController.addSpinning(mEntry.getKey(), mToken);
        mController.addSpinning(mEntry.getKey(), mToken);
        mController.removeRemoteInput(mEntry, mToken);
        mController.removeRemoteInput(mEntry, mToken);
        mEditText.mShowImeOnInputConnection = false;
        mEditText.mShowImeOnInputConnection = false;