diff options
author | Victor Chang <vichang@google.com> | 2016-01-25 18:16:08 +0000 |
---|---|---|
committer | Victor Chang <vichang@google.com> | 2016-02-01 20:41:49 +0000 |
commit | 55b160e5375a5b9824a250c95ce8267fce9ec894 (patch) | |
tree | 93077c3df9eb602585c1e055d2e8c23e20b42c14 | |
parent | 88bbc3e5ccc78fe36a573f377e07c1fd37934421 (diff) |
Don't print phone number into Android log
Use Log.pii to hash pii
BUG=26635632
Change-Id: I3c03ec2347e251696f6c0c78f8b39d6e34b6afcc
-rw-r--r-- | src/com/android/dialer/util/PhoneNumberUtil.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/dialer/util/PhoneNumberUtil.java b/src/com/android/dialer/util/PhoneNumberUtil.java index 26998037d..33f987359 100644 --- a/src/com/android/dialer/util/PhoneNumberUtil.java +++ b/src/com/android/dialer/util/PhoneNumberUtil.java @@ -100,7 +100,7 @@ public class PhoneNumberUtil { * @see com.android.i18n.phonenumbers.PhoneNumberOfflineGeocoder */ public static String getGeoDescription(Context context, String number) { - Log.v(TAG, "getGeoDescription('" + number + "')..."); + Log.v(TAG, "getGeoDescription('" + pii(number) + "')..."); if (TextUtils.isEmpty(number)) { return null; @@ -114,13 +114,13 @@ public class PhoneNumberUtil { String countryIso = TelephonyManagerUtils.getCurrentCountryIso(context, locale); Phonenumber.PhoneNumber pn = null; try { - Log.v(TAG, "parsing '" + number + Log.v(TAG, "parsing '" + pii(number) + "' for countryIso '" + countryIso + "'..."); pn = util.parse(number, countryIso); - Log.v(TAG, "- parsed number: " + pn); + Log.v(TAG, "- parsed number: " + pii(pn)); } catch (NumberParseException e) { Log.v(TAG, "getGeoDescription: NumberParseException for incoming number '" + - number + "'"); + pii(number) + "'"); } if (pn != null) { @@ -131,4 +131,8 @@ public class PhoneNumberUtil { return null; } + + private static String pii(Object pii) { + return com.android.incallui.Log.pii(pii); + } } |