From 515285b1b515330f7795ba6a9c361a56a04ab172 Mon Sep 17 00:00:00 2001 From: Chen Xu Date: Thu, 3 Oct 2019 16:48:56 -0700 Subject: [PATCH] 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 --- api/system-current.txt | 3 ++- .../java/android/provider/Telephony.java | 13 ++++++++-- .../java/android/telephony/SmsCbMessage.java | 26 ++++++++++++++++--- .../internal/telephony/cdma/SmsMessage.java | 5 ++-- .../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 8875e79951054..c7f6b9da951eb 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -8114,7 +8114,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(); @@ -8129,6 +8129,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 67b252e52db99..bc29b595b0bb4 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -3962,12 +3962,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: *