idlehomescreen/widgetmanager/src/wmeffectmanager.cpp
branchRCL_3
changeset 84 20d75ec6647e
parent 83 5456b4e8b3a8
parent 52 a1e3af341cc7
child 89 9f918e984081
equal deleted inserted replaced
83:5456b4e8b3a8 84:20d75ec6647e
    49 // Symbian 2nd phase constructor.
    49 // Symbian 2nd phase constructor.
    50 // -----------------------------------------------------------------------------
    50 // -----------------------------------------------------------------------------
    51 //
    51 //
    52 void CWmEffectManager::ConstructL()
    52 void CWmEffectManager::ConstructL()
    53     {
    53     {
       
    54 #ifndef NO_ALF_OBSERVER
    54     iObserver = CAlfEffectObserver::NewL(); 
    55     iObserver = CAlfEffectObserver::NewL(); 
       
    56 #endif
    55     }
    57     }
    56 
    58 
    57 // -----------------------------------------------------------------------------
    59 // -----------------------------------------------------------------------------
    58 // Two-phased constructor.
    60 // Two-phased constructor.
    59 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
   158 // CWmEffectManager::WaitActiveEffect
   160 // CWmEffectManager::WaitActiveEffect
   159 // -----------------------------------------------------------------------------
   161 // -----------------------------------------------------------------------------
   160 //
   162 //
   161 TBool CWmEffectManager::WaitActiveEffect( TInt aInterval )     
   163 TBool CWmEffectManager::WaitActiveEffect( TInt aInterval )     
   162     {
   164     {
       
   165     if (iObserver == NULL)
       
   166         {
       
   167         return ETrue;
       
   168         }
       
   169 
   163     TBool retval( EFalse );
   170     TBool retval( EFalse );
   164     TInt loop( aInterval / KWaitInterval );
   171     TInt loop( aInterval / KWaitInterval );
   165     
   172     
   166     while ( loop >= 0 )
   173     while ( loop >= 0 )
   167         {               
   174         {               
   200 // -----------------------------------------------------------------------------
   207 // -----------------------------------------------------------------------------
   201 //
   208 //
   202 TBool CWmEffectManager::IsEffectActive()
   209 TBool CWmEffectManager::IsEffectActive()
   203     {
   210     {
   204     TBool retVal( EFalse );
   211     TBool retVal( EFalse );
   205     if ( iObserver->ActiveEffectsCount() )
   212     if ( iObserver != NULL && iObserver->ActiveEffectsCount() )
   206         retVal = ETrue;
   213         retVal = ETrue;
   207     return retVal;
   214     return retVal;
   208     }
   215     }
   209 
   216 
   210 // End fo file
   217 // End fo file