# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273586425 -10800 # Node ID 53af9c3d61e4fce239a04c9eb36160dce2ce0954 # Parent 9971b621ef6ca9961d9d5c4861b437ba78768f2f Revision: 201017 Kit: 201019 diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/Autolock/src/AutoLockModel.cpp --- a/securitydialogs/Autolock/src/AutoLockModel.cpp Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/Autolock/src/AutoLockModel.cpp Tue May 11 17:00:25 2010 +0300 @@ -394,6 +394,7 @@ #endif//RD_REMOTELOCK // lock keys iAppUi->LockKeysL(); + // iAppUi->EnableWGListChangeEventListening(); // this was in previous versions. It's not needed because it will come on top of bigClock // app to foreground iAppUi->BringAppToForegroundL(); // Reset inactivity time so that Screensaver gets to diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/Autolock/src/AutolockAppUi.cpp --- a/securitydialogs/Autolock/src/AutolockAppUi.cpp Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/Autolock/src/AutolockAppUi.cpp Tue May 11 17:00:25 2010 +0300 @@ -55,6 +55,9 @@ #include #include +#include +#include + // LOCAL CONSTANTS AND MACROS #define KSysApUid TUid::Uid(0x100058F3) #define KPhoneAppUid TUid::Uid(0x100058B3) @@ -674,7 +677,7 @@ const TKeyEvent& aKeyEvent,TEventCode aType) { - if ( aKeyEvent.iCode == EKeyBell || (aType == EEventKeyUp && aKeyEvent.iScanCode == EStdKeyDeviceF) ) + if ( aKeyEvent.iCode == EKeyBell || (aType == EEventKeyUp && aKeyEvent.iScanCode == EStdKeyDeviceF) || (aKeyEvent.iCode == EKeyDeviceF) ) { if(iLocked) HandleCommandL(ESecUiCmdUnlock); @@ -1054,8 +1057,11 @@ if (!iSideKey1) { RWindowGroup& groupWin=iCoeEnv->RootWin(); - iSideKey1 = groupWin.CaptureKey(EKeySide,0,0); - iSideKey2 = groupWin.CaptureKeyUpAndDowns(EStdKeyDevice6, 0, 0); + iSideKey1 = groupWin.CaptureKey(EKeyDeviceF,0,0); // EKeySide -> EKeyDeviceF + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) capturing EStdKeyDeviceF=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EStdKeyDeviceF ); + #endif + iSideKey2 = groupWin.CaptureKeyUpAndDowns(EStdKeyDeviceF, 0, 0); // EStdKeyDevice6 -> EStdKeyDeviceF } } @@ -1354,9 +1360,32 @@ case EEventKeyUp: // on touch devices, this happens only for the switch-key, which should turn on the lights. case EEventKey: case EEventKeyDown: - if(iLocked) - SendMessageToSysAp( EEikSecurityQueryLights ); - break; + if(iLocked) + { // need to capture the switch-key for the case activeCall because Autolock stays on top, even over Akn + TKeyEvent *key = aEvent.Key(); + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) key->iCode=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, key->iCode ); + RDebug::Printf( "%s %s (%u) key->iScanCode=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, key->iScanCode ); + #endif + if ( (key->iScanCode == EStdKeyDeviceF) || (key->iCode == EKeyDeviceF) ) + { + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) good key=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + #endif + RWsSession& ws = iEikonEnv->WsSession(); + TApaTaskList tasklist( ws ); + TApaTask capserver = tasklist.FindApp( KAknCapServerUid ); + if( capserver.Exists() ) + { + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) found KAknCapServerUid=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, KAknCapServerUid ); + #endif + capserver.SendKey( *key ); + } + SendMessageToSysAp( EEikSecurityQueryLights ); + } + } + break; default: iGotEventDownDuringCall=0; // any other event invalidates the Press inside the BigRedButton break; diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/Autolock/src/AutolockContainer.cpp --- a/securitydialogs/Autolock/src/AutolockContainer.cpp Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/Autolock/src/AutolockContainer.cpp Tue May 11 17:00:25 2010 +0300 @@ -254,7 +254,9 @@ #if defined(_DEBUG) RDebug::Printf( "%s %s (%u) no Draw value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, value ); #endif - return; + // If it returns, it will not handle orientation changes. + // However it will not really draw because the view is hidden + // return; } } diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/Autolock/src/AutolockGripStatusObserver.cpp --- a/securitydialogs/Autolock/src/AutolockGripStatusObserver.cpp Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/Autolock/src/AutolockGripStatusObserver.cpp Tue May 11 17:00:25 2010 +0300 @@ -20,6 +20,8 @@ #include #include #include "AutolockGripStatusObserver.h" +#include "AutolockApp.h" +#include EXPORT_C CAutolockGripStatusObserver* CAutolockGripStatusObserver::NewL( MAutolockGripStatusObserver* aObserver, RWsSession& aSession ) @@ -103,6 +105,7 @@ #endif //Grip opened TApaTaskList tasklist( iSession ); + /* this is old code. It was changed to a new one, following a suggestion from the Slide-handling team TApaTask capserver = tasklist.FindApp( KAknCapServerUid ); if( capserver.Exists() ) { @@ -113,7 +116,21 @@ key.iScanCode = EStdKeyDevice0; capserver.SendKey( key ); } - + */ + TApaTask capserver = tasklist.FindApp( KUidAutolock ); + if( capserver.Exists() ) + { + TKeyEvent key; + key.iCode = EKeyBell; + capserver.SendKey( key ); + } + RAknKeylock2 keylock; + TInt error( keylock.Connect() ); + if ( !error ) + { + keylock.DisableWithoutNote(); + keylock.Close(); + } } } else diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/lockapp/src/lockappkeyguardcontrol.cpp --- a/securitydialogs/lockapp/src/lockappkeyguardcontrol.cpp Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/lockapp/src/lockappkeyguardcontrol.cpp Tue May 11 17:00:25 2010 +0300 @@ -28,7 +28,8 @@ #include // keyguard spesific resources #include #include -#include // publishing keyguard notes to secondary display +// this is not needed +// #include // publishing keyguard notes to secondary display #include // feature manager #include // keyguard soft buttons #include @@ -158,13 +159,15 @@ iKeypadLockedNote->ConstructSleepingNoteL( touchEnabled ? R_KEYLOCK_NOTE_DISPLAY_LOCK_ON_TOUCH : R_KEYLOCK_NOTE_LOCK_ON ); iKeypadLockedNote->ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition( 0, 2 ); - iKeypadLockedNote->PublishDialogL( EAknKeysLockedNote ); + // this is not needed + // iKeypadLockedNote->PublishDialogL( EAknKeysLockedNote ); iKeypadUnlockedNote = new (ELeave) CLockAppLockedNote(); iKeypadUnlockedNote->ConstructSleepingNoteL( touchEnabled ? R_KEYLOCK_NOTE_DISPLAY_LOCK_OFF_TOUCH : R_KEYLOCK_NOTE_LOCK_OFF ); iKeypadUnlockedNote->ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition( 0, 2 ); - iKeypadUnlockedNote->PublishDialogL( EAknKeysReleasedNote ); + // this is not needed + // iKeypadUnlockedNote->PublishDialogL( EAknKeysReleasedNote ); iLockedNote = new (ELeave) CLockAppLockedNote(); if ( touchEnabled ) diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/simlockui/data/SimLockUI.rss --- a/securitydialogs/simlockui/data/SimLockUI.rss Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/simlockui/data/SimLockUI.rss Tue May 11 17:00:25 2010 +0300 @@ -32,7 +32,7 @@ #include #include "simlockui.hrh" -#include "simlockui.loc" +#include // Resource Identifiers RESOURCE RSS_SIGNATURE { } diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/simlockui/data/SimLockUI_reg.rss --- a/securitydialogs/simlockui/data/SimLockUI_reg.rss Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/simlockui/data/SimLockUI_reg.rss Tue May 11 17:00:25 2010 +0300 @@ -39,7 +39,7 @@ hidden = KAppIsHidden; // Uncomment and comment previous line to un-hide //hidden = KAppNotHidden; - localisable_resource_file="\\resource\\apps\\SimLockUI"; + //localisable_resource_file="\\resource\\apps\\SimLockUI"; embeddability = KAppNotEmbeddable; newfile = KAppDoesNotSupportNewFile; } diff -r 9971b621ef6c -r 53af9c3d61e4 securitydialogs/simlockui/group/bld.inf --- a/securitydialogs/simlockui/group/bld.inf Tue Apr 27 17:31:46 2010 +0300 +++ b/securitydialogs/simlockui/group/bld.inf Tue May 11 17:00:25 2010 +0300 @@ -34,7 +34,9 @@ PRJ_EXPORTS // Export IBY files ../rom/simlockui.iby CORE_MW_LAYER_IBY_EXPORT_PATH( simlockui.iby) -../rom/simlockui_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(simlockui_resources.iby) +../rom/simlockui_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(simlockui_resources.iby) + +../inc/simlockui.loc MW_LAYER_LOC_EXPORT_PATH(simlockui.loc) // For EE texts ../rom/simlockui_resources.iby CORE_APP_LAYER_IBY_EXPORT_PATH(simlockui_resources.iby)