Fix isFileUri to recognize URIs with spaces. am: 6e0ca56095
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Messaging/+/16603852
Change-Id: Ic248ca97e7c775e7cef298bf03cdf13c53fb9351
diff --git a/src/com/android/messaging/ui/conversation/ConversationMessageView.java b/src/com/android/messaging/ui/conversation/ConversationMessageView.java
index 928c215..282e172 100644
--- a/src/com/android/messaging/ui/conversation/ConversationMessageView.java
+++ b/src/com/android/messaging/ui/conversation/ConversationMessageView.java
@@ -708,6 +708,7 @@
textBottomPadding = textBottomPaddingDefault;
textLeftPadding = messageTextLeftRightPadding;
textRightPadding = messageTextLeftRightPadding;
+ mMessageTextView.setTextIsSelectable(isSelected());
} else {
// Attachment(s) only
contentLeftPadding = incoming ? arrowWidth : 0;
@@ -733,6 +734,7 @@
textTopMargin = 0;
textTopPadding = textTopPaddingDefault;
textBottomPadding = textBottomPaddingDefault;
+ mMessageTextView.setTextIsSelectable(isSelected());
if (showArrow && incoming) {
textLeftPadding = messageTextLeftRightPadding + arrowWidth;
} else {
@@ -1030,6 +1032,11 @@
@Override
public boolean onLongClick(final View view) {
if (view == mMessageTextView) {
+ // Avoid trying to reselect the message
+ if (isSelected()) {
+ return false;
+ }
+
// Preemptively handle the long click event on message text so it's not handled by
// the link spans.
return performLongClick();
@@ -1195,7 +1202,7 @@
// This touch event is a long click, preemptively handle this touch event so that
// the link span won't get a onClicked() callback.
mIsLongClick = false;
- return true;
+ return false;
}
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {