DirectReply: Fix bugs when replying from HUNs

Fixes a bug that would re-open the remote input when
it was sent while HUN'd. Also fixes a bug that would
not properly clear a notification if swiped away and
at the same time HUN'd and having a reply active.

Change-Id: I3e8b5f81eaffd8e4b8602f3dbdd025229ba201fa
Fixes: 30454772
This commit is contained in:
Adrian Roos
2016-08-23 18:23:01 +02:00
committed by Selim Cinek
parent e9c519e049
commit 190e532c86
2 changed files with 4 additions and 2 deletions

View File

@@ -1610,7 +1610,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
} }
Entry entry = mNotificationData.get(key); Entry entry = mNotificationData.get(key);
if (entry != null && mRemoteInputController.isRemoteInputActive(entry)) { if (entry != null && mRemoteInputController.isRemoteInputActive(entry)
&& (entry.row != null && !entry.row.isDismissed())) {
mLatestRankingMap = ranking; mLatestRankingMap = ranking;
mRemoteInputEntriesToRemoveOnCollapse.add(entry); mRemoteInputEntriesToRemoveOnCollapse.add(entry);
return; return;
@@ -2535,6 +2536,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mStatusBarWindowManager.setHeadsUpShowing(false); mStatusBarWindowManager.setHeadsUpShowing(false);
mHeadsUpManager.setHeadsUpGoingAway(false); mHeadsUpManager.setHeadsUpGoingAway(false);
} }
removeRemoteInputEntriesKeptUntilCollapsed();
} }
}); });
} }

View File

@@ -348,7 +348,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
} }
public boolean isActive() { public boolean isActive() {
return mEditText.isFocused(); return mEditText.isFocused() && mEditText.isEnabled();
} }
public void stealFocusFrom(RemoteInputView other) { public void stealFocusFrom(RemoteInputView other) {