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
This commit is contained in:
committed by
Wink Saville
parent
143a2ce1ea
commit
3bd5b0154f
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user