Home | History | Annotate | Download | only in gsm
      1 /*
      2  * Copyright (C) 2012 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.internal.telephony.gsm;
     18 
     19 /**
     20  * Constants used in SMS Cell Broadcast messages (see 3GPP TS 23.041). This class is used by the
     21  * boot-time broadcast channel enable and database upgrade code in CellBroadcastReceiver, so it
     22  * is public, but should be avoided in favor of the radio technology independent constants in
     23  * {@link android.telephony.SmsCbMessage}, {@link android.telephony.SmsCbEtwsInfo}, and
     24  * {@link android.telephony.SmsCbCmasInfo} classes.
     25  *
     26  * {@hide}
     27  */
     28 public class SmsCbConstants {
     29 
     30     /** Private constructor for utility class. */
     31     private SmsCbConstants() { }
     32 
     33     /** Start of PWS Message Identifier range (includes ETWS and CMAS). */
     34     public static final int MESSAGE_ID_PWS_FIRST_IDENTIFIER
     35             = 0x1100; // 4352
     36 
     37     /** Bitmask for messages of ETWS type (including future extensions). */
     38     public static final int MESSAGE_ID_ETWS_TYPE_MASK
     39             = 0xFFF8;
     40 
     41     /** Value for messages of ETWS type after applying {@link #MESSAGE_ID_ETWS_TYPE_MASK}. */
     42     public static final int MESSAGE_ID_ETWS_TYPE
     43             = 0x1100; // 4352
     44 
     45     /** ETWS Message Identifier for earthquake warning message. */
     46     public static final int MESSAGE_ID_ETWS_EARTHQUAKE_WARNING
     47             = 0x1100; // 4352
     48 
     49     /** ETWS Message Identifier for tsunami warning message. */
     50     public static final int MESSAGE_ID_ETWS_TSUNAMI_WARNING
     51             = 0x1101; // 4353
     52 
     53     /** ETWS Message Identifier for earthquake and tsunami combined warning message. */
     54     public static final int MESSAGE_ID_ETWS_EARTHQUAKE_AND_TSUNAMI_WARNING
     55             = 0x1102; // 4354
     56 
     57     /** ETWS Message Identifier for test message. */
     58     public static final int MESSAGE_ID_ETWS_TEST_MESSAGE
     59             = 0x1103; // 4355
     60 
     61     /** ETWS Message Identifier for messages related to other emergency types. */
     62     public static final int MESSAGE_ID_ETWS_OTHER_EMERGENCY_TYPE
     63             = 0x1104; // 4356
     64 
     65     /** Start of CMAS Message Identifier range. */
     66     public static final int MESSAGE_ID_CMAS_FIRST_IDENTIFIER
     67             = 0x1112; // 4370
     68 
     69     /** CMAS Message Identifier for Presidential Level alerts. */
     70     public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL
     71             = 0x1112; // 4370
     72 
     73     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Observed. */
     74     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED
     75             = 0x1113; // 4371
     76 
     77     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Likely. */
     78     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY
     79             = 0x1114; // 4372
     80 
     81     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Observed. */
     82     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED
     83             = 0x1115; // 4373
     84 
     85     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Likely. */
     86     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY
     87             = 0x1116; // 4374
     88 
     89     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Observed. */
     90     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED
     91             = 0x1117; // 4375
     92 
     93     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Likely. */
     94     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY
     95             = 0x1118; // 4376
     96 
     97     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Observed. */
     98     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED
     99             = 0x1119; // 4377
    100 
    101     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Likely. */
    102     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY
    103             = 0x111A; // 4378
    104 
    105     /** CMAS Message Identifier for Child Abduction Emergency (Amber Alert). */
    106     public static final int MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY
    107             = 0x111B; // 4379
    108 
    109     /** CMAS Message Identifier for the Required Monthly Test. */
    110     public static final int MESSAGE_ID_CMAS_ALERT_REQUIRED_MONTHLY_TEST
    111             = 0x111C; // 4380
    112 
    113     /** CMAS Message Identifier for CMAS Exercise. */
    114     public static final int MESSAGE_ID_CMAS_ALERT_EXERCISE
    115             = 0x111D; // 4381
    116 
    117     /** CMAS Message Identifier for operator defined use. */
    118     public static final int MESSAGE_ID_CMAS_ALERT_OPERATOR_DEFINED_USE
    119             = 0x111E; // 4382
    120 
    121     /** CMAS Message Identifier for Presidential Level alerts for additional languages
    122      *  for additional languages. */
    123     public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL_LANGUAGE
    124             = 0x111F; // 4383
    125 
    126     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Observed
    127      *  for additional languages. */
    128     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED_LANGUAGE
    129             = 0x1120; // 4384
    130 
    131     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Likely
    132      *  for additional languages. */
    133     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY_LANGUAGE
    134             = 0x1121; // 4385
    135 
    136     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Observed
    137      *  for additional languages. */
    138     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED_LANGUAGE
    139             = 0x1122; // 4386
    140 
    141     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Likely
    142      *  for additional languages. */
    143     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY_LANGUAGE
    144             = 0x1123; // 4387
    145 
    146     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Observed
    147      *  for additional languages. */
    148     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED_LANGUAGE
    149             = 0x1124; // 4388
    150 
    151     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Likely
    152      *  for additional languages.*/
    153     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY_LANGUAGE
    154             = 0x1125; // 4389
    155 
    156     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Observed
    157      *  for additional languages. */
    158     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED_LANGUAGE
    159             = 0x1126; // 4390
    160 
    161     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Likely
    162      *  for additional languages.*/
    163     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY_LANGUAGE
    164             = 0x1127; // 4391
    165 
    166     /** CMAS Message Identifier for Child Abduction Emergency (Amber Alert)
    167      *  for additional languages. */
    168     public static final int MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY_LANGUAGE
    169             = 0x1128; // 4392
    170 
    171     /** CMAS Message Identifier for the Required Monthly Test
    172      *  for additional languages. */
    173     public static final int MESSAGE_ID_CMAS_ALERT_REQUIRED_MONTHLY_TEST_LANGUAGE
    174             = 0x1129; // 4393
    175 
    176     /** CMAS Message Identifier for CMAS Exercise
    177      *  for additional languages. */
    178     public static final int MESSAGE_ID_CMAS_ALERT_EXERCISE_LANGUAGE
    179             = 0x112A; // 4394
    180 
    181     /** CMAS Message Identifier for operator defined use
    182      *  for additional languages. */
    183     public static final int MESSAGE_ID_CMAS_ALERT_OPERATOR_DEFINED_USE_LANGUAGE
    184             = 0x112B; // 4395
    185 
    186     /** End of CMAS Message Identifier range (including future extensions). */
    187     public static final int MESSAGE_ID_CMAS_LAST_IDENTIFIER
    188             = 0x112F; // 4399
    189 
    190     /** End of PWS Message Identifier range (includes ETWS, CMAS, and future extensions). */
    191     public static final int MESSAGE_ID_PWS_LAST_IDENTIFIER
    192             = 0x18FF; // 6399
    193 
    194     /** ETWS serial number flag to activate the popup display. */
    195     public static final int SERIAL_NUMBER_ETWS_ACTIVATE_POPUP
    196             = 0x1000; // 4096
    197 
    198     /** ETWS serial number flag to activate the emergency user alert. */
    199     public static final int SERIAL_NUMBER_ETWS_EMERGENCY_USER_ALERT
    200             = 0x2000; // 8192
    201 }
    202