add pii support for Rlog

am: a7ab821aa1

Change-Id: I47153d683efd3256d6ee8d5b9417069b097f65c9
This commit is contained in:
fionaxu
2016-07-26 17:09:25 +00:00
committed by android-build-merger

View File

@@ -85,5 +85,13 @@ public final class Rlog {
return Log.isLoggable(tag, level);
}
/**
* Redact personally identifiable information for production users.
* If log tag is loggable in verbose mode, return the original string, otherwise return XXX.
*/
public static String pii(String tag, Object pii) {
return (isLoggable(tag, Log.VERBOSE) ? String.valueOf(pii) : "XXX");
}
}