src/screensavershareddatamonitor.cpp
branchRCL_3
changeset 11 b3594157d381
parent 10 25957ccd51ab
child 15 0bfd55b8504e
--- a/src/screensavershareddatamonitor.cpp	Fri Mar 12 15:42:50 2010 +0200
+++ b/src/screensavershareddatamonitor.cpp	Mon Mar 15 12:40:37 2010 +0200
@@ -199,9 +199,9 @@
 // MMC, screensaver defaults to date & time when MMC removed
 // -----------------------------------------------------------------------------
 //
-TInt CScreensaverSharedDataMonitor::HandleMMCStateChanged(TAny* aPtr)
+TInt CScreensaverSharedDataMonitor::HandleMMCStateChanged(TAny* /*aPtr*/)
     {
-    STATIC_CAST(CScreensaverSharedDataMonitor*, aPtr)->Model().StopScreenSaver();
+    User::ResetInactivityTime();
     return KErrNone;
     }
 
@@ -211,10 +211,10 @@
 // MMC, screensaver defaults to date & time when USB attached
 // -----------------------------------------------------------------------------
 //
-TInt CScreensaverSharedDataMonitor::HandleUSBStateChanged(TAny* aPtr)
+TInt CScreensaverSharedDataMonitor::HandleUSBStateChanged(TAny* /*aPtr*/)
     {
     // Same handler as in MMC removal, parameter tells it's because of USB
-    STATIC_CAST(CScreensaverSharedDataMonitor*, aPtr)->Model().StopScreenSaver();
+    User::ResetInactivityTime();
     return KErrNone;
     }
 
@@ -238,22 +238,7 @@
     CScreensaverSharedDataMonitor* _this =
         STATIC_CAST(CScreensaverSharedDataMonitor*, aPtr);
 
-    if ( _this->iData->IsKeyguardOn() )
-        {
-        // Keys locked - if screensaver is running, this was caused by
-        // automatic keyguard and screensaver should refresh the view
-        // to show the keylock indicator
-/*        if ( _this->Model().ScreenSaverIsOn() )
-            {
-            _this->View()->UpdateAndRefresh();
-            }
-*/
-        _this->Model().StartScreenSaver();
-        }
-    else
-        {
-        _this->Model().StopScreenSaver();
-        }
+    _this->Model().HandleKeyguardStateChanged( _this->iData->IsKeyguardOn() );
 
     return KErrNone;
     }