diff -r 673fb3e04649 -r 8bda91a87a00 gssettingsuis/Gs/GSCallDivertPlugin/Src/GSCallDivertView.cpp --- a/gssettingsuis/Gs/GSCallDivertPlugin/Src/GSCallDivertView.cpp Thu Jul 15 18:57:55 2010 +0300 +++ b/gssettingsuis/Gs/GSCallDivertPlugin/Src/GSCallDivertView.cpp Thu Aug 19 10:12:30 2010 +0300 @@ -71,6 +71,7 @@ // LOCAL CONSTANTS _LIT( KGSDivertClassName, "CGSCallDivertView" ); +_LIT( KCallDivertInvalidchars, " ()" ); // ========================= MEMBER FUNCTIONS ================================ @@ -588,6 +589,7 @@ TBool accepted = EFalse; while ( !accepted ) { + RemoveInvalidChars( aValue ); if ( aValue.Length() > KGSMaxDataLength ) { //Chop the first extra digits and keep the last KGSMaxDataLength @@ -1357,5 +1359,28 @@ return keyPress; } - +// -------------------------------------------------------------------------- +// CGSCallDivertView::RemoveInvalidChars +// Remove invalid " ", "()" which were sync with PC suite. +// -------------------------------------------------------------------------- +// +void CGSCallDivertView::RemoveInvalidChars( TDes& aNumber ) + { + TInt noOfInvalidchars = KCallDivertInvalidchars().Length(); + TInt location = KErrNone; + // delete the invalid chars of KCallDivertInvalidchars. + //aNumber changed to valid phone number if it contains invalid chars + for ( TInt index = 0; index < noOfInvalidchars; index++ ) + { + while ( ETrue ) + { + location = aNumber.Find( KCallDivertInvalidchars().Mid( index, 1 ) ); + if ( location == KErrNotFound ) + { + break; + } + aNumber.Delete( location, 1 ); //delete the invalid char, aNumber changed + } + } + } // End of File