am 04639ba0: Reduce the outrageous verbosity of CallerInfo.toString().

* commit '04639ba0a939988d00131e61458807dac650f9c3':
  Reduce the outrageous verbosity of CallerInfo.toString().
This commit is contained in:
David Brown
2010-11-30 18:11:21 -08:00
committed by Android Git Automerger

View File

@@ -469,27 +469,40 @@ public class CallerInfo {
* @return a string debug representation of this instance. * @return a string debug representation of this instance.
*/ */
public String toString() { public String toString() {
return new StringBuilder(384) // Warning: never check in this file with VERBOSE_DEBUG = true
.append("\nname: " + /*name*/ "nnnnnn") // because that will result in PII in the system log.
.append("\nphoneNumber: " + /*phoneNumber*/ "xxxxxxx") final boolean VERBOSE_DEBUG = false;
.append("\ncnapName: " + cnapName)
.append("\nnumberPresentation: " + numberPresentation) if (VERBOSE_DEBUG) {
.append("\nnamePresentation: " + namePresentation) return new StringBuilder(384)
.append("\ncontactExits: " + contactExists) .append("\nname: " + name)
.append("\nphoneLabel: " + phoneLabel) .append("\nphoneNumber: " + phoneNumber)
.append("\nnumberType: " + numberType) .append("\ncnapName: " + cnapName)
.append("\nnumberLabel: " + numberLabel) .append("\nnumberPresentation: " + numberPresentation)
.append("\nphotoResource: " + photoResource) .append("\nnamePresentation: " + namePresentation)
.append("\nperson_id: " + person_id) .append("\ncontactExits: " + contactExists)
.append("\nneedUpdate: " + needUpdate) .append("\nphoneLabel: " + phoneLabel)
.append("\ncontactRefUri: " + /*contactRefUri*/ "xxxxxxx") .append("\nnumberType: " + numberType)
.append("\ncontactRingtoneUri: " + /*contactRefUri*/ "xxxxxxx") .append("\nnumberLabel: " + numberLabel)
.append("\nshouldSendToVoicemail: " + shouldSendToVoicemail) .append("\nphotoResource: " + photoResource)
.append("\ncachedPhoto: " + cachedPhoto) .append("\nperson_id: " + person_id)
.append("\nisCachedPhotoCurrent: " + isCachedPhotoCurrent) .append("\nneedUpdate: " + needUpdate)
.append("\nemergency: " + mIsEmergency) .append("\ncontactRefUri: " + contactRefUri)
.append("\nvoicemail " + mIsVoiceMail) .append("\ncontactRingtoneUri: " + contactRefUri)
.append("\ncontactExists " + contactExists) .append("\nshouldSendToVoicemail: " + shouldSendToVoicemail)
.toString(); .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();
}
} }
} }