Adding missed call notification.

Adds a MissedCallNotifier class and a TelecommBroadcastReceiver to
receive the pending intents issued by the new notification.

Bug: 13625335
Change-Id: I51b273f3bd4ecb55e2f0e61b789f609d72086deb
diff --git a/src/com/android/telecomm/Log.java b/src/com/android/telecomm/Log.java
index d63f23c..b25aec1 100644
--- a/src/com/android/telecomm/Log.java
+++ b/src/com/android/telecomm/Log.java
@@ -16,6 +16,9 @@
 
 package com.android.telecomm;
 
+import android.net.Uri;
+import android.telephony.PhoneNumberUtils;
+
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.IllegalFormatException;
@@ -122,6 +125,34 @@
         android.util.Log.wtf(TAG, msg, new IllegalStateException(msg));
     }
 
+    public static String piiHandle(Object pii) {
+        if (pii == null || VERBOSE) {
+            return String.valueOf(pii);
+        }
+
+        if (pii instanceof Uri) {
+            Uri uri = (Uri) pii;
+
+            // All Uri's which are not "tel" go through normal pii() method.
+            if (!"tel".equals(uri.getScheme())) {
+                return pii(pii);
+            } else {
+                pii = uri.getSchemeSpecificPart();
+            }
+        }
+
+        String originalString = String.valueOf(pii);
+        StringBuilder stringBuilder = new StringBuilder(originalString.length());
+        for (char c : originalString.toCharArray()) {
+            if (PhoneNumberUtils.isDialable(c)) {
+                stringBuilder.append('*');
+            } else {
+                stringBuilder.append(c);
+            }
+        }
+        return stringBuilder.toString();
+    }
+
     /**
      * Redact personally identifiable information for production users.
      * If we are running in verbose mode, return the original string, otherwise