summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2021-07-15 16:35:20 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-07-15 16:35:20 +0000
commit7900e98494768616f273d2125173785997928fb4 (patch)
tree67a6fb1a86b13f49df6a38e21cac14007167aa93
parent6a84070852de7fe86d502310b88da0607bbe21fe (diff)
parentb13ce85b5b6104e552021d73301b6ecf5b4faa37 (diff)
Merge "Hide the keyboard when remote input hides." into sc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java2
3 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
index b6aed23e64ee..180f81c22a9d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
@@ -131,7 +131,7 @@ public class RemoteInputController {
*/
public void removeRemoteInput(NotificationEntry entry, Object token) {
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 (!isRemoteInputActive(entry)) return;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
index 96b0e7819c7a..94ee868ceebc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
@@ -183,6 +183,7 @@ public final class NotificationEntry extends ListEntry {
private boolean mIsMarkedForUserTriggeredMovement;
private boolean mIsAlerting;
+ public boolean mRemoteEditImeAnimatingAway;
public boolean mRemoteEditImeVisible;
private boolean mExpandAnimationRunning;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index bbaf65a399a9..84d7c05ddc14 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -272,6 +272,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
public void onEnd(@NonNull WindowInsetsAnimation animation) {
super.onEnd(animation);
if (animation.getTypeMask() == WindowInsets.Type.ime()) {
+ mEntry.mRemoteEditImeAnimatingAway = false;
mEntry.mRemoteEditImeVisible =
mEditText.getRootWindowInsets().isVisible(WindowInsets.Type.ime());
if (!mEntry.mRemoteEditImeVisible && !mEditText.mShowImeOnInputConnection) {
@@ -392,6 +393,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
mSendButton.setVisibility(INVISIBLE);
mProgressBar.setVisibility(VISIBLE);
mEntry.lastRemoteInputSent = SystemClock.elapsedRealtime();
+ mEntry.mRemoteEditImeAnimatingAway = true;
mController.addSpinning(mEntry.getKey(), mToken);
mController.removeRemoteInput(mEntry, mToken);
mEditText.mShowImeOnInputConnection = false;