# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277124085 -10800 # Node ID 98bf2adac59c6f062c6910036c0f92fbd8bb9aff # Parent 1f307dce3b5a6df1285a2967a80270470eabe174 Revision: 201023 Kit: 2010125 diff -r 1f307dce3b5a -r 98bf2adac59c inc/screensavershareddatai.h --- 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: /** diff -r 1f307dce3b5a -r 98bf2adac59c src/screensaverbase.cpp --- 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 { diff -r 1f307dce3b5a -r 98bf2adac59c src/screensaverengine.cpp --- 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; } diff -r 1f307dce3b5a -r 98bf2adac59c src/screensavershareddatai.cpp --- 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 // KAknNewContactsNoteActive #include // KAknKeyguardStatus #include // Message (voice) waiting status +#include // KCTsyCallState #include // KPSGlobalSystemState #include #include // 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 // ----------------------------------------------------------------------------- diff -r 1f307dce3b5a -r 98bf2adac59c src/screensaverutility.cpp --- 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(CCoeEnv::Static()->AppUi())->IsForeground() ) + { + GfxTransEffect::BeginFullScreen( KSsaCustomDeactivateContextNum, TRect( ), AknTransEffect::EParameterType, AknTransEffect::GfxTransParam( KUidScreensaverApp, AknTransEffect::TParameter::EActivateExplicitContinue ) ); + } } - CAknTransitionUtils::RemoveData( KScreensaverCallStateChange ); #endif