From 93d77b633e7888b425443f544b2732485adee45e Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 31 Aug 2011 17:03:21 -0700 Subject: Don't log PII when launching intents with "sms:" or "sip:" URIs We were already redacting phone numbers from "tel:" and "smsto:" URIs. Now, do that for "sms:" and "sip:" too, since those schemes are equally likely to contain PII in the scheme-specific part. TESTED: Received incoming call; selected "Respond via SMS" -> "Custom message"; confirmed no PII in the system log. Bug: 5244735 Change-Id: If2444c8901249aac9fd8e6b809d6da01db2e27c1 --- core/java/android/content/Intent.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 8d6cee1..c7698bf 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -5627,6 +5627,10 @@ public class Intent implements Parcelable, Cloneable { if (scheme != null) { if (scheme.equalsIgnoreCase("tel")) { b.append("tel:xxx-xxx-xxxx"); + } else if (scheme.equalsIgnoreCase("sip")) { + b.append("sip:xxxxxxxxxx"); + } else if (scheme.equalsIgnoreCase("sms")) { + b.append("sms:xxx-xxx-xxxx"); } else if (scheme.equalsIgnoreCase("smsto")) { b.append("smsto:xxx-xxx-xxxx"); } else { -- cgit v1.1