From a6379bcd1882240720f83cf7ce05c7a976d8dd99 Mon Sep 17 00:00:00 2001 From: Chen Xu Date: Thu, 3 Oct 2019 16:48:56 -0700 Subject: move CellBroadcastMessage from telephony-common to app 1. add slotIndex in SmsCbMesage 2. move cellbroadcastMessage from telephony-common to app next step, considering merging CellBroadcast to SmsCbMessage Bug: 135956699 Bug: 141962867 Test: build & unit test Change-Id: I07604101e3dccaa8e1539fa2644ef08da54d4533 (cherry picked from commit 515285b1b515330f7795ba6a9c361a56a04ab172) Merged-in: I07604101e3dccaa8e1539fa2644ef08da54d4533 --- api/system-current.txt | 3 ++- telephony/java/android/provider/Telephony.java | 13 +++++++++-- telephony/java/android/telephony/SmsCbMessage.java | 26 ++++++++++++++++++---- .../internal/telephony/cdma/SmsMessage.java | 5 +++-- .../internal/telephony/gsm/GsmSmsCbMessage.java | 9 ++++---- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index 7012a2001772..6f8c81b183ec 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -8025,7 +8025,7 @@ package android.telephony { } public final class SmsCbMessage implements android.os.Parcelable { - ctor public SmsCbMessage(int, int, int, @NonNull android.telephony.SmsCbLocation, int, @Nullable String, @Nullable String, int, @Nullable android.telephony.SmsCbEtwsInfo, @Nullable android.telephony.SmsCbCmasInfo); + ctor public SmsCbMessage(int, int, int, @NonNull android.telephony.SmsCbLocation, int, @Nullable String, @Nullable String, int, @Nullable android.telephony.SmsCbEtwsInfo, @Nullable android.telephony.SmsCbCmasInfo, int); method @NonNull public static android.telephony.SmsCbMessage createFromCursor(@NonNull android.database.Cursor); method public int describeContents(); method @Nullable public android.telephony.SmsCbCmasInfo getCmasWarningInfo(); @@ -8040,6 +8040,7 @@ package android.telephony { method public long getReceivedTime(); method public int getSerialNumber(); method public int getServiceCategory(); + method public int getSlotIndex(); method public boolean isCmasMessage(); method public boolean isEmergencyMessage(); method public boolean isEtwsMessage(); diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java index ddda010a94a4..d3728a6dd178 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -3963,12 +3963,20 @@ public final class Telephony { public static final Uri CONTENT_URI = Uri.parse("content://cellbroadcasts"); /** - * The id of the subscription which received this cell broadcast message. + * The subscription which received this cell broadcast message. + * @deprecated use {@link #SLOT_INDEX} instead. *

Type: INTEGER

* @hide */ public static final String SUB_ID = "sub_id"; + /** + * The slot which received this cell broadcast message. + *

Type: INTEGER

+ * @hide + */ + public static final String SLOT_INDEX = "slot_index"; + /** * Message geographical scope. Valid values are: *