Remove some PII.

Change-Id: I4df27119b6bbd28bf950516fd6f44676a8e04f06
This commit is contained in:
Wink Saville
2010-10-12 12:36:38 -07:00
parent 844a6b3cca
commit a42880749b
6 changed files with 38 additions and 18 deletions

View File

@ -383,8 +383,8 @@ public class CallerInfo {
*/
public String toString() {
return new StringBuilder(384)
.append("\nname: " + name)
.append("\nphoneNumber: " + phoneNumber)
.append("\nname: " + /*name*/ "nnnnnn")
.append("\nphoneNumber: " + /*phoneNumber*/ "xxxxxxx")
.append("\ncnapName: " + cnapName)
.append("\nnumberPresentation: " + numberPresentation)
.append("\nnamePresentation: " + namePresentation)
@ -395,8 +395,8 @@ public class CallerInfo {
.append("\nphotoResource: " + photoResource)
.append("\nperson_id: " + person_id)
.append("\nneedUpdate: " + needUpdate)
.append("\ncontactRefUri: " + contactRefUri)
.append("\ncontactRingtoneUri: " + contactRefUri)
.append("\ncontactRefUri: " + /*contactRefUri*/ "xxxxxxx")
.append("\ncontactRingtoneUri: " + /*contactRefUri*/ "xxxxxxx")
.append("\nshouldSendToVoicemail: " + shouldSendToVoicemail)
.append("\ncachedPhoto: " + cachedPhoto)
.append("\nisCachedPhotoCurrent: " + isCachedPhotoCurrent)

View File

@ -135,7 +135,7 @@ public class CallerInfoAsyncQuery {
} else {
if (DBG) log("Processing event: " + cw.event + " token (arg1): " + msg.arg1 +
" command: " + msg.what + " query URI: " + args.uri);
" command: " + msg.what + " query URI: " + sanitizeUriToString(args.uri));
switch (cw.event) {
case EVENT_NEW_QUERY:
@ -297,7 +297,7 @@ public class CallerInfoAsyncQuery {
OnQueryCompleteListener listener, Object cookie) {
if (DBG) {
log("##### CallerInfoAsyncQuery startQuery()... #####");
log("- number: " + number);
log("- number: " + /*number*/ "xxxxxxx");
log("- cookie: " + cookie);
}
@ -309,7 +309,7 @@ public class CallerInfoAsyncQuery {
if (PhoneNumberUtils.isUriNumber(number)) {
// "number" is really a SIP address.
if (DBG) log(" - Treating number as a SIP address: " + number);
if (DBG) log(" - Treating number as a SIP address: " + /*number*/ "xxxxxxx");
// We look up SIP addresses directly in the Data table:
contactRef = Data.CONTENT_URI;
@ -341,7 +341,7 @@ public class CallerInfoAsyncQuery {
}
if (DBG) {
log("==> contactRef: " + contactRef);
log("==> contactRef: " + sanitizeUriToString(contactRef));
log("==> selection: " + selection);
if (selectionArgs != null) {
for (int i = 0; i < selectionArgs.length; i++) {
@ -383,8 +383,8 @@ public class CallerInfoAsyncQuery {
*/
public void addQueryListener(int token, OnQueryCompleteListener listener, Object cookie) {
if (DBG) log("adding listener to query: " + mHandler.mQueryUri + " handler: " +
mHandler.toString());
if (DBG) log("adding listener to query: " + sanitizeUriToString(mHandler.mQueryUri) +
" handler: " + mHandler.toString());
//create cookieWrapper, add query request to end of queue.
CookieWrapper cw = new CookieWrapper();
@ -418,6 +418,20 @@ public class CallerInfoAsyncQuery {
mHandler = null;
}
private static String sanitizeUriToString(Uri uri) {
if (uri != null) {
String uriString = uri.toString();
int indexOfLastSlash = uriString.lastIndexOf('/');
if (indexOfLastSlash > 0) {
return uriString.substring(0, indexOfLastSlash) + "/xxxxxxx";
} else {
return uriString;
}
} else {
return "";
}
}
/**
* static logging method
*/

View File

@ -238,7 +238,7 @@ public final class SIMRecords extends IccRecords {
msisdn = number;
msisdnTag = alphaTag;
if(DBG) log("Set MSISDN: " + msisdnTag +" " + msisdn);
if(DBG) log("Set MSISDN: " + msisdnTag + " " + /*msisdn*/ "xxxxxxx");
AdnRecord adn = new AdnRecord(msisdnTag, msisdn);
@ -496,7 +496,7 @@ public final class SIMRecords extends IccRecords {
imsi = null;
}
Log.d(LOG_TAG, "IMSI: " + imsi.substring(0, 6) + "xxxxxxxxx");
Log.d(LOG_TAG, "IMSI: " + imsi.substring(0, 6) + "xxxxxxx");
if (mncLength == UNKNOWN) {
// the SIM has told us all it knows, but it didn't know the mnc length.
@ -619,7 +619,7 @@ public final class SIMRecords extends IccRecords {
msisdn = adn.getNumber();
msisdnTag = adn.getAlphaTag();
Log.d(LOG_TAG, "MSISDN: " + msisdn);
Log.d(LOG_TAG, "MSISDN: " + /*msisdn*/ "xxxxxxx");
break;
case EVENT_SET_MSISDN_DONE: