Merge "Merge "Fix DirectReply bug when reapply fails" into nyc-dev am: 6510bdeada am: 053ffa6d7c" into nyc-mr1-dev-plus-aosp

am: b07aac4e95

* commit 'b07aac4e95b192b880ce3c5406dbfbf06b1f000f':
  Fix DirectReply bug when reapply fails

Change-Id: I127a782f9ef492f0bd309433733df4a49b893879
This commit is contained in:
Adrian Roos
2016-06-02 00:20:21 +00:00
committed by android-build-merger
2 changed files with 16 additions and 6 deletions

View File

@@ -277,15 +277,25 @@ public class NotificationContentView extends FrameLayout {
mContractedChild.animate().cancel();
removeView(mContractedChild);
}
mPreviousExpandedRemoteInputIntent =
mExpandedRemoteInput != null ? mExpandedRemoteInput.getPendingIntent() : null;
mPreviousExpandedRemoteInputIntent = null;
if (mExpandedRemoteInput != null) {
mExpandedRemoteInput.onNotificationUpdateOrReset();
if (mExpandedRemoteInput.isActive()) {
mPreviousExpandedRemoteInputIntent = mExpandedRemoteInput.getPendingIntent();
}
}
if (mExpandedChild != null) {
mExpandedChild.animate().cancel();
removeView(mExpandedChild);
mExpandedRemoteInput = null;
}
mPreviousHeadsUpRemoteInputIntent =
mHeadsUpRemoteInput != null ? mHeadsUpRemoteInput.getPendingIntent() : null;
mPreviousHeadsUpRemoteInputIntent = null;
if (mHeadsUpRemoteInput != null) {
mHeadsUpRemoteInput.onNotificationUpdateOrReset();
if (mHeadsUpRemoteInput.isActive()) {
mPreviousHeadsUpRemoteInputIntent = mHeadsUpRemoteInput.getPendingIntent();
}
}
if (mHeadsUpChild != null) {
mHeadsUpChild.animate().cancel();
removeView(mHeadsUpChild);
@@ -910,7 +920,7 @@ public class NotificationContentView extends FrameLayout {
view.findViewWithTag(RemoteInputView.VIEW_TAG);
if (existing != null) {
existing.onNotificationUpdate();
existing.onNotificationUpdateOrReset();
}
if (existing == null && hasRemoteInput) {

View File

@@ -227,7 +227,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
updateSendButton();
}
public void onNotificationUpdate() {
public void onNotificationUpdateOrReset() {
boolean sending = mProgressBar.getVisibility() == VISIBLE;
if (sending) {