--- a/inc/screensavershareddatai.h Wed Jun 09 09:42:47 2010 +0300
+++ b/inc/screensavershareddatai.h Mon Jun 21 15:41:25 2010 +0300
@@ -223,6 +223,13 @@
* @return ETrue, if vibra mode is on
*/
TBool IsVibraMode();
+
+ /**
+ * Query call state
+ *
+ * @return ETrue if a call is ongoing
+ */
+ TBool IsOngoingCall();
public:
/**
--- a/src/screensaverbase.cpp Wed Jun 09 09:42:47 2010 +0300
+++ b/src/screensaverbase.cpp Mon Jun 21 15:41:25 2010 +0300
@@ -174,6 +174,8 @@
startLine, endLine );
TUint16* addr = ( TUint16* )iOffScrnBmp->DataAddress();
err = LcdPartialMode()->Set( startLine, endLine, addr, aFullColors );
+
+ Model().SharedDataInterface()->SetSSForcedLightsOn( 0 );
}
else
{
--- a/src/screensaverengine.cpp Wed Jun 09 09:42:47 2010 +0300
+++ b/src/screensaverengine.cpp Mon Jun 21 15:41:25 2010 +0300
@@ -745,7 +745,7 @@
{
SCRLOGGER_WRITE("HandleActiveEventL(), stop if previewing");
CScreensaverEngine* _this= STATIC_CAST(CScreensaverEngine*, aPtr);
- if ( _this->iScreenSaverIsPreviewing )
+ if ( !_this->iSharedDataI->IsKeyguardOn() )
{
_this->StopScreenSaver();
}
@@ -770,7 +770,10 @@
// Double-start is OK, it will be checked in StartScreenSaver()
// This will be trigged by keylock activation after keyguard
// timeout, or if keylock is disabled
- _this->StartScreenSaver( );
+ if ( !_this->iSharedDataI->IsOngoingCall() )
+ {
+ _this->StartScreenSaver( );
+ }
return KErrNone;
}
--- a/src/screensavershareddatai.cpp Wed Jun 09 09:42:47 2010 +0300
+++ b/src/screensavershareddatai.cpp Mon Jun 21 15:41:25 2010 +0300
@@ -30,6 +30,7 @@
#include <AvkonInternalCRKeys.h> // KAknNewContactsNoteActive
#include <avkondomainpskeys.h> // KAknKeyguardStatus
#include <ctsydomaincrkeys.h> // Message (voice) waiting status
+#include <ctsydomainpskeys.h> // KCTsyCallState
#include <startupdomainpskeys.h> // KPSGlobalSystemState
#include <AknSkinsInternalCRKeys.h>
#include <MProfileEngine.h> // Profile engine API
@@ -578,6 +579,20 @@
return EFalse;
}
+// ---------------------------------------------------------------------------
+// CScreensaverSharedDataI::IsOngoingCall()
+// ---------------------------------------------------------------------------
+//
+TBool CScreensaverSharedDataI::IsOngoingCall()
+ {
+ TInt state = EPSCTsyCallStateUninitialized;
+ // Check the call state from PubSub
+ RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, state );
+
+ return ( state != EPSCTsyCallStateNone &&
+ state != EPSCTsyCallStateUninitialized );
+ }
+
// -----------------------------------------------------------------------------
// CScreensaverSharedDataI::HandleSessionEventL
// -----------------------------------------------------------------------------
--- a/src/screensaverutility.cpp Wed Jun 09 09:42:47 2010 +0300
+++ b/src/screensaverutility.cpp Mon Jun 21 15:41:25 2010 +0300
@@ -122,12 +122,14 @@
//condition takes care of special case of incomeing call (should not have effect then)
if ( CAknTransitionUtils::GetData( KScreensaverCallStateChange ) == NULL )
{
- GfxTransEffect::BeginFullScreen( KSsaCustomDeactivateContextNum,
+ if ( static_cast<CScreensaverAppUi*>(CCoeEnv::Static()->AppUi())->IsForeground() )
+ {
+ GfxTransEffect::BeginFullScreen( KSsaCustomDeactivateContextNum,
TRect( ), AknTransEffect::EParameterType,
AknTransEffect::GfxTransParam( KUidScreensaverApp,
AknTransEffect::TParameter::EActivateExplicitContinue ) );
+ }
}
-
CAknTransitionUtils::RemoveData( KScreensaverCallStateChange );
#endif