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     /** Channel 50 required by Brazil. ID 0~999 is allocated by GSMA */
     34     public static final int MESSAGE_ID_GSMA_ALLOCATED_CHANNEL_50
     35             = 0x0032;
     36 
     37     /** Channel 911 required by Taiwan NCC. ID 0~999 is allocated by GSMA */
     38     public static final int MESSAGE_ID_GSMA_ALLOCATED_CHANNEL_911
     39             = 0x038F; // 911
     40 
     41     /** Channel 919 required by Taiwan NCC and Israel. ID 0~999 is allocated by GSMA */
     42     public static final int MESSAGE_ID_GSMA_ALLOCATED_CHANNEL_919
     43             = 0x0397; // 919
     44 
     45     /** Channel 928 required by Israel. ID 0~999 is allocated by GSMA */
     46     public static final int MESSAGE_ID_GSMA_ALLOCATED_CHANNEL_928
     47             = 0x03A0; // 928
     48 
     49     /** Start of PWS Message Identifier range (includes ETWS and CMAS). */
     50     public static final int MESSAGE_ID_PWS_FIRST_IDENTIFIER
     51             = 0x1100; // 4352
     52 
     53     /** Bitmask for messages of ETWS type (including future extensions). */
     54     public static final int MESSAGE_ID_ETWS_TYPE_MASK
     55             = 0xFFF8;
     56 
     57     /** Value for messages of ETWS type after applying {@link #MESSAGE_ID_ETWS_TYPE_MASK}. */
     58     public static final int MESSAGE_ID_ETWS_TYPE
     59             = 0x1100; // 4352
     60 
     61     /** ETWS Message Identifier for earthquake warning message. */
     62     public static final int MESSAGE_ID_ETWS_EARTHQUAKE_WARNING
     63             = 0x1100; // 4352
     64 
     65     /** ETWS Message Identifier for tsunami warning message. */
     66     public static final int MESSAGE_ID_ETWS_TSUNAMI_WARNING
     67             = 0x1101; // 4353
     68 
     69     /** ETWS Message Identifier for earthquake and tsunami combined warning message. */
     70     public static final int MESSAGE_ID_ETWS_EARTHQUAKE_AND_TSUNAMI_WARNING
     71             = 0x1102; // 4354
     72 
     73     /** ETWS Message Identifier for test message. */
     74     public static final int MESSAGE_ID_ETWS_TEST_MESSAGE
     75             = 0x1103; // 4355
     76 
     77     /** ETWS Message Identifier for messages related to other emergency types. */
     78     public static final int MESSAGE_ID_ETWS_OTHER_EMERGENCY_TYPE
     79             = 0x1104; // 4356
     80 
     81     /** Start of CMAS Message Identifier range. */
     82     public static final int MESSAGE_ID_CMAS_FIRST_IDENTIFIER
     83             = 0x1112; // 4370
     84 
     85     /** CMAS Message Identifier for Presidential Level alerts. */
     86     public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL
     87             = 0x1112; // 4370
     88 
     89     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Observed. */
     90     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED
     91             = 0x1113; // 4371
     92 
     93     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Likely. */
     94     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY
     95             = 0x1114; // 4372
     96 
     97     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Observed. */
     98     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED
     99             = 0x1115; // 4373
    100 
    101     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Likely. */
    102     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY
    103             = 0x1116; // 4374
    104 
    105     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Observed. */
    106     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED
    107             = 0x1117; // 4375
    108 
    109     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Likely. */
    110     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY
    111             = 0x1118; // 4376
    112 
    113     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Observed. */
    114     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED
    115             = 0x1119; // 4377
    116 
    117     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Likely. */
    118     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY
    119             = 0x111A; // 4378
    120 
    121     /** CMAS Message Identifier for Child Abduction Emergency (Amber Alert). */
    122     public static final int MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY
    123             = 0x111B; // 4379
    124 
    125     /** CMAS Message Identifier for the Required Monthly Test. */
    126     public static final int MESSAGE_ID_CMAS_ALERT_REQUIRED_MONTHLY_TEST
    127             = 0x111C; // 4380
    128 
    129     /** CMAS Message Identifier for CMAS Exercise. */
    130     public static final int MESSAGE_ID_CMAS_ALERT_EXERCISE
    131             = 0x111D; // 4381
    132 
    133     /** CMAS Message Identifier for operator defined use. */
    134     public static final int MESSAGE_ID_CMAS_ALERT_OPERATOR_DEFINED_USE
    135             = 0x111E; // 4382
    136 
    137     /** CMAS Message Identifier for Presidential Level alerts for additional languages
    138      *  for additional languages. */
    139     public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL_LANGUAGE
    140             = 0x111F; // 4383
    141 
    142     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Observed
    143      *  for additional languages. */
    144     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED_LANGUAGE
    145             = 0x1120; // 4384
    146 
    147     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Likely
    148      *  for additional languages. */
    149     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY_LANGUAGE
    150             = 0x1121; // 4385
    151 
    152     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Observed
    153      *  for additional languages. */
    154     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED_LANGUAGE
    155             = 0x1122; // 4386
    156 
    157     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Likely
    158      *  for additional languages. */
    159     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY_LANGUAGE
    160             = 0x1123; // 4387
    161 
    162     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Observed
    163      *  for additional languages. */
    164     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED_LANGUAGE
    165             = 0x1124; // 4388
    166 
    167     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Likely
    168      *  for additional languages.*/
    169     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY_LANGUAGE
    170             = 0x1125; // 4389
    171 
    172     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Observed
    173      *  for additional languages. */
    174     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED_LANGUAGE
    175             = 0x1126; // 4390
    176 
    177     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Likely
    178      *  for additional languages.*/
    179     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY_LANGUAGE
    180             = 0x1127; // 4391
    181 
    182     /** CMAS Message Identifier for Child Abduction Emergency (Amber Alert)
    183      *  for additional languages. */
    184     public static final int MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY_LANGUAGE
    185             = 0x1128; // 4392
    186 
    187     /** CMAS Message Identifier for the Required Monthly Test
    188      *  for additional languages. */
    189     public static final int MESSAGE_ID_CMAS_ALERT_REQUIRED_MONTHLY_TEST_LANGUAGE
    190             = 0x1129; // 4393
    191 
    192     /** CMAS Message Identifier for CMAS Exercise
    193      *  for additional languages. */
    194     public static final int MESSAGE_ID_CMAS_ALERT_EXERCISE_LANGUAGE
    195             = 0x112A; // 4394
    196 
    197     /** CMAS Message Identifier for operator defined use
    198      *  for additional languages. */
    199     public static final int MESSAGE_ID_CMAS_ALERT_OPERATOR_DEFINED_USE_LANGUAGE
    200             = 0x112B; // 4395
    201 
    202     /** End of CMAS Message Identifier range (including future extensions). */
    203     public static final int MESSAGE_ID_CMAS_LAST_IDENTIFIER
    204             = 0x112F; // 4399
    205 
    206     /** End of PWS Message Identifier range (includes ETWS, CMAS, and future extensions). */
    207     public static final int MESSAGE_ID_PWS_LAST_IDENTIFIER
    208             = 0x18FF; // 6399
    209 
    210     /** ETWS serial number flag to activate the popup display. */
    211     public static final int SERIAL_NUMBER_ETWS_ACTIVATE_POPUP
    212             = 0x1000; // 4096
    213 
    214     /** ETWS serial number flag to activate the emergency user alert. */
    215     public static final int SERIAL_NUMBER_ETWS_EMERGENCY_USER_ALERT
    216             = 0x2000; // 8192
    217 }
    218