diff -r aecbbf00d063 -r d48ab3b357f1 uifw/AvKon/animdllsrc/AknAnimKeySound.cpp --- a/uifw/AvKon/animdllsrc/AknAnimKeySound.cpp Tue Aug 31 15:28:30 2010 +0300 +++ b/uifw/AvKon/animdllsrc/AknAnimKeySound.cpp Wed Sep 01 12:16:19 2010 +0100 @@ -32,8 +32,8 @@ // This is currently nasty set dependencies, API should be moved to middleware layer asap #include - -#include +#include +#include #include #include @@ -258,6 +258,10 @@ iPendingEvent = CAknPendingKeyEvent::NewL(iFunctions, iNoPowerKeyScanCode); } + + iSupportQuertyKey = + FeatureManager::FeatureSupported( KFeatureIdQwertyInput ); + FeatureManager::UnInitializeLib(); // Get extension for querying and manipulating the window and screen attributes. @@ -287,8 +291,12 @@ // CAknAnimKeySound::IsBlockedKeyCode // ----------------------------------------------------------------------------- // -TBool CAknAnimKeySound::IsBlockedKeyCode( TInt aScanCode ) +TBool CAknAnimKeySound::IsBlockedKeyCode( TBool aSupportQuerty , TInt aScanCode ) { + if( aSupportQuerty ) + { + return EFalse; + } for ( TInt ii=0; ii < KBlockedKeyCodeTableSize; ii++ ) { if ( aScanCode == KBlockedKeyCodes[ii] ) @@ -525,6 +533,7 @@ // If system is not in idle or there are calls ongoing, then end key ought to be generated. User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, ps ) ); + User::LeaveIfError( RProperty::Get( KPSUidAiInformation, KActiveIdleState, idle ) ); User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed, startupOk ) ); RDebug::Print(_L("call: %d, idle %d, notes %d"), ps, idle, startupOk); @@ -535,11 +544,23 @@ { return; } + + if ( idle == EPSAiForeground ) + { + // Notify active idle plugins that combined end key / power key has been pressed. + RProperty::Set(KPSUidAvkonDomain, KAknEndKeyEvent, 1); + } + if ( ps != EPSCTsyCallStateNone ) { // A phone call is active. aResult = EEmulateNowPhoneCallActive; } + else if ( idle != EPSAiForeground ) + { + // We are not in idle view. No active phone calls. + aResult = EEmulateNow; + } else { // We are in idle view with no active phone calls. @@ -725,7 +746,7 @@ { TInt scan = aRawEvent.ScanCode() & 0xFFFF; if ( !NonBlockedKeyCode( scan ) - && iKeyPressed && iEnableKeyBlock && IsBlockedKeyCode( scan ) ) + && iKeyPressed && iEnableKeyBlock && IsBlockedKeyCode(iSupportQuertyKey, scan ) ) { blockEvent = ETrue; } @@ -751,7 +772,7 @@ { TInt scan = aRawEvent.ScanCode() & 0xFFFF; if ( !NonBlockedKeyCode( scan ) && iKeyPressed != scan && - iEnableKeyBlock && IsBlockedKeyCode( scan ) ) + iEnableKeyBlock && IsBlockedKeyCode(iSupportQuertyKey, scan ) ) { // If down event is not passed forward, then // repeat events are not passed either. @@ -764,7 +785,7 @@ { TInt scan = aRawEvent.ScanCode() & 0xFFFF; if ( !NonBlockedKeyCode( scan ) && iKeyPressed != scan && - iEnableKeyBlock && IsBlockedKeyCode( scan ) ) + iEnableKeyBlock && IsBlockedKeyCode(iSupportQuertyKey, scan ) ) { // Do not need to block key-up events - there's not a problem // if there's an unexpected key-up events delivery to an app