summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorSatish Roddom <satishroddom@motorola.com>2009-08-31 05:00:23 -0500
committerWink Saville <wink@google.com>2009-09-02 12:36:59 -0700
commitaf6bb1ce9aa0f1f73666b25af404640930be8c10 (patch)
tree3a1a069225a94828b591c2a533a28a6ce0aaef8f /telephony
parent66c70e13d9f39cf82df8542fe53f2049d3f2062e (diff)
downloadframeworks_base-af6bb1ce9aa0f1f73666b25af404640930be8c10.zip
frameworks_base-af6bb1ce9aa0f1f73666b25af404640930be8c10.tar.gz
frameworks_base-af6bb1ce9aa0f1f73666b25af404640930be8c10.tar.bz2
SMS-to-email fix for messages from the web
Certain carrier websites allow sending SMS to phones on their network. They allow filling out a "Reply to Address" which can be a phone number. The website may send that message to the device as an SMS-to-email, but the "From" address will be an SMS short code and not a valid email address. When the user replies to this message, the response is directed to the short code and not delivered correctly. In extractEmailAddressFromMessageBody(), currently it checks if the sender is a shortcode and an email address is present as the first word in the message body. If so, it replaces the email address as the sender replacing the short code. The fix to support the above case is remove the email address check and treat the first word as FROM address regardless of what the user types. Change-Id: Ifd39a39b352f204024c76fde293164dcd2b0896b
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/SmsMessageBase.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/telephony/java/com/android/internal/telephony/SmsMessageBase.java b/telephony/java/com/android/internal/telephony/SmsMessageBase.java
index e73039b..3f0213b 100644
--- a/telephony/java/com/android/internal/telephony/SmsMessageBase.java
+++ b/telephony/java/com/android/internal/telephony/SmsMessageBase.java
@@ -383,7 +383,7 @@ public abstract class SmsMessageBase {
* 2. [x@y][ ]/[body]
*/
String[] parts = messageBody.split("( /)|( )", 2);
- if (parts.length < 1 || parts[0].indexOf('@') == -1) return;
+ if (parts.length < 1) return;
emailFrom = parts[0];
emailBody = parts[1];
isEmail = true;