idlefw/src/idleint/aiuiidleintegration.cpp
branchRCL_3
changeset 101 9e077f9a342c
parent 82 ace62b58f4b2
--- a/idlefw/src/idleint/aiuiidleintegration.cpp	Wed Jun 09 10:01:25 2010 +0300
+++ b/idlefw/src/idleint/aiuiidleintegration.cpp	Mon Jun 21 16:00:38 2010 +0300
@@ -221,8 +221,6 @@
 //
 void CAiUiIdleIntegrationImpl::SetCallBubbleIfNeededL()
 	{
-    __PRINTS( "*** CAiUiIdleIntegrationImpl::SetCallBubbleIfNeededL" );
-    
     if( !iIncallBubbleAllowed )
     	{
         TInt callStatus( 0 );
@@ -234,11 +232,8 @@
         // Call ongoing => show bubble
 	  	if( err == KErrNone && callStatus > EPSCTsyCallStateNone )
 	      	{
-			__PRINTS( "*** CAiUiIdleIntegrationImpl::SetCallBubbleIfNeededL - enable" );
-
-            iIncallBubble->SetIncallBubbleAllowedInUsualL( ETrue );
-            iIncallBubble->SetIncallBubbleAllowedInIdleL( ETrue );
-            iIncallBubbleAllowed = ETrue;
+	       	iIncallBubble->SetIncallBubbleAllowedInIdleL( ETrue );                	
+	       	iIncallBubbleAllowed = ETrue;
 	       	}    
     	}
 	}
@@ -249,16 +244,11 @@
 //
 void CAiUiIdleIntegrationImpl::ClearCallBubbleL()
 	{
-    __PRINTS( "*** CAiUiIdleIntegrationImpl::ClearCallBubbleL" );
-
 	 if( iIncallBubbleAllowed )
     	{
-         __PRINTS( "*** CAiUiIdleIntegrationImpl::ClearCallBubbleL - disable" );
-
     	iIncallBubble->SetIncallBubbleAllowedInIdleL( EFalse );
-    	iIncallBubble->SetIncallBubbleAllowedInUsualL( EFalse );
     	iIncallBubbleAllowed = EFalse;
-    	}
+    	}        
 	}
     
 // ----------------------------------------------------------------------------
@@ -292,16 +282,34 @@
 	if ( err == KErrNone )
 		{
 		// Call ongoing => show bubble if not showing already
+		TBool allowed = EFalse;
+		
 		if ( !self->iIncallBubbleAllowed &&
 		     self->iForeground &&
 		    ( callStatus > EPSCTsyCallStateNone ) )
 			{
-            TRAP_IGNORE( self->SetCallBubbleIfNeededL() );
+			allowed = ETrue;
+    		
+			TRAP( err, 
+                self->iIncallBubble->SetIncallBubbleAllowedInIdleL( allowed ) );
+			            		
+			if ( err == KErrNone )
+    		    {
+    			self->iIncallBubbleAllowed = allowed;
+    		    }
 			}
 		// No call ongoing => hide if bubble is visible			
 		else if ( self->iIncallBubbleAllowed && callStatus <= EPSCTsyCallStateNone )
 			{
-    		TRAP_IGNORE( self->ClearCallBubbleL() );
+			allowed = EFalse;
+			
+    		TRAP( err, 
+                self->iIncallBubble->SetIncallBubbleAllowedInIdleL( allowed ) );
+    		
+    		if ( err == KErrNone )
+    		    {
+    			self->iIncallBubbleAllowed = allowed;
+    		    }
 			}
 		}