From 51c7daaa75eebd5777272f822ee0d81db6e1d9ec Mon Sep 17 00:00:00 2001 From: Hall Liu Date: Fri, 3 Aug 2018 18:25:24 -0700 Subject: [PATCH] Don't insert certain numbers into the call log For regulatory requirements, prevent certain sensitive numbers from being logged in the call log. The numbers can either be specified in the carrier config or in the mcc config for the device. Bug: 111470439 Test: unit, manual Change-Id: Icc4db12def802c2ce5485422a0ec199e3e7452fa Merged-In: Icc4db12def802c2ce5485422a0ec199e3e7452fa --- core/res/res/values-mcc214/config.xml | 28 +++++++++++++++++++ core/res/res/values/config.xml | 3 ++ core/res/res/values/symbols.xml | 1 + .../telephony/CarrierConfigManager.java | 8 ++++++ 4 files changed, 40 insertions(+) create mode 100644 core/res/res/values-mcc214/config.xml diff --git a/core/res/res/values-mcc214/config.xml b/core/res/res/values-mcc214/config.xml new file mode 100644 index 0000000000000..941084865beb8 --- /dev/null +++ b/core/res/res/values-mcc214/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 016 + + diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 9d366942aa1b1..8be4aa9608cb7 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2706,6 +2706,9 @@ empty string is passed in --> + + + false diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 65606e31387a1..2305e317ebc73 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2233,6 +2233,7 @@ + diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 55fb7e3a39611..d7376691dd66a 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -200,6 +200,13 @@ public class CarrierConfigManager { public static final String KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool"; + /** + * A string array containing numbers that shouldn't be included in the call log. + * @hide + */ + public static final String KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY = + "unloggable_numbers_string_array"; + /** If true, removes the Voice Privacy option from Call Settings */ public static final String KEY_VOICE_PRIVACY_DISABLE_UI_BOOL = "voice_privacy_disable_ui_bool"; @@ -2008,6 +2015,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_AUTO_RETRY_FAILED_WIFI_EMERGENCY_CALL, false); sDefaults.putBoolean(KEY_ADDITIONAL_CALL_SETTING_BOOL, true); sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL, false); + sDefaults.putStringArray(KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY, null); sDefaults.putBoolean(KEY_ALLOW_LOCAL_DTMF_TONES_BOOL, true); sDefaults.putBoolean(KEY_PLAY_CALL_RECORDING_TONE_BOOL, false); sDefaults.putBoolean(KEY_APN_EXPAND_BOOL, true);