From 638d11e0bb0be1a290297de78c6b7ac18c04ff32 Mon Sep 17 00:00:00 2001 From: Kikkawa Shohei Date: Fri, 21 Sep 2018 17:06:07 +0900 Subject: [PATCH] Show "Call Blocking disabled" notification always when emergency call Currently "Call Blocking disabled" notification is shown only when any setting of "Enhanced Blocked number" is enabled, and it's not shown even if only "blocked number" is enabled. This patch adds new CarrierConfig key to show "Call Blocking disabled" notification always when "Enhanced Blocked number" is enabled and making emergency call. Test: manual - Verified behavior about Block numbers settings Test: auto - Passed BlockedNumberProviderTest Bug: 115697577 Change-Id: I2281c21992928037ea38227b7476adc76b6755e8 --- api/current.txt | 1 + .../java/android/telephony/CarrierConfigManager.java | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/api/current.txt b/api/current.txt index aeb1b73db1f7c..68cb09f487f00 100755 --- a/api/current.txt +++ b/api/current.txt @@ -41989,6 +41989,7 @@ package android.telephony { field public static final deprecated java.lang.String KEY_RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION_BOOL = "restart_radio_on_pdp_fail_regular_deactivation_bool"; field public static final java.lang.String KEY_RTT_SUPPORTED_BOOL = "rtt_supported_bool"; field public static final java.lang.String KEY_SHOW_APN_SETTING_CDMA_BOOL = "show_apn_setting_cdma_bool"; + field public static final java.lang.String KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL = "show_call_blocking_disabled_notification_always_bool"; field public static final java.lang.String KEY_SHOW_CDMA_CHOICES_BOOL = "show_cdma_choices_bool"; field public static final java.lang.String KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL = "show_iccid_in_sim_status_bool"; field public static final java.lang.String KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL = "show_onscreen_dial_button_bool"; diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 2d1b6adc81266..d8743bcfd21d9 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2116,6 +2116,16 @@ public class CarrierConfigManager { public static final String KEY_CALL_REDIRECTION_SERVICE_COMPONENT_NAME_STRING = "call_redirection_service_component_name_string"; + /** + * Flag specifying whether to show notification(call blocking disabled) when Enhanced Call + * Blocking(KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL) is enabled and making emergency call. + * When true, notification is shown always. + * When false, notification is shown only when any setting of "Enhanced Blocked number" is + * enabled. + */ + public static final String KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL = + "show_call_blocking_disabled_notification_always_bool"; + /** The default value for every variable. */ private final static PersistableBundle sDefaults; @@ -2454,6 +2464,7 @@ public class CarrierConfigManager { }); sDefaults.putString(KEY_WCDMA_DEFAULT_SIGNAL_STRENGTH_MEASUREMENT_STRING, ""); sDefaults.putBoolean(KEY_CONFIG_SHOW_ORIG_DIAL_STRING_FOR_CDMA_BOOL, false); + sDefaults.putBoolean(KEY_SHOW_CALL_BLOCKING_DISABLED_NOTIFICATION_ALWAYS_BOOL, false); } /**