Fixes bug in CDMA phones' missed call notification

- There was inconsistency between CallNotifier and NotificationMgr in
  which variable to set to "Private number" when the number has its
  representation form set.
- This fixed the problem in the missed call case, but we should
  re-examine our logic to set the "Private number" string in all our
  projects.

Bug: 11275098
Change-Id: I5bb955ebdfa16860cfcb1494ba82789fb40d79c2
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index 3e30798..d8a91f2 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -398,7 +398,8 @@
                             }
                             // We couldn't find person Uri, so we're sure we cannot obtain a photo.
                             // Call notifyMissedCall() right now.
-                            notifyMissedCall(n.name, n.number, n.type, null, null, n.date);
+                            notifyMissedCall(n.name, n.number, n.presentation, n.type, null, null,
+                                    n.date);
                         }
 
                         if (DBG) log("closing contact cursor.");
@@ -414,7 +415,7 @@
                 int token, Drawable photo, Bitmap photoIcon, Object cookie) {
             if (DBG) log("Finished loading image: " + photo);
             NotificationInfo n = (NotificationInfo) cookie;
-            notifyMissedCall(n.name, n.number, n.type, photo, photoIcon, n.date);
+            notifyMissedCall(n.name, n.number, n.presentation, n.type, photo, photoIcon, n.date);
         }
 
         /**
@@ -471,8 +472,8 @@
      * should be used when non-null.
      * @param date the time when the missed call happened
      */
-    /* package */ void notifyMissedCall(
-            String name, String number, String type, Drawable photo, Bitmap photoIcon, long date) {
+    /* package */ void notifyMissedCall(String name, String number, int presentation, String type,
+            Drawable photo, Bitmap photoIcon, long date) {
 
         // When the user clicks this notification, we go to the call log.
         final PendingIntent pendingCallLogIntent = PhoneGlobals.createPendingCallLogIntent(
@@ -542,8 +543,8 @@
         // TODO: consider removing equals() checks here, and modify callers of this method instead.
         if (mNumberMissedCalls == 1
                 && !TextUtils.isEmpty(number)
-                && !TextUtils.equals(number, mContext.getString(R.string.private_num))
-                && !TextUtils.equals(number, mContext.getString(R.string.unknown))){
+                && (presentation == PhoneConstants.PRESENTATION_ALLOWED ||
+                        presentation == PhoneConstants.PRESENTATION_PAYPHONE)) {
             if (DBG) log("Add actions with the number " + number);
 
             builder.addAction(R.drawable.stat_sys_phone_call,