26 |
26 |
27 #include <avkon.rsg> // general avkon resources |
27 #include <avkon.rsg> // general avkon resources |
28 #include <aknnotpi.rsg> // keyguard spesific resources |
28 #include <aknnotpi.rsg> // keyguard spesific resources |
29 #include <AknUtils.h> |
29 #include <AknUtils.h> |
30 #include <activitymanager.h> |
30 #include <activitymanager.h> |
31 #include <SecondaryDisplay/AknSecondaryDisplayDefs.h> // publishing keyguard notes to secondary display |
31 // this is not needed |
|
32 // #include <SecondaryDisplay/AknSecondaryDisplayDefs.h> // publishing keyguard notes to secondary display |
32 #include <featmgr.h> // feature manager |
33 #include <featmgr.h> // feature manager |
33 #include <eikcba.h> // keyguard soft buttons |
34 #include <eikcba.h> // keyguard soft buttons |
34 #include <eikspane.h> |
35 #include <eikspane.h> |
35 |
36 |
36 #include "AutolockPrivateCRKeys.h" |
37 #include "AutolockPrivateCRKeys.h" |
37 #include <settingsinternalcrkeys.h> |
38 #include <settingsinternalcrkeys.h> |
38 // #include <ScreensaverInternalPSKeys.h> |
39 // #include <ScreensaverInternalPSKeys.h> |
39 #include <hwrmdomainpskeys.h> |
40 #include <hwrmdomainpskeys.h> |
40 #include <activeidle2domainpskeys.h> |
41 // #include <activeidle2domainpskeys.h> |
41 //#include <CoreApplicationUIsPrivateCRKeys.h> TODO remove |
42 //#include <CoreApplicationUIsPrivateCRKeys.h> TODO remove |
42 #include <coreapplicationuisdomainpskeys.h> |
43 #include <coreapplicationuisdomainpskeys.h> |
43 #include <ctsydomainpskeys.h> |
44 #include <ctsydomainpskeys.h> |
44 #include <startupdomainpskeys.h> |
45 #include <startupdomainpskeys.h> |
45 |
46 |
156 // Construct Keyguard Notes |
157 // Construct Keyguard Notes |
157 iKeypadLockedNote = new (ELeave) CLockAppLockedNote(); |
158 iKeypadLockedNote = new (ELeave) CLockAppLockedNote(); |
158 iKeypadLockedNote->ConstructSleepingNoteL( touchEnabled ? R_KEYLOCK_NOTE_DISPLAY_LOCK_ON_TOUCH : |
159 iKeypadLockedNote->ConstructSleepingNoteL( touchEnabled ? R_KEYLOCK_NOTE_DISPLAY_LOCK_ON_TOUCH : |
159 R_KEYLOCK_NOTE_LOCK_ON ); |
160 R_KEYLOCK_NOTE_LOCK_ON ); |
160 iKeypadLockedNote->ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition( 0, 2 ); |
161 iKeypadLockedNote->ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition( 0, 2 ); |
161 iKeypadLockedNote->PublishDialogL( EAknKeysLockedNote ); |
162 // this is not needed |
|
163 // iKeypadLockedNote->PublishDialogL( EAknKeysLockedNote ); |
162 |
164 |
163 iKeypadUnlockedNote = new (ELeave) CLockAppLockedNote(); |
165 iKeypadUnlockedNote = new (ELeave) CLockAppLockedNote(); |
164 iKeypadUnlockedNote->ConstructSleepingNoteL( touchEnabled ? R_KEYLOCK_NOTE_DISPLAY_LOCK_OFF_TOUCH : |
166 iKeypadUnlockedNote->ConstructSleepingNoteL( touchEnabled ? R_KEYLOCK_NOTE_DISPLAY_LOCK_OFF_TOUCH : |
165 R_KEYLOCK_NOTE_LOCK_OFF ); |
167 R_KEYLOCK_NOTE_LOCK_OFF ); |
166 iKeypadUnlockedNote->ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition( 0, 2 ); |
168 iKeypadUnlockedNote->ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition( 0, 2 ); |
167 iKeypadUnlockedNote->PublishDialogL( EAknKeysReleasedNote ); |
169 // this is not needed |
|
170 // iKeypadUnlockedNote->PublishDialogL( EAknKeysReleasedNote ); |
168 |
171 |
169 iLockedNote = new (ELeave) CLockAppLockedNote(); |
172 iLockedNote = new (ELeave) CLockAppLockedNote(); |
170 if ( touchEnabled ) |
173 if ( touchEnabled ) |
171 { |
174 { |
172 iLockedNote->ConstructSleepingNoteL( R_KEYLOCK_NOTE_DISPLAY_LOCKED_TOUCH ); |
175 iLockedNote->ConstructSleepingNoteL( R_KEYLOCK_NOTE_DISPLAY_LOCKED_TOUCH ); |
292 value = 0; |
295 value = 0; |
293 RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, value ); |
296 RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, value ); |
294 ongoingCall = (value > EPSCTsyCallStateNone); |
297 ongoingCall = (value > EPSCTsyCallStateNone); |
295 INFO_2("CLockAppKeyguardControl::AutoActivationAllowedL - ongoingCall: %d %d", value, ongoingCall); |
298 INFO_2("CLockAppKeyguardControl::AutoActivationAllowedL - ongoingCall: %d %d", value, ongoingCall); |
296 value = 0; |
299 value = 0; |
297 RProperty::Get( KPSUidAiInformation, KActiveIdleState, value ); |
300 // RProperty::Get( KPSUidAiInformation, KActiveIdleState, value ); |
298 idle = (value == EPSAiForeground); |
301 // idle = (value == EPSAiForeground); |
|
302 idle = ETrue; // don't care about idle state. Phone should autolock on any UI, not only HomeSreeen. |
299 INFO_2("CLockAppKeyguardControl::AutoActivationAllowedL - idle: %d %d", value, idle); |
303 INFO_2("CLockAppKeyguardControl::AutoActivationAllowedL - idle: %d %d", value, idle); |
300 value = 0; |
304 value = 0; |
301 /* This is not used any more because screensavers are removed now |
305 /* This is not used any more because screensavers are removed now |
302 RProperty::Get( KPSUidScreenSaver, KScreenSaverOn, value ); |
306 RProperty::Get( KPSUidScreenSaver, KScreenSaverOn, value ); |
303 screenSaverOn = (value > 0); |
307 screenSaverOn = (value > 0); |