summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Kundra <deepakkundra@gmail.com>2016-05-25 03:55:51 (GMT)
committerDeepak Kundra <deepakkundra@gmail.com>2016-05-25 03:57:40 (GMT)
commit89bcf563ca183275db1249ef14a0ac59f958a4e9 (patch)
treef443c458c824ccb72ece3c8d6eac0f75d9fb7677
parent25e7ce5b1aa7cb4ed0ade99c99f7e0ef77207830 (diff)
downloadandroid_packages_apps_CellBroadcastReceiver-89bcf563ca183275db1249ef14a0ac59f958a4e9.zip
android_packages_apps_CellBroadcastReceiver-89bcf563ca183275db1249ef14a0ac59f958a4e9.tar.gz
android_packages_apps_CellBroadcastReceiver-89bcf563ca183275db1249ef14a0ac59f958a4e9.tar.bz2
Enable broadcast channels for Colombia
Issue-id:FEIJ-585 Change-Id: I624c4021d28dbc6f1d12820418cfdfe9032d5570
-rw-r--r--res/values/config.xml2
-rw-r--r--src/com/android/cellbroadcastreceiver/CellBroadcastConfigService.java7
2 files changed, 9 insertions, 0 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
index 6325095..80bb7f0 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -23,4 +23,6 @@
<bool name="show_brazil_settings">false</bool>
<!-- Whether to use the sound duration settings for CMAS -->
<bool name="use_sound_duration">false</bool>
+ <!-- Whether to enable broadcast channels for Colombia -->
+ <bool name="enable_colombia_channels">false</bool>
</resources>
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastConfigService.java b/src/com/android/cellbroadcastreceiver/CellBroadcastConfigService.java
index 88e5c74..ca31b7a 100644
--- a/src/com/android/cellbroadcastreceiver/CellBroadcastConfigService.java
+++ b/src/com/android/cellbroadcastreceiver/CellBroadcastConfigService.java
@@ -356,6 +356,13 @@ public class CellBroadcastConfigService extends IntentService {
SmsManager.CELL_BROADCAST_RAN_TYPE_GSM);
}
+ if(this.getResources().getBoolean(R.bool.enable_colombia_channels) == true) {
+ if (DBG) log("enabling channels 437, 919, 921");
+ manager.enableCellBroadcast(437, SmsManager.CELL_BROADCAST_RAN_TYPE_GSM);
+ manager.enableCellBroadcast(919, SmsManager.CELL_BROADCAST_RAN_TYPE_GSM);
+ manager.enableCellBroadcast(921, SmsManager.CELL_BROADCAST_RAN_TYPE_GSM);
+ }
+
// Disable per user preference/checkbox.
// This takes care of the case where enableEmergencyAlerts is true,
// but check box is unchecked to receive such as cmas severe alerts.