diff options
| author | 2020-02-21 14:57:46 -0800 | |
|---|---|---|
| committer | 2020-03-04 23:49:03 +0000 | |
| commit | 38bb7285a96a43a41276e1228e301dcbc21c612d (patch) | |
| tree | 5367617b2df699d8de7fcd6933ce43c9f3d2618e | |
| parent | e6d6f5f87d194842c550ec1db749bd541324f9fd (diff) | |
Change javadoc of getSubmitPduEncodedMessage and add IntRange to its
parameters
To resolve merge conflict for aosp/1242353. Cherrypick it to rvc-dev since this should be in R.
Bug: 149697039
Test: compile
Change-Id: I5e131f71c376db56d3b7aa835058f0d2f4e8566a
Merged-In: I5e131f71c376db56d3b7aa835058f0d2f4e8566a
(cherry picked from commit 1d2378bd0d9ee46599fa881f398fa31ab103826d)
| -rwxr-xr-x | api/system-current.txt | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/SmsMessage.java | 20 |
2 files changed, 13 insertions, 9 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 85cff8356ba8..005c69370dd6 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -11526,7 +11526,7 @@ package android.telephony { public class SmsMessage { method @Nullable public static android.telephony.SmsMessage createFromNativeSmsSubmitPdu(@NonNull byte[], boolean); method @Nullable public static android.telephony.SmsMessage.SubmitPdu getSmsPdu(int, int, @Nullable String, @NonNull String, @NonNull String, long); - method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static byte[] getSubmitPduEncodedMessage(boolean, @NonNull String, @NonNull String, int, int, int, int, int, int); + method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static byte[] getSubmitPduEncodedMessage(boolean, @NonNull String, @NonNull String, int, @IntRange(from=0) int, @IntRange(from=0) int, @IntRange(from=0, to=255) int, @IntRange(from=1, to=255) int, @IntRange(from=1, to=255) int); } public class SubscriptionInfo implements android.os.Parcelable { diff --git a/telephony/java/android/telephony/SmsMessage.java b/telephony/java/android/telephony/SmsMessage.java index 37d3d32efc34..bc5cc9601e05 100644 --- a/telephony/java/android/telephony/SmsMessage.java +++ b/telephony/java/android/telephony/SmsMessage.java @@ -20,6 +20,7 @@ import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; import android.Manifest; import android.annotation.IntDef; +import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; @@ -719,9 +720,9 @@ public class SmsMessage { * 23.040 9.2.3.24.16 * @param languageShiftTable GSM national language shift table to use, specified by 3GPP * 23.040 9.2.3.24.15 - * @param refNumber parameter to create SmsHeader - * @param seqNumber parameter to create SmsHeader - * @param msgCount parameter to create SmsHeader + * @param refNumber reference number of concatenated SMS, specified by 3GPP 23.040 9.2.3.24.1 + * @param seqNumber sequence number of concatenated SMS, specified by 3GPP 23.040 9.2.3.24.1 + * @param msgCount count of messages of concatenated SMS, specified by 3GPP 23.040 9.2.3.24.2 * @return a byte[] containing the encoded message * * @hide @@ -730,11 +731,14 @@ public class SmsMessage { @SystemApi @NonNull public static byte[] getSubmitPduEncodedMessage(boolean isTypeGsm, - @NonNull String destinationAddress, - @NonNull String message, - @EncodingSize int encoding, int languageTable, - int languageShiftTable, int refNumber, - int seqNumber, int msgCount) { + @NonNull String destinationAddress, + @NonNull String message, + @EncodingSize int encoding, + @IntRange(from = 0) int languageTable, + @IntRange(from = 0) int languageShiftTable, + @IntRange(from = 0, to = 255) int refNumber, + @IntRange(from = 1, to = 255) int seqNumber, + @IntRange(from = 1, to = 255) int msgCount) { byte[] data; SmsHeader.ConcatRef concatRef = new SmsHeader.ConcatRef(); concatRef.refNumber = refNumber; |