diff options
author | Hyein Yu <hyeinyu@google.com> | 2022-11-14 02:34:38 +0000 |
---|---|---|
committer | Hyein Yu <hyeinyu@google.com> | 2022-12-16 05:29:54 +0000 |
commit | e462b634e6160c4214466b2b0ff2c16e2f97a7eb (patch) | |
tree | 86575002f3c8564db990cec90d3ccde5f157f18c | |
parent | 04b044770a4d92f34ef8e09bfaaf31f0804c7893 (diff) | |
download | CellBroadcastReceiver-e462b634e6160c4214466b2b0ff2c16e2f97a7eb.tar.gz |
Support Ukraine requirement
1) support National Alert(4370, 4383), Emergency Alert(4371, 4384)
2) Enable override_dnd config
Bug: 241899897
Bug: 241899447
Test: manual
Test: Test: atest com.android.cellbroadcastreceiver.compliancetests
Change-Id: I64849d73d159f44a328c75515c8377cae020e1cc
-rw-r--r-- | res/values-mcc255/config.xml | 39 | ||||
-rw-r--r-- | res/values-mcc255/strings.xml | 27 | ||||
-rw-r--r-- | tests/compliancetests/assets/emergency_alert_channels.json | 55 | ||||
-rw-r--r-- | tests/compliancetests/assets/emergency_alert_settings.json | 6 | ||||
-rw-r--r-- | tests/compliancetests/assets/region_plmn_list.json | 4 |
5 files changed, 131 insertions, 0 deletions
diff --git a/res/values-mcc255/config.xml b/res/values-mcc255/config.xml new file mode 100644 index 000000000..0cf8b5317 --- /dev/null +++ b/res/values-mcc255/config.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2022 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <!-- Play alert sound in full volume regardless Do Not Disturb is on --> + <bool name="override_dnd">true</bool> + <!-- Whether to show severe alert settings --> + <bool name="show_severe_alert_settings">false</bool> + <!-- Whether to show amber alert settings --> + <bool name="show_amber_alert_settings">false</bool> + <!-- Whether to show test settings --> + <bool name="show_test_settings">false</bool> + + <!-- 4370, 4383 --> + <string-array name="cmas_presidential_alerts_channels_range_strings" translatable="false"> + <item>0x1112:rat=gsm, emergency=true, always_on=true</item> + <!-- additional language --> + <item>0x111F:rat=gsm, emergency=true, filter_language=true, always_on=true</item> + </string-array> + + <!-- 4371, 4384 --> + <string-array name="cmas_alert_extreme_channels_range_strings" translatable="false"> + <item>0x1113:rat=gsm, emergency=true</item> + <!-- additional language --> + <item>0x1120:rat=gsm, emergency=true, filter_language=true</item> + </string-array> +</resources> diff --git a/res/values-mcc255/strings.xml b/res/values-mcc255/strings.xml new file mode 100644 index 000000000..e6da9b569 --- /dev/null +++ b/res/values-mcc255/strings.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright (C) 2022 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- CMAS dialog title for presidential level alert. [CHAR LIMIT=50] --> + <!-- Required Ukraine(uk) translation for this message: Національне сповіщення --> + <string name="cmas_presidential_level_alert">National Alert</string> + <!-- CMAS dialog title for extreme alert. [CHAR LIMIT=50] --> + <!-- Required Ukraine(uk) translation for this message: Екстрене сповіщення --> + <string name="cmas_extreme_alert">Emergency Alert</string> + <!-- Preference title for enable CMAS extreme threat alerts checkbox. [CHAR LIMIT=50] --> + <!-- Required Ukraine(uk) translation for this message: Екстрена оповістка --> + <string name="enable_cmas_extreme_threat_alerts_title">Emergency Alert</string> +</resources> diff --git a/tests/compliancetests/assets/emergency_alert_channels.json b/tests/compliancetests/assets/emergency_alert_channels.json index 1d7cc9bff..f9ccf2717 100644 --- a/tests/compliancetests/assets/emergency_alert_channels.json +++ b/tests/compliancetests/assets/emergency_alert_channels.json @@ -4962,6 +4962,61 @@ "toggle_avail": "true" } }, + "ukraine": { + "4352": { + "title": "", + "default_value": "true", + "toggle_avail": "false", + "end_channel": "4354" + }, + "4356": { + "title": "", + "default_value": "true", + "toggle_avail": "false" + }, + "4370": { + "title": "National Alert", + "default_value": "true", + "toggle_avail": "false" + }, + "4383": { + "title": "National Alert", + "default_value": "true", + "toggle_avail": "false" + }, + "4371": { + "title": "Emergency Alert", + "default_value": "true", + "toggle_avail": "true" + }, + "4384": { + "title": "Emergency Alert", + "default_value": "true", + "toggle_avail": "true" + }, + "4373": { + "title": "Emergency alert: Severe", + "default_value": "true", + "toggle_avail": "true", + "end_channel": "4378" + }, + "4386": { + "title": "Emergency alert: Severe", + "default_value": "true", + "toggle_avail": "true", + "end_channel": "4391" + }, + "4379": { + "title": "Child abduction (Amber alert)", + "default_value": "true", + "toggle_avail": "true" + }, + "4392": { + "title": "Child abduction (Amber alert)", + "default_value": "true", + "toggle_avail": "true" + } + }, "australia": { "4352": { "title": "", diff --git a/tests/compliancetests/assets/emergency_alert_settings.json b/tests/compliancetests/assets/emergency_alert_settings.json index c8f44b6b0..be6733d9d 100644 --- a/tests/compliancetests/assets/emergency_alert_settings.json +++ b/tests/compliancetests/assets/emergency_alert_settings.json @@ -726,6 +726,12 @@ "toggle_avail": "true" } }, + "ukraine": { + "Emergency Alert": { + "default_value": "true", + "toggle_avail": "true" + } + }, "australia": { "Extreme threats": { "default_value": "true", diff --git a/tests/compliancetests/assets/region_plmn_list.json b/tests/compliancetests/assets/region_plmn_list.json index d7a7d0240..9c9da63e6 100644 --- a/tests/compliancetests/assets/region_plmn_list.json +++ b/tests/compliancetests/assets/region_plmn_list.json @@ -172,6 +172,10 @@ "mccmnc": "310260", "imsi": "310260012345678" }, + "ukraine": { + "mccmnc": "25502", + "imsi": "255020123456789" + }, "venezuela": { "mccmnc": "73404", "imsi": "734040123456789" |