diff options
author | David Brown <dab@google.com> | 2010-12-01 09:21:22 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-12-01 09:21:22 -0800 |
commit | 1cc52df752eac527aa2bcd7be843d9d02d6bdbc4 (patch) | |
tree | c975466632a0e90cf00017a5ff4730583428bc5a /telephony | |
parent | 6ff08a80dc24e5c4bf8f4513e6d1f8b5bdc8a662 (diff) | |
parent | 4c11eee7ec3dafe943af7f4222e29b550163e58c (diff) | |
download | frameworks_base-1cc52df752eac527aa2bcd7be843d9d02d6bdbc4.zip frameworks_base-1cc52df752eac527aa2bcd7be843d9d02d6bdbc4.tar.gz frameworks_base-1cc52df752eac527aa2bcd7be843d9d02d6bdbc4.tar.bz2 |
am 4c11eee7: am 04639ba0: Reduce the outrageous verbosity of CallerInfo.toString().
* commit '4c11eee7ec3dafe943af7f4222e29b550163e58c':
Reduce the outrageous verbosity of CallerInfo.toString().
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/CallerInfo.java | 57 |
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 4d045d5..014901d 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfo.java +++ b/telephony/java/com/android/internal/telephony/CallerInfo.java @@ -476,27 +476,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(); + } } } |