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 = 0x1100;
     35 
     36     /** Bitmask for messages of ETWS type (including future extensions). */
     37     public static final int MESSAGE_ID_ETWS_TYPE_MASK       = 0xFFF8;
     38 
     39     /** Value for messages of ETWS type after applying {@link #MESSAGE_ID_ETWS_TYPE_MASK}. */
     40     public static final int MESSAGE_ID_ETWS_TYPE            = 0x1100;
     41 
     42     /** ETWS Message Identifier for earthquake warning message. */
     43     public static final int MESSAGE_ID_ETWS_EARTHQUAKE_WARNING      = 0x1100;
     44 
     45     /** ETWS Message Identifier for tsunami warning message. */
     46     public static final int MESSAGE_ID_ETWS_TSUNAMI_WARNING         = 0x1101;
     47 
     48     /** ETWS Message Identifier for earthquake and tsunami combined warning message. */
     49     public static final int MESSAGE_ID_ETWS_EARTHQUAKE_AND_TSUNAMI_WARNING  = 0x1102;
     50 
     51     /** ETWS Message Identifier for test message. */
     52     public static final int MESSAGE_ID_ETWS_TEST_MESSAGE            = 0x1103;
     53 
     54     /** ETWS Message Identifier for messages related to other emergency types. */
     55     public static final int MESSAGE_ID_ETWS_OTHER_EMERGENCY_TYPE    = 0x1104;
     56 
     57     /** Start of CMAS Message Identifier range. */
     58     public static final int MESSAGE_ID_CMAS_FIRST_IDENTIFIER                = 0x1112;
     59 
     60     /** CMAS Message Identifier for Presidential Level alerts. */
     61     public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL        = 0x1112;
     62 
     63     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Observed. */
     64     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED = 0x1113;
     65 
     66     /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Likely. */
     67     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY  = 0x1114;
     68 
     69     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Observed. */
     70     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED = 0x1115;
     71 
     72     /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Likely. */
     73     public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY   = 0x1116;
     74 
     75     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Observed. */
     76     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED = 0x1117;
     77 
     78     /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Likely. */
     79     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY   = 0x1118;
     80 
     81     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Observed. */
     82     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED  = 0x1119;
     83 
     84     /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Likely. */
     85     public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY    = 0x111A;
     86 
     87     /** CMAS Message Identifier for Child Abduction Emergency (Amber Alert). */
     88     public static final int MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY = 0x111B;
     89 
     90     /** CMAS Message Identifier for the Required Monthly Test. */
     91     public static final int MESSAGE_ID_CMAS_ALERT_REQUIRED_MONTHLY_TEST     = 0x111C;
     92 
     93     /** CMAS Message Identifier for CMAS Exercise. */
     94     public static final int MESSAGE_ID_CMAS_ALERT_EXERCISE                  = 0x111D;
     95 
     96     /** CMAS Message Identifier for operator defined use. */
     97     public static final int MESSAGE_ID_CMAS_ALERT_OPERATOR_DEFINED_USE      = 0x111E;
     98 
     99     /** CMAS Message Identifier for Presidential Level alerts for Additional Languages. */
    100     public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL_LANGUAGE = 0x111F;
    101 
    102     /** End of CMAS Message Identifier range (including future extensions). */
    103     public static final int MESSAGE_ID_CMAS_LAST_IDENTIFIER                 = 0x112F;
    104 
    105     /** End of PWS Message Identifier range (includes ETWS, CMAS, and future extensions). */
    106     public static final int MESSAGE_ID_PWS_LAST_IDENTIFIER                  = 0x18FF;
    107 
    108     /** ETWS serial number flag to activate the popup display. */
    109     public static final int SERIAL_NUMBER_ETWS_ACTIVATE_POPUP                = 0x1000;
    110 
    111     /** ETWS serial number flag to activate the emergency user alert. */
    112     public static final int SERIAL_NUMBER_ETWS_EMERGENCY_USER_ALERT          = 0x2000;
    113 
    114     /** ETWS warning type value for earthquake. */
    115     public static final int ETWS_WARNING_TYPE_EARTHQUAKE                    = 0x00;
    116 
    117     /** ETWS warning type value for tsunami. */
    118     public static final int ETWS_WARNING_TYPE_TSUNAMI                       = 0x01;
    119 
    120     /** ETWS warning type value for earthquake and tsunami. */
    121     public static final int ETWS_WARNING_TYPE_EARTHQUAKE_AND_TSUNAMI        = 0x02;
    122 
    123     /** ETWS warning type value for test broadcast. */
    124     public static final int ETWS_WARNING_TYPE_TEST                          = 0x03;
    125 
    126     /** ETWS warning type value for other notifications. */
    127     public static final int ETWS_WARNING_TYPE_OTHER                         = 0x04;
    128 }
    129