Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34eae091 authored by Chen Xu's avatar Chen Xu
Browse files

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
parent c96c5c68
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -86,7 +86,11 @@ public class EmergencyBroadcastPreferenceController extends AbstractPreferenceCo
    private boolean isCellBroadcastAppLinkEnabled() {
        // Enable link to CMAS app settings depending on the value in config.xml.
        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) {
            try {
                String packageName = CellBroadcastUtils