integrate config_disable_all_cb_messages to settings
In R we introduced a new config (also part of GMS requirement) mainly for disable emergency alerts on devices which does not support messaging or voices e.g, data only tablets. If the config is set to true, framework should not forward any messages to users and hide emergency alert from settings menu as well. Bug: 176557108 Test: Manual Change-Id: I2705839255a8450aa80a1a503a973207fd895a33
This commit is contained in:
@@ -86,7 +86,11 @@ public class EmergencyBroadcastPreferenceController extends AbstractPreferenceCo
|
|||||||
private boolean isCellBroadcastAppLinkEnabled() {
|
private boolean isCellBroadcastAppLinkEnabled() {
|
||||||
// Enable link to CMAS app settings depending on the value in config.xml.
|
// Enable link to CMAS app settings depending on the value in config.xml.
|
||||||
boolean enabled = mContext.getResources().getBoolean(
|
boolean enabled = mContext.getResources().getBoolean(
|
||||||
com.android.internal.R.bool.config_cellBroadcastAppLinks);
|
com.android.internal.R.bool.config_cellBroadcastAppLinks) &&
|
||||||
|
// For data-only tablet devices which need to not forwarding any WEA-alert and hide from
|
||||||
|
// settings menu.
|
||||||
|
!mContext.getResources().getBoolean(
|
||||||
|
com.android.internal.R.bool.config_disable_all_cb_messages);
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
try {
|
try {
|
||||||
String packageName = CellBroadcastUtils
|
String packageName = CellBroadcastUtils
|
||||||
|
Reference in New Issue
Block a user