From dfb8f07a954ffee3e96c9901230e44f444725846 Mon Sep 17 00:00:00 2001 From: "Tang@Motorola.com" Date: Fri, 31 Jul 2009 18:05:37 -0500 Subject: [PATCH] Fix WPS Queued pip tone not working issue. The alert pitch included in the signal information record should not be involved in the calculation for Pip tone type mapping. --- .../internal/telephony/cdma/SignalToneUtil.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java b/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java index 44958e950a0d5..4b88057f7b715 100644 --- a/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java +++ b/telephony/java/com/android/internal/telephony/cdma/SignalToneUtil.java @@ -35,7 +35,12 @@ public class SignalToneUtil { static public final int IS95_CONST_IR_ALERT_MED = 0; static public final int IS95_CONST_IR_ALERT_HIGH = 1; static public final int IS95_CONST_IR_ALERT_LOW = 2; - static public final int TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN = 255; + + // Based on 3GPP2 C.S0005-E, seciton 3.7.5.5 Signal, + // set TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN to 0 to avoid + // the alert pitch to be involved in hash calculation for + // signal type other than IS54B. + static public final int TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN = 0; // public final int int IS95_CONST_IR_SIGNAL_TYPE; static public final int IS95_CONST_IR_SIG_ISDN_NORMAL = 0; @@ -81,6 +86,15 @@ public class SignalToneUtil { (alertPitch < 0) || (signal > 256) || (signal < 0)) { return new Integer(CDMA_INVALID_TONE); } + // Based on 3GPP2 C.S0005-E, seciton 3.7.5.5 Signal, + // the alert pitch field is ignored by the mobile station unless + // SIGNAL_TYPE is '10',IS-54B Alerting. + // Set alert pitch to TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN + // so the alert pitch is not involved in hash calculation + // when signal type is not IS-54B. + if (signalType != IS95_CONST_IR_SIGNAL_IS54B) { + alertPitch = TAPIAMSSCDMA_SIGNAL_PITCH_UNKNOWN; + } return new Integer(signalType * 256 * 256 + alertPitch * 256 + signal); }