From 36b1c16db5ba650cf24995f7ab7810f92db8e0a0 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Mon, 29 Jan 2018 11:36:03 -0800 Subject: [PATCH] Update Docstring for SmsMessage.getOriginatingAddress There was a public request for clarification on the address format for getOriginatingAddress. I did a little research and have added the answer to the docstring. Bug: 64697463 Test: compilation Change-Id: Icf37af0a5940a6fb7798d7c7cafe7b97683bb689 --- telephony/java/android/telephony/SmsMessage.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/telephony/java/android/telephony/SmsMessage.java b/telephony/java/android/telephony/SmsMessage.java index a6dbc06647d0..577ea7dfc004 100644 --- a/telephony/java/android/telephony/SmsMessage.java +++ b/telephony/java/android/telephony/SmsMessage.java @@ -18,8 +18,8 @@ package android.telephony; import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; +import android.annotation.Nullable; import android.annotation.StringDef; -import android.app.PendingIntent; import android.content.res.Resources; import android.os.Binder; import android.text.TextUtils; @@ -544,8 +544,16 @@ public class SmsMessage { /** * Returns the originating address (sender) of this SMS message in String - * form or null if unavailable + * form or null if unavailable. + * + *

If the address is a GSM-formatted address, it will be in a format specified by 3GPP + * 23.040 Sec 9.1.2.5. If it is a CDMA address, it will be a format specified by 3GPP2 + * C.S005-D Table 2.7.1.3.2.4-2. The choice of format is carrier-specific, so callers of the + * should be careful to avoid assumptions about the returned content. + * + * @return a String representation of the address; null if unavailable. */ + @Nullable public String getOriginatingAddress() { return mWrappedSmsMessage.getOriginatingAddress(); } -- 2.11.0