Disable a phone number log for user build
Shunta Sakai [Tue, 6 Dec 2016 11:32:07 +0000 (20:32 +0900)]
A phone number is privacy data. Therefore, it should be prevented
from logging in user build.

Co-Author: youhei.x.miyoshi <youhei.x.miyoshi@sonymobile.com>
Co-Author: Yong Shi <yong.xa.shi@sonymobile.com>

Test: manual - checked log
Bug: 34582911
Change-Id: Icf47ea8394244823579a147e8469ff2fd5d839cd

src/java/com/android/ims/ImsCall.java
src/java/com/android/ims/ImsUt.java

index 6812b04..42824bd 100644 (file)
@@ -30,6 +30,7 @@ import android.os.Bundle;
 import android.os.Message;
 import android.telecom.ConferenceParticipant;
 import android.telecom.Connection;
+import android.telephony.Rlog;
 import java.util.Objects;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -1677,10 +1678,10 @@ public class ImsCall implements ICall {
             String endpoint = confInfo.getString(ImsConferenceState.ENDPOINT);
 
             if (CONF_DBG) {
-                logi("notifyConferenceStateUpdated :: key=" + key +
+                logi("notifyConferenceStateUpdated :: key=" + Rlog.pii(TAG, key) +
                         ", status=" + status +
-                        ", user=" + user +
-                        ", displayName= " + displayName +
+                        ", user=" + Rlog.pii(TAG, user) +
+                        ", displayName= " + Rlog.pii(TAG, displayName) +
                         ", endpoint=" + endpoint);
             }
 
index d72e5fd..75a0b52 100644 (file)
@@ -149,7 +149,7 @@ public class ImsUt implements ImsUtInterface {
     public void queryCallForward(int condition, String number, Message result) {
         if (DBG) {
             log("queryCallForward :: Ut=" + miUt + ", condition=" + condition
-                    + ", number=" + number);
+                    + ", number=" + Rlog.pii(TAG, number));
         }
 
         synchronized(mLockObj) {
@@ -349,8 +349,8 @@ public class ImsUt implements ImsUtInterface {
             int serviceClass, int timeSeconds, Message result) {
         if (DBG) {
             log("updateCallForward :: Ut=" + miUt + ", action=" + action
-                    + ", condition=" + condition + ", number=" + number
-                    +  ", serviceClass=" + serviceClass + ", timeSeconds=" + timeSeconds);
+                    + ", condition=" + condition + ", number=" + Rlog.pii(TAG, number)
+                    + ", serviceClass=" + serviceClass + ", timeSeconds=" + timeSeconds);
         }
 
         synchronized(mLockObj) {