diff options
author | Anna Markova <crwn43@motorola.com> | 2009-07-17 10:31:27 +0400 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2009-07-27 10:55:57 -0700 |
commit | 3bd5b0154faa02e197cdc344b45d968aba43d726 (patch) | |
tree | 0508887224dac099a0bb51fec8a92be47d58481b /telephony/java | |
parent | 143a2ce1ea33aeba81cff26f66144065d379dc64 (diff) | |
download | frameworks_base-3bd5b0154faa02e197cdc344b45d968aba43d726.zip frameworks_base-3bd5b0154faa02e197cdc344b45d968aba43d726.tar.gz frameworks_base-3bd5b0154faa02e197cdc344b45d968aba43d726.tar.bz2 |
Fix for unknown number issue in CDMA call waiting
During a call, if 2nd call is received, the 2nd remote party number
should be properly displayed in case numberPresentation is set to
ALLOWED
Diffstat (limited to 'telephony/java')
-rw-r--r-- | telephony/java/com/android/internal/telephony/RIL.java | 4 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/cdma/CdmaCallWaitingNotification.java | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java index 2bec9bc..52f6526 100644 --- a/telephony/java/com/android/internal/telephony/RIL.java +++ b/telephony/java/com/android/internal/telephony/RIL.java @@ -2553,7 +2553,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { break; case RIL_UNSOL_CDMA_CALL_WAITING: - if (RILJ_LOGD) unsljLog(response); + if (RILJ_LOGD) unsljLogRet(response, ret); if (mCallWaitingInfoRegistrants != null) { mCallWaitingInfoRegistrants.notifyRegistrants( @@ -2980,7 +2980,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { CdmaCallWaitingNotification notification = new CdmaCallWaitingNotification(); notification.number = p.readString(); - notification.numberPresentation = p.readInt(); + notification.numberPresentation = notification.presentationFromCLIP(p.readInt()); notification.name = p.readString(); notification.namePresentation = notification.numberPresentation; notification.isPresent = p.readInt(); diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaCallWaitingNotification.java b/telephony/java/com/android/internal/telephony/cdma/CdmaCallWaitingNotification.java index 54dec48..f4119ad 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaCallWaitingNotification.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaCallWaitingNotification.java @@ -16,12 +16,16 @@ package com.android.internal.telephony.cdma; +import android.util.Log; +import com.android.internal.telephony.Connection; + /** * Represents a Supplementary Service Notification received from the network. * * {@hide} */ public class CdmaCallWaitingNotification { + static final String LOG_TAG = "CDMA"; public String number =null; public int numberPresentation = 0; public String name = null; @@ -31,7 +35,6 @@ public class CdmaCallWaitingNotification { public int alertPitch = 0; public int signal = 0; - public String toString() { return super.toString() + "Call Waiting Notification " @@ -45,4 +48,17 @@ public class CdmaCallWaitingNotification { + " signal: " + signal ; } + public static int + presentationFromCLIP(int cli) + { + switch(cli) { + case 0: return Connection.PRESENTATION_ALLOWED; + case 1: return Connection.PRESENTATION_RESTRICTED; + case 2: return Connection.PRESENTATION_UNKNOWN; + default: + // This shouldn't happen, just log an error and treat as Unknown + Log.d(LOG_TAG, "Unexpected presentation " + cli); + return Connection.PRESENTATION_UNKNOWN; + } + } } |