Merge "Fixed an animation issue with Smart Replies" into pi-dev

am: 12bae55fbc

Change-Id: Ifb8ac0b2cb9e180c7a8ca118dc97d0cecb6e21b3
This commit is contained in:
android-build-team Robot
2018-05-04 14:32:43 -07:00
committed by android-build-merger

View File

@@ -73,7 +73,14 @@ public interface MessagingMessage extends MessagingLinearLayout.MessagingChild {
if (!Objects.equals(message.getSender(), ownMessage.getSender())) {
return false;
}
if (!Objects.equals(message.getTimestamp(), ownMessage.getTimestamp())) {
boolean hasRemoteInputHistoryChanged = message.isRemoteInputHistory()
!= ownMessage.isRemoteInputHistory();
// When the remote input history has changed, we want to regard messages equal even when
// the timestamp changes. The main reason is that the message that the system inserts
// will have a different time set than the one that the app will update us with and we
// still want to reuse that message.
if (!hasRemoteInputHistoryChanged
&& !Objects.equals(message.getTimestamp(), ownMessage.getTimestamp())) {
return false;
}
if (!Objects.equals(message.getDataMimeType(), ownMessage.getDataMimeType())) {
@@ -82,9 +89,6 @@ public interface MessagingMessage extends MessagingLinearLayout.MessagingChild {
if (!Objects.equals(message.getDataUri(), ownMessage.getDataUri())) {
return false;
}
if (message.isRemoteInputHistory() != ownMessage.isRemoteInputHistory()) {
return false;
}
return true;
}