1/*
2 * Copyright (C) 2011 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
17package android.telephony;
18
19/**
20 * Constants used in SMS Cell Broadcast messages.
21 *
22 * {@hide}
23 */
24public interface SmsCbConstants {
25    /** Start of PWS Message Identifier range (includes ETWS and CMAS). */
26    public static final int MESSAGE_ID_PWS_FIRST_IDENTIFIER = 0x1100;
27
28    /** Bitmask for messages of ETWS type (including future extensions). */
29    public static final int MESSAGE_ID_ETWS_TYPE_MASK       = 0xFFF8;
30
31    /** Value for messages of ETWS type after applying {@link #MESSAGE_ID_ETWS_TYPE_MASK}. */
32    public static final int MESSAGE_ID_ETWS_TYPE            = 0x1100;
33
34    /** ETWS Message Identifier for earthquake warning message. */
35    public static final int MESSAGE_ID_ETWS_EARTHQUAKE_WARNING      = 0x1100;
36
37    /** ETWS Message Identifier for tsunami warning message. */
38    public static final int MESSAGE_ID_ETWS_TSUNAMI_WARNING         = 0x1101;
39
40    /** ETWS Message Identifier for earthquake and tsunami combined warning message. */
41    public static final int MESSAGE_ID_ETWS_EARTHQUAKE_AND_TSUNAMI_WARNING  = 0x1102;
42
43    /** ETWS Message Identifier for test message. */
44    public static final int MESSAGE_ID_ETWS_TEST_MESSAGE            = 0x1103;
45
46    /** ETWS Message Identifier for messages related to other emergency types. */
47    public static final int MESSAGE_ID_ETWS_OTHER_EMERGENCY_TYPE    = 0x1104;
48
49    /** Start of CMAS Message Identifier range. */
50    public static final int MESSAGE_ID_CMAS_FIRST_IDENTIFIER                = 0x1112;
51
52    /** CMAS Message Identifier for Presidential Level alerts. */
53    public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL        = 0x1112;
54
55    /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Observed. */
56    public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED = 0x1113;
57
58    /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Likely. */
59    public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY  = 0x1114;
60
61    /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Observed. */
62    public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED = 0x1115;
63
64    /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Likely. */
65    public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY   = 0x1116;
66
67    /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Observed. */
68    public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED = 0x1117;
69
70    /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Likely. */
71    public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY   = 0x1118;
72
73    /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Observed. */
74    public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED  = 0x1119;
75
76    /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Likely. */
77    public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY    = 0x111A;
78
79    /** CMAS Message Identifier for Child Abduction Emergency (Amber Alert). */
80    public static final int MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY = 0x111B;
81
82    /** CMAS Message Identifier for the Required Monthly Test. */
83    public static final int MESSAGE_ID_CMAS_ALERT_REQUIRED_MONTHLY_TEST     = 0x111C;
84
85    /** CMAS Message Identifier for CMAS Exercise. */
86    public static final int MESSAGE_ID_CMAS_ALERT_EXERCISE                  = 0x111D;
87
88    /** CMAS Message Identifier for operator defined use. */
89    public static final int MESSAGE_ID_CMAS_ALERT_OPERATOR_DEFINED_USE      = 0x111E;
90
91    /** End of CMAS Message Identifier range (including future extensions). */
92    public static final int MESSAGE_ID_CMAS_LAST_IDENTIFIER                 = 0x112F;
93
94    /** End of PWS Message Identifier range (includes ETWS, CMAS, and future extensions). */
95    public static final int MESSAGE_ID_PWS_LAST_IDENTIFIER                  = 0x18FF;
96
97    /** ETWS message code flag to activate the popup display. */
98    public static final int MESSAGE_CODE_ETWS_ACTIVATE_POPUP                = 0x100;
99
100    /** ETWS message code flag to activate the emergency user alert. */
101    public static final int MESSAGE_CODE_ETWS_EMERGENCY_USER_ALERT          = 0x200;
102
103    /** ETWS warning type value for earthquake. */
104    public static final int ETWS_WARNING_TYPE_EARTHQUAKE                    = 0x00;
105
106    /** ETWS warning type value for tsunami. */
107    public static final int ETWS_WARNING_TYPE_TSUNAMI                       = 0x01;
108
109    /** ETWS warning type value for earthquake and tsunami. */
110    public static final int ETWS_WARNING_TYPE_EARTHQUAKE_AND_TSUNAMI        = 0x02;
111
112    /** ETWS warning type value for test broadcast. */
113    public static final int ETWS_WARNING_TYPE_TEST                          = 0x03;
114
115    /** ETWS warning type value for other notifications. */
116    public static final int ETWS_WARNING_TYPE_OTHER                         = 0x04;
117}
118