diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 96d8374..2babb4e 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -23,6 +23,7 @@
 import com.google.common.base.Preconditions;
 
 import java.util.Date;
+import java.util.Locale;
 import java.util.UUID;
 
 /**
@@ -88,7 +89,8 @@
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return "[" + mId + ", " + mState + ", " + mCallService.getComponentName() + "]";
+        return String.format(Locale.US, "[%s, %s, %s, %s]", mId, mState,
+                mCallService.getComponentName(), Log.pii(mHandle));
     }
 
     String getId() {
diff --git a/src/com/android/telecomm/Log.java b/src/com/android/telecomm/Log.java
index 73892cd..f70cf55 100644
--- a/src/com/android/telecomm/Log.java
+++ b/src/com/android/telecomm/Log.java
@@ -18,6 +18,8 @@
 
 import java.util.IllegalFormatException;
 import java.util.Locale;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 
 /**
  * Manages logging for the entire module.
@@ -118,6 +120,44 @@
         android.util.Log.wtf(TAG, buildMessage(getPrefixFromObject(objectPrefix), format, args));
     }
 
+    /**
+     * Redact personally identifiable information for production users.
+     * If we are running in verbose mode, return the original string, otherwise
+     * return a SHA-1 hash of the input string.
+     */
+    public static String pii(Object pii) {
+        if (pii == null || VERBOSE) {
+            return String.valueOf(pii);
+        }
+        return "[" + secureHash(String.valueOf(pii).getBytes()) + "]";
+    }
+
+    private static String secureHash(byte[] input) {
+        MessageDigest messageDigest;
+        try {
+            messageDigest = MessageDigest.getInstance("SHA-1");
+        } catch (NoSuchAlgorithmException e) {
+            return null;
+        }
+        messageDigest.update(input);
+        byte[] result = messageDigest.digest();
+        return encodeHex(result);
+    }
+
+    private static String encodeHex(byte[] bytes) {
+        StringBuffer hex = new StringBuffer(bytes.length * 2);
+
+        for (int i = 0; i < bytes.length; i++) {
+            int byteIntValue = (int) bytes[i] & 0xff;
+            if (byteIntValue < 0x10) {
+                hex.append("0");
+            }
+            hex.append(Integer.toString(byteIntValue, 16));
+        }
+
+        return hex.toString();
+    }
+
     private static String getPrefixFromObject(Object obj) {
         return obj == null ? "<null>" : obj.getClass().getSimpleName();
     }
