diff options
| author | Wink Saville <wink@google.com> | 2009-05-28 17:32:34 -0700 |
|---|---|---|
| committer | Wink Saville <wink@google.com> | 2009-05-28 17:32:34 -0700 |
| commit | dda5391d5079537e275c9f4ed2637a1484d0e4e8 (patch) | |
| tree | e7dfc8ecf0ff07d946a7be2ae7d9b4aab8cdebb9 /core/java/android/provider | |
| parent | 1cb62b83241c5d1cac9e9cda60d0d5d9218b44fb (diff) | |
| download | frameworks_base-dda5391d5079537e275c9f4ed2637a1484d0e4e8.zip frameworks_base-dda5391d5079537e275c9f4ed2637a1484d0e4e8.tar.gz frameworks_base-dda5391d5079537e275c9f4ed2637a1484d0e4e8.tar.bz2 | |
Motorola additions for CDMA support without CdmaSuppConnTracker
There are corresponding changes to hardware/ril and packages/apps/Phone
that are required to go with these changes.
Diffstat (limited to 'core/java/android/provider')
| -rw-r--r-- | core/java/android/provider/CallLog.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java index abd6934..7d03801 100644 --- a/core/java/android/provider/CallLog.java +++ b/core/java/android/provider/CallLog.java @@ -151,6 +151,9 @@ public class CallLog { int presentation, int callType, long start, int duration) { final ContentResolver resolver = context.getContentResolver(); + // TODO(Moto): Which is correct: original code, this only changes the + // number if the number is empty and never changes the caller info name. + if (false) { if (TextUtils.isEmpty(number)) { if (presentation == Connection.PRESENTATION_RESTRICTED) { number = CallerInfo.PRIVATE_NUMBER; @@ -160,7 +163,22 @@ public class CallLog { number = CallerInfo.UNKNOWN_NUMBER; } } - + } else { + // NEWCODE: From Motorola + + //If this is a private number then set the number to Private, otherwise check + //if the number field is empty and set the number to Unavailable + if (presentation == Connection.PRESENTATION_RESTRICTED) { + number = CallerInfo.PRIVATE_NUMBER; + ci.name = ""; + } else if (presentation == Connection.PRESENTATION_PAYPHONE) { + number = CallerInfo.PAYPHONE_NUMBER; + ci.name = ""; + } else if (TextUtils.isEmpty(number) || presentation == Connection.PRESENTATION_UNKNOWN) { + number = CallerInfo.UNKNOWN_NUMBER; + ci.name = ""; + } + } ContentValues values = new ContentValues(5); values.put(NUMBER, number); |
