summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorDavid Brown <dab@google.com>2010-11-30 15:31:15 -0800
committerDavid Brown <dab@google.com>2010-11-30 15:49:48 -0800
commit04639ba0a939988d00131e61458807dac650f9c3 (patch)
tree3b3748f0544c3dd956989f70e24437cc1416f04c /telephony/java
parentb483d5cd134cda393824fd8e9c1a5443bd868ae6 (diff)
downloadframeworks_base-04639ba0a939988d00131e61458807dac650f9c3.zip
frameworks_base-04639ba0a939988d00131e61458807dac650f9c3.tar.gz
frameworks_base-04639ba0a939988d00131e61458807dac650f9c3.tar.bz2
Reduce the outrageous verbosity of CallerInfo.toString().
Bug: 3121292 Change-Id: Ia8383891ef29a003acbd627b25ce87a187ef95c0
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/com/android/internal/telephony/CallerInfo.java57
1 files changed, 35 insertions, 22 deletions
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java
index e4d7943..857d105 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfo.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfo.java
@@ -469,27 +469,40 @@ public class CallerInfo {
* @return a string debug representation of this instance.
*/
public String toString() {
- return new StringBuilder(384)
- .append("\nname: " + /*name*/ "nnnnnn")
- .append("\nphoneNumber: " + /*phoneNumber*/ "xxxxxxx")
- .append("\ncnapName: " + cnapName)
- .append("\nnumberPresentation: " + numberPresentation)
- .append("\nnamePresentation: " + namePresentation)
- .append("\ncontactExits: " + contactExists)
- .append("\nphoneLabel: " + phoneLabel)
- .append("\nnumberType: " + numberType)
- .append("\nnumberLabel: " + numberLabel)
- .append("\nphotoResource: " + photoResource)
- .append("\nperson_id: " + person_id)
- .append("\nneedUpdate: " + needUpdate)
- .append("\ncontactRefUri: " + /*contactRefUri*/ "xxxxxxx")
- .append("\ncontactRingtoneUri: " + /*contactRefUri*/ "xxxxxxx")
- .append("\nshouldSendToVoicemail: " + shouldSendToVoicemail)
- .append("\ncachedPhoto: " + cachedPhoto)
- .append("\nisCachedPhotoCurrent: " + isCachedPhotoCurrent)
- .append("\nemergency: " + mIsEmergency)
- .append("\nvoicemail " + mIsVoiceMail)
- .append("\ncontactExists " + contactExists)
- .toString();
+ // Warning: never check in this file with VERBOSE_DEBUG = true
+ // because that will result in PII in the system log.
+ final boolean VERBOSE_DEBUG = false;
+
+ if (VERBOSE_DEBUG) {
+ return new StringBuilder(384)
+ .append("\nname: " + name)
+ .append("\nphoneNumber: " + phoneNumber)
+ .append("\ncnapName: " + cnapName)
+ .append("\nnumberPresentation: " + numberPresentation)
+ .append("\nnamePresentation: " + namePresentation)
+ .append("\ncontactExits: " + contactExists)
+ .append("\nphoneLabel: " + phoneLabel)
+ .append("\nnumberType: " + numberType)
+ .append("\nnumberLabel: " + numberLabel)
+ .append("\nphotoResource: " + photoResource)
+ .append("\nperson_id: " + person_id)
+ .append("\nneedUpdate: " + needUpdate)
+ .append("\ncontactRefUri: " + contactRefUri)
+ .append("\ncontactRingtoneUri: " + contactRefUri)
+ .append("\nshouldSendToVoicemail: " + shouldSendToVoicemail)
+ .append("\ncachedPhoto: " + cachedPhoto)
+ .append("\nisCachedPhotoCurrent: " + isCachedPhotoCurrent)
+ .append("\nemergency: " + mIsEmergency)
+ .append("\nvoicemail " + mIsVoiceMail)
+ .append("\ncontactExists " + contactExists)
+ .toString();
+ } else {
+ return new StringBuilder(128)
+ .append("CallerInfo { ")
+ .append("name " + ((name == null) ? "null" : "non-null"))
+ .append(", phoneNumber " + ((phoneNumber == null) ? "null" : "non-null"))
+ .append(" }")
+ .toString();
+ }
}
}