idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp
branchRCL_3
changeset 130 67f2ed48ad91
parent 118 8baec10861af
equal deleted inserted replaced
122:6cadd6867c17 130:67f2ed48ad91
   192     
   192     
   193 TInt CAiContentObserverOptimizer::Clean( CHsContentPublisher& aPlugin,
   193 TInt CAiContentObserverOptimizer::Clean( CHsContentPublisher& aPlugin,
   194                                      TInt aContent,
   194                                      TInt aContent,
   195                                      TInt aIndex )
   195                                      TInt aIndex )
   196     {
   196     {
   197     if ( IsInBlackList( aContent, aIndex ) )
   197     return iObserver.Clean( aPlugin, aContent, aIndex );    
   198         {
       
   199         return KErrNotFound;
       
   200         }    
       
   201     TInt err = iObserver.Clean( aPlugin, aContent, aIndex );
       
   202     // Publish went through OK, we need to commit the transaction
       
   203     if ( err == KErrNone && iTransactionStarted )
       
   204         {
       
   205         iCommitNeeded = ETrue;
       
   206         }
       
   207     // publish failed because the ui declaration doesn't
       
   208     // include this content => add to black list and 
       
   209     // don't try to publish again
       
   210     else if ( err == KErrNotFound || err == KErrNotSupported )
       
   211         {
       
   212         AddToBlackList( aContent, aIndex );
       
   213         }
       
   214     return err;
       
   215     }
   198     }
   216 
   199 
   217 MAiContentObserver& CAiContentObserverOptimizer::Observer() const
   200 MAiContentObserver& CAiContentObserverOptimizer::Observer() const
   218     {
   201     {
   219     return iObserver;
   202     return iObserver;