--- a/phoneengine/phonemodel/src/cpeparserphonenumberhandler.cpp Thu Aug 19 09:54:27 2010 +0300
+++ b/phoneengine/phonemodel/src/cpeparserphonenumberhandler.cpp Tue Aug 31 15:14:29 2010 +0300
@@ -69,6 +69,9 @@
&aNumber,
&aDtmfPostfix );
+ // Check if phone is locked
+ iOwner.CheckIfPhoneIsLockedL();
+
if ( aNumber.Length() == 0 )
{
User::Leave( ECCPErrorInvalidPhoneNumber );
@@ -89,7 +92,7 @@
if( processType != EPECallTypeVideo )
{
// TSY not accept phone number that include + or w chartes.
- TPEPhoneNumber postfix = FilterPostfix( aDtmfPostfix );
+ TPEPhoneNumber postfix = FilterPostfixL( aDtmfPostfix );
if( postfix.Length() )
{
phoneNumber.Append( postfix );
@@ -163,7 +166,7 @@
// CPEParserPhoneNumberHandler::FilterPostfix
// -----------------------------------------------------------------------------
//
-TPtrC CPEParserPhoneNumberHandler::FilterPostfix( TPtrC aPostfix )
+TPtrC CPEParserPhoneNumberHandler::FilterPostfixL( TPtrC aPostfix )
{
TLex input( aPostfix );
TInt stripStart = KErrNotFound;
@@ -171,14 +174,18 @@
for ( TInt i = 0; i != postfixLength; i ++ )
{
TChar ch( input.Peek() );
- if ( ch == KDtmfWait ||
- ch == KDtmfPlus )
+ if (ch == KDtmfPlus)
+ {
+ User::Leave ( ECCPErrorInvalidPhoneNumber );
+ }
+ else if ( ch == KDtmfWait )
{
if ( i < stripStart || stripStart == KErrNotFound )
{
stripStart = i;
}
}
+ input.Inc();
}
if ( stripStart != KErrNotFound )
{
@@ -199,7 +206,7 @@
TBool isPhoneOffline( EFalse );
if( FeatureManager::FeatureSupported( KFeatureIdOfflineMode )
- && ( iDataStore.ProfileId() == EProfileOffLineId ) )
+ && ( EFalse == iOwner.IsNetworkConnectionAllowed() ) )
{
isPhoneOffline = ETrue;
}
@@ -214,9 +221,8 @@
{
isPhoneOffline = ETrue;
}
-
+
return isPhoneOffline;
}
-
// End of File