1 /* |
1 /* |
2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
223 |
223 |
224 EXPORT_C void TAknQueryEcsObserver::HandleEcsEvent( CAknEcsDetector* /*aDetector*/, |
224 EXPORT_C void TAknQueryEcsObserver::HandleEcsEvent( CAknEcsDetector* /*aDetector*/, |
225 CAknEcsDetector::TState aUpdatedState ) |
225 CAknEcsDetector::TState aUpdatedState ) |
226 { |
226 { |
227 _AKNTRACE( "[%s][%s] aUpdatedState: %d", "TAknQueryEcsObserver", __FUNCTION__,aUpdatedState); |
227 _AKNTRACE( "[%s][%s] aUpdatedState: %d", "TAknQueryEcsObserver", __FUNCTION__,aUpdatedState); |
228 TRAP_IGNORE( iParent->SetEcsCbaVisibleL( aUpdatedState == CAknEcsDetector::ECompleteMatch ) ); |
228 TRAP_IGNORE( iParent->SetEcsCbaVisibleL( aUpdatedState == CAknEcsDetector::ECompleteMatch || |
|
229 aUpdatedState == CAknEcsDetector::EServiceNumMatch ) ); |
229 |
230 |
230 // Hide the emergency call number again. |
231 // Hide the emergency call number again. |
231 // Number should be visible only in Partial or Complete match state |
232 // Number should be visible only in Partial or Complete match state |
232 if ( aUpdatedState != CAknEcsDetector::EPartialMatch && |
233 if ( aUpdatedState != CAknEcsDetector::EPartialMatch && |
233 aUpdatedState != CAknEcsDetector::ECompleteMatch ) |
234 aUpdatedState != CAknEcsDetector::ECompleteMatch && |
|
235 aUpdatedState != CAknEcsDetector::EServiceNumMatch ) |
234 { |
236 { |
235 if ( iParent->QueryType() == EPinLayout ) |
237 if ( iParent->QueryType() == EPinLayout ) |
236 { |
238 { |
237 _AKNTRACE( "[%s][%s] ", "RevealSecretText( EFalse )", __FUNCTION__); |
239 _AKNTRACE( "[%s][%s] ", "RevealSecretText( EFalse )", __FUNCTION__); |
238 static_cast<CAknNumericSecretEditor*> |
240 static_cast<CAknNumericSecretEditor*> |
374 EXPORT_C void CAknQueryControl::ConstructFromResourceL(TResourceReader &aRes) |
376 EXPORT_C void CAknQueryControl::ConstructFromResourceL(TResourceReader &aRes) |
375 { |
377 { |
376 _AKNTRACE_FUNC_ENTER; |
378 _AKNTRACE_FUNC_ENTER; |
377 // Construct extension |
379 // Construct extension |
378 CAknQueryExtension::CreateExtensionL( this ); |
380 CAknQueryExtension::CreateExtensionL( this ); |
379 iExtension = new (ELeave)CAknQueryControlExtension; |
381 iExtension = new (ELeave)CAknQueryControlExtension; |
380 |
382 |
381 iEcsObserver = new (ELeave) TAknQueryEcsObserver(this); |
383 iEcsObserver = new (ELeave) TAknQueryEcsObserver(this); |
382 iEditIndicator = CAknQueryEditIndicator::NewL(this); |
384 iEditIndicator = CAknQueryEditIndicator::NewL(this); |
383 iEditIndicator->SetObserver(this); |
385 iEditIndicator->SetObserver(this); |
384 |
386 |
1136 // Manage appearance of the PIN query |
1138 // Manage appearance of the PIN query |
1137 // If match is complete, or complete + Send key, show the number |
1139 // If match is complete, or complete + Send key, show the number |
1138 TBool reveal = EFalse; |
1140 TBool reveal = EFalse; |
1139 TInt ecsState( iEcsDetector->State() ); |
1141 TInt ecsState( iEcsDetector->State() ); |
1140 if ( ( ecsState == CAknEcsDetector::ECompleteMatch ) || |
1142 if ( ( ecsState == CAknEcsDetector::ECompleteMatch ) || |
|
1143 ( ecsState == CAknEcsDetector::EServiceNumMatch ) || |
1141 ( ecsState == CAknEcsDetector::ECompleteMatchThenSendKey ) ) |
1144 ( ecsState == CAknEcsDetector::ECompleteMatchThenSendKey ) ) |
1142 { |
1145 { |
1143 // Further check to ensure that the matched number is the entire buffer |
1146 // Further check to ensure that the matched number is the entire buffer |
1144 // Get the matched text and see if is the same length as the current query length |
1147 // Get the matched text and see if is the same length as the current query length |
1145 if ( GetTextLength() == iEcsDetector->CurrentMatch().Length() ) |
1148 if ( GetTextLength() == iEcsDetector->CurrentMatch().Length() ) |
1146 { |
1149 { |
1147 reveal = ETrue; |
1150 reveal = ETrue; |
1148 |
1151 |
1149 if ( ecsState == CAknEcsDetector::ECompleteMatch ) |
1152 if ( ecsState == CAknEcsDetector::ECompleteMatch || |
|
1153 ecsState == CAknEcsDetector::EServiceNumMatch ) |
1150 { |
1154 { |
1151 SetEcsCbaVisibleL( ETrue ); |
1155 SetEcsCbaVisibleL( ETrue ); |
1152 } |
1156 } |
1153 } |
1157 } |
1154 } |
1158 } |
1155 _AKNTRACE( "[%s][%s] iPinEdwin->RevealSecretText( %d )", "CAknQueryControl", __FUNCTION__, reveal); |
1159 _AKNTRACE( "[%s][%s] iPinEdwin->RevealSecretText( %d )", "CAknQueryControl", __FUNCTION__, reveal); |
1156 iPinEdwin->RevealSecretText( reveal ); |
1160 iPinEdwin->RevealSecretText( reveal ); |
3506 void CAknQueryControl::AttemptEmergencyCallL() |
3510 void CAknQueryControl::AttemptEmergencyCallL() |
3507 { |
3511 { |
3508 _AKNTRACE_FUNC_ENTER; |
3512 _AKNTRACE_FUNC_ENTER; |
3509 if ( iEcsDetector ) |
3513 if ( iEcsDetector ) |
3510 { |
3514 { |
3511 if ( iEcsDetector->State() == CAknEcsDetector::ECompleteMatch ) |
3515 if ( iEcsDetector->State() == CAknEcsDetector::ECompleteMatch || |
|
3516 iEcsDetector->State() == CAknEcsDetector::EServiceNumMatch ) |
3512 { |
3517 { |
3513 // Further check to ensure that the matched number is the |
3518 // Further check to ensure that the matched number is the |
3514 // entire buffer. Get the matched text and see if is the same |
3519 // entire buffer. Get the matched text and see if is the same |
3515 // length as the current query length. |
3520 // length as the current query length. |
3516 if ( GetTextLength() == iEcsDetector->CurrentMatch().Length() ) |
3521 if ( GetTextLength() == iEcsDetector->CurrentMatch().Length() ) |