10825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville/* 20825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * Copyright (C) 2012 The Android Open Source Project 30825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * 40825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * Licensed under the Apache License, Version 2.0 (the "License"); 50825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * you may not use this file except in compliance with the License. 60825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * You may obtain a copy of the License at 70825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * 80825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * http://www.apache.org/licenses/LICENSE-2.0 90825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * 100825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * Unless required by applicable law or agreed to in writing, software 110825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * distributed under the License is distributed on an "AS IS" BASIS, 120825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * See the License for the specific language governing permissions and 140825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * limitations under the License. 150825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville */ 160825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 170825495a331bb44df395a0cdb79fab85e68db5d5Wink Savillepackage com.android.internal.telephony.gsm; 180825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 190825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville/** 200825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * Constants used in SMS Cell Broadcast messages (see 3GPP TS 23.041). This class is used by the 210825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * boot-time broadcast channel enable and database upgrade code in CellBroadcastReceiver, so it 220825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * is public, but should be avoided in favor of the radio technology independent constants in 230825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * {@link android.telephony.SmsCbMessage}, {@link android.telephony.SmsCbEtwsInfo}, and 240825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * {@link android.telephony.SmsCbCmasInfo} classes. 250825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * 260825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville * {@hide} 270825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville */ 280825495a331bb44df395a0cdb79fab85e68db5d5Wink Savillepublic class SmsCbConstants { 290825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 300825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** Private constructor for utility class. */ 310825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville private SmsCbConstants() { } 320825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 330825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** Start of PWS Message Identifier range (includes ETWS and CMAS). */ 340825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_PWS_FIRST_IDENTIFIER = 0x1100; 350825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 360825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** Bitmask for messages of ETWS type (including future extensions). */ 370825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_ETWS_TYPE_MASK = 0xFFF8; 380825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 390825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** Value for messages of ETWS type after applying {@link #MESSAGE_ID_ETWS_TYPE_MASK}. */ 400825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_ETWS_TYPE = 0x1100; 410825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 420825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS Message Identifier for earthquake warning message. */ 430825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_ETWS_EARTHQUAKE_WARNING = 0x1100; 440825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 450825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS Message Identifier for tsunami warning message. */ 460825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_ETWS_TSUNAMI_WARNING = 0x1101; 470825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 480825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS Message Identifier for earthquake and tsunami combined warning message. */ 490825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_ETWS_EARTHQUAKE_AND_TSUNAMI_WARNING = 0x1102; 500825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 510825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS Message Identifier for test message. */ 520825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_ETWS_TEST_MESSAGE = 0x1103; 530825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 540825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS Message Identifier for messages related to other emergency types. */ 550825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_ETWS_OTHER_EMERGENCY_TYPE = 0x1104; 560825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 570825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** Start of CMAS Message Identifier range. */ 580825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_FIRST_IDENTIFIER = 0x1112; 590825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 600825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Presidential Level alerts. */ 610825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_PRESIDENTIAL_LEVEL = 0x1112; 620825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 630825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Observed. */ 640825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_OBSERVED = 0x1113; 650825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 660825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Extreme alerts, Urgency=Immediate, Certainty=Likely. */ 670825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_IMMEDIATE_LIKELY = 0x1114; 680825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 690825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Observed. */ 700825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_OBSERVED = 0x1115; 710825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 720825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Extreme alerts, Urgency=Expected, Certainty=Likely. */ 730825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_EXTREME_EXPECTED_LIKELY = 0x1116; 740825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 750825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Observed. */ 760825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_OBSERVED = 0x1117; 770825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 780825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Severe alerts, Urgency=Immediate, Certainty=Likely. */ 790825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_IMMEDIATE_LIKELY = 0x1118; 800825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 810825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Observed. */ 820825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_OBSERVED = 0x1119; 830825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 840825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Severe alerts, Urgency=Expected, Certainty=Likely. */ 850825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_SEVERE_EXPECTED_LIKELY = 0x111A; 860825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 870825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for Child Abduction Emergency (Amber Alert). */ 880825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_CHILD_ABDUCTION_EMERGENCY = 0x111B; 890825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 900825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for the Required Monthly Test. */ 910825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_REQUIRED_MONTHLY_TEST = 0x111C; 920825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 930825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for CMAS Exercise. */ 940825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_EXERCISE = 0x111D; 950825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 960825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** CMAS Message Identifier for operator defined use. */ 970825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_ALERT_OPERATOR_DEFINED_USE = 0x111E; 980825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 990825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** End of CMAS Message Identifier range (including future extensions). */ 1000825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_CMAS_LAST_IDENTIFIER = 0x112F; 1010825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1020825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** End of PWS Message Identifier range (includes ETWS, CMAS, and future extensions). */ 1030825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int MESSAGE_ID_PWS_LAST_IDENTIFIER = 0x18FF; 1040825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1050825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS serial number flag to activate the popup display. */ 1060825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int SERIAL_NUMBER_ETWS_ACTIVATE_POPUP = 0x1000; 1070825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1080825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS serial number flag to activate the emergency user alert. */ 1090825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int SERIAL_NUMBER_ETWS_EMERGENCY_USER_ALERT = 0x2000; 1100825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1110825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS warning type value for earthquake. */ 1120825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int ETWS_WARNING_TYPE_EARTHQUAKE = 0x00; 1130825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1140825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS warning type value for tsunami. */ 1150825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int ETWS_WARNING_TYPE_TSUNAMI = 0x01; 1160825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1170825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS warning type value for earthquake and tsunami. */ 1180825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int ETWS_WARNING_TYPE_EARTHQUAKE_AND_TSUNAMI = 0x02; 1190825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1200825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS warning type value for test broadcast. */ 1210825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int ETWS_WARNING_TYPE_TEST = 0x03; 1220825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville 1230825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville /** ETWS warning type value for other notifications. */ 1240825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville public static final int ETWS_WARNING_TYPE_OTHER = 0x04; 1250825495a331bb44df395a0cdb79fab85e68db5d5Wink Saville} 126