locationtriggering/ltserver/ltserverlogic/src/lbtappchangehandler.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 0 667063e416a2
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
   146 			{
   146 			{
   147 			// This application has be uninstalled/removed
   147 			// This application has be uninstalled/removed
   148 			TLbtAppInfo appInfo = iCurrentInstalledApps[i];
   148 			TLbtAppInfo appInfo = iCurrentInstalledApps[i];
   149 			
   149 			
   150 			// The removed application resided in the MMC card
   150 			// The removed application resided in the MMC card
   151 			iAppList.Append( appInfo );
   151 			TInt error = iAppList.Append( appInfo );
       
   152 			if( error != KErrNone )
       
   153 			    {
       
   154                 LOG1("Failed to append appInfo:%d",error);
       
   155                 return;
       
   156 			    }
   152 						
   157 						
   153 			// Check if the application resides in MMC
   158 			// Check if the application resides in MMC
   154 			if( appInfo.iFullName.FindC(iMMCDriveChar) >= 0 )
   159 			if( appInfo.iFullName.FindC(iMMCDriveChar) >= 0 )
   155 				{
   160 				{
   156 				appsInMMC = ETrue;				
   161 				appsInMMC = ETrue;				
   199 			TLbtAppInfo appInfo = aNewAppList[i];
   204 			TLbtAppInfo appInfo = aNewAppList[i];
   200 			
   205 			
   201 			if( appInfo.iFullName.FindC( iMMCDriveChar ) >= 0 )
   206 			if( appInfo.iFullName.FindC( iMMCDriveChar ) >= 0 )
   202 				{				
   207 				{				
   203 				// Append to the array only if the application resides on the MMC
   208 				// Append to the array only if the application resides on the MMC
   204 				iAppList.Append( appInfo );
   209 				TInt error = iAppList.Append( appInfo );
       
   210 				if( error != KErrNone )
       
   211 				    {
       
   212                     LOG1("Failed to append appInfo to the array:%d",error);
       
   213                     return;
       
   214 				    }
   205 				}
   215 				}
   206 			}
   216 			}
   207 		}
   217 		}
   208 	if(iAppList.Count() > 0)
   218 	if(iAppList.Count() > 0)
   209 		{
   219 		{
   312 		
   322 		
   313 	iCurrentInstalledApps.Reset();
   323 	iCurrentInstalledApps.Reset();
   314 	
   324 	
   315 	for( TInt i=0;i<newAppList.Count();i++ )
   325 	for( TInt i=0;i<newAppList.Count();i++ )
   316 	    {
   326 	    {
   317 	    iCurrentInstalledApps.Append( newAppList[i] );
   327 	    TInt error = iCurrentInstalledApps.Append( newAppList[i] );
       
   328 	    if( error != KErrNone )
       
   329 	        {
       
   330             LOG1("Failed to append new applist to the array:%d",error);
       
   331             break;
       
   332 	        }
   318 	    }
   333 	    }
   319 	newAppList.Close();
   334 	newAppList.Close();
   320 	}
   335 	}
   321 
   336 
   322 // ---------------------------------------------------------------------------
   337 // ---------------------------------------------------------------------------
   643 				// The list operation is a success. Hence invalidate the triggers now
   658 				// The list operation is a success. Hence invalidate the triggers now
   644 				RArray<TLbtTriggerId> triggerIds;
   659 				RArray<TLbtTriggerId> triggerIds;
   645 				
   660 				
   646 				for(TInt i=0;i<iTriggerEntries.Count();++i)
   661 				for(TInt i=0;i<iTriggerEntries.Count();++i)
   647 					{
   662 					{
   648 					triggerIds.Append(iTriggerEntries[i]->TriggerEntry()->Id());
   663 					triggerIds.AppendL(iTriggerEntries[i]->TriggerEntry()->Id());
   649 					}
   664 					}
   650 				
   665 				
   651 				TLbtTriggerDynamicInfo::TLbtTriggerValidity validity;
   666 				TLbtTriggerDynamicInfo::TLbtTriggerValidity validity;
   652 				
   667 				
   653 				if(iOperation == EOpMMCRemovalListingTriggerForStartupProcess)
   668 				if(iOperation == EOpMMCRemovalListingTriggerForStartupProcess)