idlefw/plugins/devicestatus/src/aicontentobserveroptimizer.cpp
branchRCL_3
changeset 31 8baec10861af
parent 30 a5a39a295112
equal deleted inserted replaced
30:a5a39a295112 31:8baec10861af
   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     return iObserver.Clean( aPlugin, aContent, aIndex );    
   197     if ( IsInBlackList( 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;
   198     }
   215     }
   199 
   216 
   200 MAiContentObserver& CAiContentObserverOptimizer::Observer() const
   217 MAiContentObserver& CAiContentObserverOptimizer::Observer() const
   201     {
   218     {
   202     return iObserver;
   219     return iObserver;