Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b79955d authored by Jordan Liu's avatar Jordan Liu Committed by android-build-merger
Browse files

Merge "Change CellBroadcast APIs to SystemApi" am: 82454e02

am: d41a61df

Change-Id: I18a2935b4ab131032160313844d1955d7f92ae4f
parents b0bf1720 d41a61df
Loading
Loading
Loading
Loading
+143 −0
Original line number Diff line number Diff line
@@ -6073,6 +6073,30 @@ package android.provider {
    field public static final String WAIT_TIME_RETRY = "wait_time";
  }
  public static final class Telephony.CellBroadcasts implements android.provider.BaseColumns {
    field public static final String CID = "cid";
    field public static final String CMAS_CATEGORY = "cmas_category";
    field public static final String CMAS_CERTAINTY = "cmas_certainty";
    field public static final String CMAS_MESSAGE_CLASS = "cmas_message_class";
    field public static final String CMAS_RESPONSE_TYPE = "cmas_response_type";
    field public static final String CMAS_SEVERITY = "cmas_severity";
    field public static final String CMAS_URGENCY = "cmas_urgency";
    field @NonNull public static final android.net.Uri CONTENT_URI;
    field public static final String DEFAULT_SORT_ORDER = "date DESC";
    field public static final String DELIVERY_TIME = "date";
    field public static final String ETWS_WARNING_TYPE = "etws_warning_type";
    field public static final String GEOGRAPHICAL_SCOPE = "geo_scope";
    field public static final String LAC = "lac";
    field public static final String LANGUAGE_CODE = "language";
    field public static final String MESSAGE_BODY = "body";
    field public static final String MESSAGE_FORMAT = "format";
    field public static final String MESSAGE_PRIORITY = "priority";
    field public static final String MESSAGE_READ = "read";
    field public static final String PLMN = "plmn";
    field public static final String SERIAL_NUMBER = "serial_number";
    field public static final String SERVICE_CATEGORY = "service_category";
  }
  public final class TimeZoneRulesDataContract {
    field public static final String AUTHORITY = "com.android.timezone";
  }
@@ -7878,7 +7902,125 @@ package android.telephony {
    field public static final int ROAMING_TYPE_UNKNOWN = 1; // 0x1
  }
  public final class SmsCbCmasInfo implements android.os.Parcelable {
    ctor public SmsCbCmasInfo(int, int, int, int, int, int);
    method public int describeContents();
    method public int getCategory();
    method public int getCertainty();
    method public int getMessageClass();
    method public int getResponseType();
    method public int getSeverity();
    method public int getUrgency();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CMAS_CATEGORY_CBRNE = 10; // 0xa
    field public static final int CMAS_CATEGORY_ENV = 7; // 0x7
    field public static final int CMAS_CATEGORY_FIRE = 5; // 0x5
    field public static final int CMAS_CATEGORY_GEO = 0; // 0x0
    field public static final int CMAS_CATEGORY_HEALTH = 6; // 0x6
    field public static final int CMAS_CATEGORY_INFRA = 9; // 0x9
    field public static final int CMAS_CATEGORY_MET = 1; // 0x1
    field public static final int CMAS_CATEGORY_OTHER = 11; // 0xb
    field public static final int CMAS_CATEGORY_RESCUE = 4; // 0x4
    field public static final int CMAS_CATEGORY_SAFETY = 2; // 0x2
    field public static final int CMAS_CATEGORY_SECURITY = 3; // 0x3
    field public static final int CMAS_CATEGORY_TRANSPORT = 8; // 0x8
    field public static final int CMAS_CATEGORY_UNKNOWN = -1; // 0xffffffff
    field public static final int CMAS_CERTAINTY_LIKELY = 1; // 0x1
    field public static final int CMAS_CERTAINTY_OBSERVED = 0; // 0x0
    field public static final int CMAS_CERTAINTY_UNKNOWN = -1; // 0xffffffff
    field public static final int CMAS_CLASS_CHILD_ABDUCTION_EMERGENCY = 3; // 0x3
    field public static final int CMAS_CLASS_CMAS_EXERCISE = 5; // 0x5
    field public static final int CMAS_CLASS_EXTREME_THREAT = 1; // 0x1
    field public static final int CMAS_CLASS_OPERATOR_DEFINED_USE = 6; // 0x6
    field public static final int CMAS_CLASS_PRESIDENTIAL_LEVEL_ALERT = 0; // 0x0
    field public static final int CMAS_CLASS_REQUIRED_MONTHLY_TEST = 4; // 0x4
    field public static final int CMAS_CLASS_SEVERE_THREAT = 2; // 0x2
    field public static final int CMAS_CLASS_UNKNOWN = -1; // 0xffffffff
    field public static final int CMAS_RESPONSE_TYPE_ASSESS = 6; // 0x6
    field public static final int CMAS_RESPONSE_TYPE_AVOID = 5; // 0x5
    field public static final int CMAS_RESPONSE_TYPE_EVACUATE = 1; // 0x1
    field public static final int CMAS_RESPONSE_TYPE_EXECUTE = 3; // 0x3
    field public static final int CMAS_RESPONSE_TYPE_MONITOR = 4; // 0x4
    field public static final int CMAS_RESPONSE_TYPE_NONE = 7; // 0x7
    field public static final int CMAS_RESPONSE_TYPE_PREPARE = 2; // 0x2
    field public static final int CMAS_RESPONSE_TYPE_SHELTER = 0; // 0x0
    field public static final int CMAS_RESPONSE_TYPE_UNKNOWN = -1; // 0xffffffff
    field public static final int CMAS_SEVERITY_EXTREME = 0; // 0x0
    field public static final int CMAS_SEVERITY_SEVERE = 1; // 0x1
    field public static final int CMAS_SEVERITY_UNKNOWN = -1; // 0xffffffff
    field public static final int CMAS_URGENCY_EXPECTED = 1; // 0x1
    field public static final int CMAS_URGENCY_IMMEDIATE = 0; // 0x0
    field public static final int CMAS_URGENCY_UNKNOWN = -1; // 0xffffffff
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbCmasInfo> CREATOR;
  }
  public final class SmsCbEtwsInfo implements android.os.Parcelable {
    ctor public SmsCbEtwsInfo(int, boolean, boolean, boolean, @Nullable byte[]);
    method public int describeContents();
    method @Nullable public byte[] getPrimaryNotificationSignature();
    method public long getPrimaryNotificationTimestamp();
    method public int getWarningType();
    method public boolean isEmergencyUserAlert();
    method public boolean isPopupAlert();
    method public boolean isPrimary();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbEtwsInfo> CREATOR;
    field public static final int ETWS_WARNING_TYPE_EARTHQUAKE = 0; // 0x0
    field public static final int ETWS_WARNING_TYPE_EARTHQUAKE_AND_TSUNAMI = 2; // 0x2
    field public static final int ETWS_WARNING_TYPE_OTHER_EMERGENCY = 4; // 0x4
    field public static final int ETWS_WARNING_TYPE_TEST_MESSAGE = 3; // 0x3
    field public static final int ETWS_WARNING_TYPE_TSUNAMI = 1; // 0x1
    field public static final int ETWS_WARNING_TYPE_UNKNOWN = -1; // 0xffffffff
  }
  public final class SmsCbLocation implements android.os.Parcelable {
    method public int describeContents();
    method public int getCid();
    method public int getLac();
    method @NonNull public String getPlmn();
    method public boolean isInLocationArea(@NonNull android.telephony.SmsCbLocation);
    method public boolean isInLocationArea(@Nullable String, int, int);
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbLocation> CREATOR;
  }
  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);
    method @NonNull public static android.telephony.SmsCbMessage createFromCursor(@NonNull android.database.Cursor);
    method public int describeContents();
    method @Nullable public android.telephony.SmsCbCmasInfo getCmasWarningInfo();
    method @NonNull public android.content.ContentValues getContentValues();
    method @Nullable public android.telephony.SmsCbEtwsInfo getEtwsWarningInfo();
    method public int getGeographicalScope();
    method @Nullable public String getLanguageCode();
    method @NonNull public android.telephony.SmsCbLocation getLocation();
    method @Nullable public String getMessageBody();
    method public int getMessageFormat();
    method public int getMessagePriority();
    method public long getReceivedTime();
    method public int getSerialNumber();
    method public int getServiceCategory();
    method public boolean isCmasMessage();
    method public boolean isEmergencyMessage();
    method public boolean isEtwsMessage();
    method public boolean needGeoFencingCheck();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbMessage> CREATOR;
    field public static final int GEOGRAPHICAL_SCOPE_CELL_WIDE = 3; // 0x3
    field public static final int GEOGRAPHICAL_SCOPE_CELL_WIDE_IMMEDIATE = 0; // 0x0
    field public static final int GEOGRAPHICAL_SCOPE_LOCATION_AREA_WIDE = 2; // 0x2
    field public static final int GEOGRAPHICAL_SCOPE_PLMN_WIDE = 1; // 0x1
    field public static final int MESSAGE_FORMAT_3GPP = 1; // 0x1
    field public static final int MESSAGE_FORMAT_3GPP2 = 2; // 0x2
    field public static final int MESSAGE_PRIORITY_EMERGENCY = 3; // 0x3
    field public static final int MESSAGE_PRIORITY_INTERACTIVE = 1; // 0x1
    field public static final int MESSAGE_PRIORITY_NORMAL = 0; // 0x0
    field public static final int MESSAGE_PRIORITY_URGENT = 2; // 0x2
  }
  public final class SmsManager {
    method public boolean disableCellBroadcastRange(int, int, int);
    method public boolean enableCellBroadcastRange(int, int, int);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void sendMultipartTextMessageWithoutPersisting(String, String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>);
    field public static final int RESULT_CANCELLED = 23; // 0x17
    field public static final int RESULT_ENCODING_ERROR = 18; // 0x12
@@ -7908,6 +8050,7 @@ package android.telephony {
  public class SubscriptionManager {
    method public java.util.List<android.telephony.SubscriptionInfo> getAvailableSubscriptionInfoList();
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEnabledSubscriptionId(int);
    method @NonNull public static android.content.res.Resources getResourcesForSubId(@NonNull android.content.Context, int);
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isSubscriptionEnabled(int);
    method public void requestEmbeddedSubscriptionInfoListRefresh();
    method public void requestEmbeddedSubscriptionInfoListRefresh(int);
+0 −24
Original line number Diff line number Diff line
@@ -594,30 +594,6 @@ Landroid/telephony/ims/compat/stub/ImsUtListenerImplBase;-><init>()V
Landroid/telephony/mbms/IMbmsStreamingSessionCallback$Stub;-><init>()V
Landroid/telephony/mbms/IStreamingServiceCallback$Stub;-><init>()V
Landroid/telephony/mbms/vendor/IMbmsStreamingService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/telephony/mbms/vendor/IMbmsStreamingService;
Landroid/telephony/SmsCbCmasInfo;->getCategory()I
Landroid/telephony/SmsCbCmasInfo;->getCertainty()I
Landroid/telephony/SmsCbCmasInfo;->getMessageClass()I
Landroid/telephony/SmsCbCmasInfo;->getResponseType()I
Landroid/telephony/SmsCbCmasInfo;->getSeverity()I
Landroid/telephony/SmsCbCmasInfo;->getUrgency()I
Landroid/telephony/SmsCbEtwsInfo;->getWarningType()I
Landroid/telephony/SmsCbLocation;-><init>(Ljava/lang/String;)V
Landroid/telephony/SmsCbLocation;-><init>(Ljava/lang/String;II)V
Landroid/telephony/SmsCbLocation;->getCid()I
Landroid/telephony/SmsCbLocation;->getLac()I
Landroid/telephony/SmsCbLocation;->getPlmn()Ljava/lang/String;
Landroid/telephony/SmsCbMessage;-><init>(Landroid/os/Parcel;)V
Landroid/telephony/SmsCbMessage;->getCmasWarningInfo()Landroid/telephony/SmsCbCmasInfo;
Landroid/telephony/SmsCbMessage;->getEtwsWarningInfo()Landroid/telephony/SmsCbEtwsInfo;
Landroid/telephony/SmsCbMessage;->getGeographicalScope()I
Landroid/telephony/SmsCbMessage;->getLanguageCode()Ljava/lang/String;
Landroid/telephony/SmsCbMessage;->getLocation()Landroid/telephony/SmsCbLocation;
Landroid/telephony/SmsCbMessage;->getMessageBody()Ljava/lang/String;
Landroid/telephony/SmsCbMessage;->getMessageFormat()I
Landroid/telephony/SmsCbMessage;->getSerialNumber()I
Landroid/telephony/SmsCbMessage;->getServiceCategory()I
Landroid/telephony/SmsCbMessage;->isCmasMessage()Z
Landroid/telephony/SmsCbMessage;->isEmergencyMessage()Z
Landroid/telephony/TelephonyManager$MultiSimVariants;->values()[Landroid/telephony/TelephonyManager$MultiSimVariants;
Landroid/util/Singleton;-><init>()V
Landroid/view/accessibility/IAccessibilityManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+59 −12
Original line number Diff line number Diff line
@@ -3944,9 +3944,10 @@ public final class Telephony {
    }

    /**
     * Contains received SMS cell broadcast messages.
     * Contains received SMS cell broadcast messages. More details are available in 3GPP TS 23.041.
     * @hide
     */
    @SystemApi
    public static final class CellBroadcasts implements BaseColumns {

        /**
@@ -3958,30 +3959,52 @@ public final class Telephony {
        /**
         * The {@code content://} URI for this table.
         */
        @NonNull
        public static final Uri CONTENT_URI = Uri.parse("content://cellbroadcasts");

        /**
         * Message geographical scope.
         * Message geographical scope. Valid values are:
         * <ul>
         * <li>{@link android.telephony.SmsCbMessage#GEOGRAPHICAL_SCOPE_CELL_WIDE}. meaning the
         * message is for the radio service cell</li>
         * <li>{@link android.telephony.SmsCbMessage#GEOGRAPHICAL_SCOPE_CELL_WIDE_IMMEDIATE},
         * meaning the message is for the radio service cell and immediately displayed</li>
         * <li>{@link android.telephony.SmsCbMessage#GEOGRAPHICAL_SCOPE_PLMN_WIDE}, meaning the
         * message is for the PLMN (i.e. MCC/MNC)</li>
         * <li>{@link android.telephony.SmsCbMessage#GEOGRAPHICAL_SCOPE_LOCATION_AREA_WIDE},
         * meaning the message is for the location area (in GSM) or service area (in UMTS)</li>
         * </ul>
         *
         * <p>A message meant for a particular scope is automatically dismissed when the device
         * exits that scope.</p>
         * <P>Type: INTEGER</P>
         */
        public static final String GEOGRAPHICAL_SCOPE = "geo_scope";

        /**
         * Message serial number.
         * <p>
         * A 16-bit integer which identifies a particular CBS (cell
         * broadcast short message service) message. The core network is responsible for
         * allocating this value, and the value may be managed cyclically (3GPP TS 23.041 section
         * 9.2.1) once the serial message has been incremented a sufficient number of times.
         * </p>
         * <P>Type: INTEGER</P>
         */
        public static final String SERIAL_NUMBER = "serial_number";

        /**
         * PLMN of broadcast sender. {@code SERIAL_NUMBER + PLMN + LAC + CID} uniquely identifies
         * a broadcast for duplicate detection purposes.
         * PLMN (i.e. MCC/MNC) of broadcast sender. {@code SERIAL_NUMBER + PLMN + LAC + CID}
         * uniquely identifies a broadcast for duplicate detection purposes.
         * <P>Type: TEXT</P>
         */
        public static final String PLMN = "plmn";

        /**
         * Location Area (GSM) or Service Area (UMTS) of broadcast sender. Unused for CDMA.
         * Only included if Geographical Scope of message is not PLMN wide (01).
         * Location area code (LAC).
         * <p>Code representing location area (GSM) or service area (UMTS) of broadcast sender.
         * Unused for CDMA. Only included if Geographical Scope of message is not PLMN wide (01).
         * This value is sent by the network based on the cell tower.
         * <P>Type: INTEGER</P>
         */
        public static final String LAC = "lac";
@@ -3996,23 +4019,29 @@ public final class Telephony {
        /**
         * Message code. <em>OBSOLETE: merged into SERIAL_NUMBER.</em>
         * <P>Type: INTEGER</P>
         * @hide
         */
        public static final String V1_MESSAGE_CODE = "message_code";

        /**
         * Message identifier. <em>OBSOLETE: renamed to SERVICE_CATEGORY.</em>
         * <P>Type: INTEGER</P>
         * @hide
         */
        public static final String V1_MESSAGE_IDENTIFIER = "message_id";

        /**
         * Service category (GSM/UMTS: message identifier; CDMA: service category).
         * Service category which represents the general topic of the message.
         * <p>
         * For GSM/UMTS: message identifier (see 3GPP TS 23.041 section 9.4.1.2.2)
         * For CDMA: a 16-bit CDMA service category (see 3GPP2 C.R1001-D section 9.3)
         * </p>
         * <P>Type: INTEGER</P>
         */
        public static final String SERVICE_CATEGORY = "service_category";

        /**
         * Message language code.
         * Message language code. (See 3GPP TS 23.041 section 9.4.1.2.3 for details).
         * <P>Type: TEXT</P>
         */
        public static final String LANGUAGE_CODE = "language";
@@ -4025,6 +4054,7 @@ public final class Telephony {

        /**
         * Message delivery time.
         * <p>This value is a system timestamp using {@link System#currentTimeMillis}</p>
         * <P>Type: INTEGER (long)</P>
         */
        public static final String DELIVERY_TIME = "date";
@@ -4036,25 +4066,36 @@ public final class Telephony {
        public static final String MESSAGE_READ = "read";

        /**
         * Message format (3GPP or 3GPP2).
         * Message format ({@link android.telephony.SmsCbMessage#MESSAGE_FORMAT_3GPP} or
         * {@link android.telephony.SmsCbMessage#MESSAGE_FORMAT_3GPP2}).
         * <P>Type: INTEGER</P>
         */
        public static final String MESSAGE_FORMAT = "format";

        /**
         * Message priority (including emergency).
         * Message priority.
         * <p>This includes
         * <ul>
         * <li>{@link android.telephony.SmsCbMessage#MESSAGE_PRIORITY_NORMAL}</li>
         * <li>{@link android.telephony.SmsCbMessage#MESSAGE_PRIORITY_INTERACTIVE}</li>
         * <li>{@link android.telephony.SmsCbMessage#MESSAGE_PRIORITY_URGENT}</li>
         * <li>{@link android.telephony.SmsCbMessage#MESSAGE_PRIORITY_EMERGENCY}</li>
         * </p>
         * </ul>
         * <P>Type: INTEGER</P>
         */
        public static final String MESSAGE_PRIORITY = "priority";

        /**
         * ETWS warning type (ETWS alerts only).
         * ETWS (Earthquake and Tsunami Warning System) warning type (ETWS alerts only).
         * <p>See {@link android.telephony.SmsCbEtwsInfo}</p>
         * <P>Type: INTEGER</P>
         */
        public static final String ETWS_WARNING_TYPE = "etws_warning_type";

        /**
         * CMAS message class (CMAS alerts only).
         * CMAS (Commercial Mobile Alert System) message class (CMAS alerts only).
         * <p>See {@link android.telephony.SmsCbCmasInfo}</p>
         * <P>Type: INTEGER</P>
         */
        public static final String CMAS_MESSAGE_CLASS = "cmas_message_class";
@@ -4095,12 +4136,14 @@ public final class Telephony {
        /**
         * The timestamp in millisecond of when the device received the message.
         * <P>Type: BIGINT</P>
         * @hide
         */
        public static final String RECEIVED_TIME = "received_time";

        /**
         * Indicates that whether the message has been broadcasted to the application.
         * <P>Type: BOOLEAN</P>
         * @hide
         */
        public static final String MESSAGE_BROADCASTED = "message_broadcasted";

@@ -4136,12 +4179,15 @@ public final class Telephony {
         * "circle|0,0|100;polygon|0,0|0,1.5|1,1|1,0;circle|100.123,100|200.123"
         *
         * <P>Type: TEXT</P>
         * @hide
         */
        public static final String GEOMETRIES = "geometries";

        /**
         * Query columns for instantiating {@link android.telephony.CellBroadcastMessage} objects.
         * @hide
         */
        @NonNull
        public static final String[] QUERY_COLUMNS = {
                _ID,
                GEOGRAPHICAL_SCOPE,
@@ -4167,6 +4213,7 @@ public final class Telephony {

        /**
         * Query columns for instantiating {@link android.telephony.SmsCbMessage} objects.
         * @hide
         */
        public static final String[] QUERY_COLUMNS_FWK = {
                _ID,
+3 −2
Original line number Diff line number Diff line
@@ -369,15 +369,16 @@ public class ServiceState implements Parcelable {
    /**
     * Create a new ServiceState from a intent notifier Bundle
     *
     * This method is used by PhoneStateIntentReceiver and maybe by
     * This method is used by PhoneStateIntentReceiver, CellBroadcastReceiver, and maybe by
     * external applications.
     *
     * @param m Bundle from intent notifier
     * @return newly created ServiceState
     * @hide
     */
    @NonNull
    @UnsupportedAppUsage
    public static ServiceState newFromBundle(Bundle m) {
    public static ServiceState newFromBundle(@NonNull Bundle m) {
        ServiceState ret;
        ret = new ServiceState();
        ret.setFromNotifierBundle(m);
Loading