phoneapp/phoneuiview/src/cphonemenucontroller.cpp
branchRCL_3
changeset 6 38529f706030
parent 4 24062c24fe38
child 7 544e34b3255a
--- a/phoneapp/phoneuiview/src/cphonemenucontroller.cpp	Mon Mar 15 12:40:24 2010 +0200
+++ b/phoneapp/phoneuiview/src/cphonemenucontroller.cpp	Wed Mar 31 21:30:06 2010 +0300
@@ -285,28 +285,37 @@
                 break;
  
             case EPhoneNumberAcqCmdSendMessage:            
-                if ( iNumberEntryEmpty || iInvalidCsPhoneNumber )
+                if ( iNumberEntryEmpty || iInvalidCsPhoneNumber || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] ); 
                     }
-                break;                    
+                break;    
+                
+            case EPhoneInCallCmdSendToCallerMenu:
+            	{
+            	if ( iSecurityMode )
+            		{
+            		menuPane->DeleteMenuItem( menuItemArray[ i ] ); 
+            		}
+            	}
+            break;
                                 
             case EPhoneNumberAcqCmdSendCommand:
-                if ( !iServiceCodeFlag || iNumberEntryEmpty )
+                if ( !iServiceCodeFlag || iNumberEntryEmpty || iInvalidCsPhoneNumber )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] );
                     }
                 break;
                 
             case EPhoneNumberAcqCmdToggleNeAlphaMode:
-                if ( iAlphaMode )
+                if ( iAlphaMode || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] );
                     }
                 break;
                          
             case EPhoneNumberAcqCmdToggleNeNumericMode:
-                if ( !iAlphaMode )
+                if ( !iAlphaMode || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] );
                     }
@@ -314,7 +323,7 @@
                 
                 
             case EPhoneInCallCmdGoToIdle:
-                if ( iNEVisible )
+                if ( iNEVisible || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] );    
                     }
@@ -365,7 +374,7 @@
                 break;
                 
             case EPhoneCallComingCmdSoftReject:
-                if ( !iSoftRejectFlag )
+                if ( !iSoftRejectFlag || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[ i ] );
                     }
@@ -470,7 +479,7 @@
                 break;
             case EPhoneDialerCmdLog:
                 {
-                if ( onScreenDialer && !iNumberEntryEmpty  )
+                if ( ( onScreenDialer && !iNumberEntryEmpty  )  || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[i] );                    
                     }                
@@ -478,7 +487,7 @@
                 break;
             case EPhoneDialerCmdContacts:
                 {
-                if ( onScreenDialer && !iNumberEntryEmpty   )
+                if ( ( onScreenDialer && !iNumberEntryEmpty  ) || iSecurityMode ) 
                     {
                     menuPane->DeleteMenuItem( menuItemArray[i] );                    
                     }                
@@ -487,7 +496,7 @@
 
             case EPhoneNumberAcqCmdAddToContacts:
                 {
-                if ( onScreenDialer && iNumberEntryEmpty )
+                if ( ( onScreenDialer && iNumberEntryEmpty ) || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[i] );                    
                     }                
@@ -495,7 +504,7 @@
                 break;
             case EPhoneDialerCmdSpeedDial:
                 {
-                if ( onScreenDialer && !iNumberEntryEmpty )
+                if ( ( onScreenDialer && !iNumberEntryEmpty ) || iSecurityMode )
                     {
                     menuPane->DeleteMenuItem( menuItemArray[i] );                         
                     }
@@ -882,7 +891,8 @@
          aResourceId == R_PHONEUI_INCOMINGCALL_MENUBAR_WITH_NUMBERENTRY ||
          aResourceId == R_PHONEUI_INCOMINGVIDEOCALL_MENUBAR_WITH_NUMBERENTRY ||
          aResourceId == R_PHONEUI_WAITING_LOCK_MENUBAR ||
-         aResourceId == R_PHONEUI_TWOSINGLES_WAITING_LOCK_MENUBAR  )
+         aResourceId == R_PHONEUI_TWOSINGLES_WAITING_LOCK_MENUBAR ||
+         iSecurityMode )
         {
         iMenu->SetMenuType( CEikMenuBar::EMenuOptionsNoTaskSwapper );
         }
@@ -1070,6 +1080,16 @@
 // CPhoneMenuController::HandlePropertyChangedL
 // ---------------------------------------------------------
 //
+void CPhoneMenuController::SetSecurityMode( TBool aIsEnabled )
+	{
+	__PHONELOG1( EBasic, EPhoneUIView, "CPhoneViewController::SetSecurityMode %d ", aIsEnabled );
+	iSecurityMode = aIsEnabled;
+	}
+
+// ---------------------------------------------------------
+// CPhoneMenuController::HandlePropertyChangedL
+// ---------------------------------------------------------
+//
 void CPhoneMenuController::HandlePropertyChangedL( 
         const TUid& aCategory,
         const TUint aKey,