uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp
branchRCL_3
changeset 12 941195f2d488
parent 10 3d340a0166ff
child 13 a8834a2e9a96
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp	Tue May 25 12:58:19 2010 +0300
@@ -991,11 +991,7 @@
 
     TBool touchEnabled( AknLayoutUtils::PenEnabled() );
 
-	TBool hasSlider(iHardwareSupport != EKeyguardDefaultHardware);
-    if( FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard ) )
-    {
-	hasSlider = ETrue;  // the only purpose is to display empty sotkeys
-	}
+    TBool hasSlider = HasSliderKey();
     iKeyLockCba = CEikButtonGroupContainer::NewL(
                     CEikButtonGroupContainer::ECba,
                     CEikButtonGroupContainer::EHorizontal,
@@ -1157,8 +1153,8 @@
         {
         SendMessageToSysAp( EEikKeyLockEnabled );
         }
-
-    if ( !AknLayoutUtils::PenEnabled() || iHardwareSupport == EKeyguardDefaultHardware)
+    TBool hasSliderKey = HasSliderKey();
+    if ( !AknLayoutUtils::PenEnabled() || !hasSliderKey)
         {
         iKeyLockCba->MakeVisible( ETrue );
         }
@@ -1190,7 +1186,7 @@
         DisplayLockedNote();
         }
 
-    if ( !AknLayoutUtils::PenEnabled() || iHardwareSupport == EKeyguardDefaultHardware)
+    if ( !AknLayoutUtils::PenEnabled() || !hasSliderKey)
         {
         ShowKeylockCba();
         }
@@ -2071,6 +2067,16 @@
         }
     }
 
+TBool CAknKeyLockControl::HasSliderKey()
+    {
+    TBool hasSlider(iHardwareSupport != EKeyguardDefaultHardware);
+    if( FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard ) )
+        {
+        hasSlider = ETrue;  // the only purpose is to display empty sotkeys
+        }
+    return hasSlider;
+    }
+
 
 // ===========================================================================
 // class CAknKeyLockNotifierSubject
@@ -2379,6 +2385,7 @@
     {
     if ( IsKeyLockEnabled() )
         {
+        iKeyLockControl->AutolockEnabled( EFalse );
         iKeyLockControl->DisableKeylock();
         }
     }