phoneapp/phoneuiview/src/cphoneviewcontroller.cpp
branchRCL_3
changeset 14 b8d67d6176f5
parent 12 b68fcd923911
child 20 3c221667e687
equal deleted inserted replaced
12:b68fcd923911 14:b8d67d6176f5
   263     // if you are using sgc-client's session to capserver,
   263     // if you are using sgc-client's session to capserver,
   264     //you are not allowed to close the session.
   264     //you are not allowed to close the session.
   265     iAknUiServerClient = CAknSgcClient::AknSrv();
   265     iAknUiServerClient = CAknSgcClient::AknSrv();
   266     
   266     
   267     iIncallBubble = CAknIncallBubble::NewL();
   267     iIncallBubble = CAknIncallBubble::NewL();
       
   268     
       
   269     User::LeaveIfError( iSkinServerSession.Connect( this ) );
   268     }
   270     }
   269 
   271 
   270 // -----------------------------------------------------------------------------
   272 // -----------------------------------------------------------------------------
   271 // CPhoneViewController::NewL
   273 // CPhoneViewController::NewL
   272 // Two-phased constructor.
   274 // Two-phased constructor.
   288 // Destructor
   290 // Destructor
   289 CPhoneViewController::~CPhoneViewController()
   291 CPhoneViewController::~CPhoneViewController()
   290     {
   292     {
   291     __LOGMETHODSTARTEND( EPhoneUIView,
   293     __LOGMETHODSTARTEND( EPhoneUIView,
   292                         "CPhoneViewController::~CPhoneViewController()" );
   294                         "CPhoneViewController::~CPhoneViewController()" );
       
   295     iSkinServerSession.Close();
       
   296     
   293     delete iButtonsController;
   297     delete iButtonsController;
   294     delete iDialerController;
   298     delete iDialerController;
   295     delete iToolbarController;
   299     delete iToolbarController;
   296     iKeyLock.Close();
   300     iKeyLock.Close();
   297     delete iApplicationExit;
   301     delete iApplicationExit;
   640             break;  
   644             break;  
   641 
   645 
   642         case EPhoneViewLaunchMultimediaSharing:
   646         case EPhoneViewLaunchMultimediaSharing:
   643             {
   647             {
   644             LaunchMultimediaSharingL();
   648             LaunchMultimediaSharingL();
       
   649             }
       
   650             break;
       
   651 
       
   652         case EPhoneViewSetIncallBubbleTrue:
       
   653             {
       
   654             // Allow small call bubble, if call handling view is in background and allow for dialer also
       
   655             SetIncallBubbleVisibility( ETrue );
       
   656             }
       
   657             break;
       
   658 
       
   659         case EPhoneViewSetIncallBubbleFalse:
       
   660             {
       
   661             // Don't allow small call bubble, if call handling view is not in foreground
       
   662             SetIncallBubbleVisibility( EFalse );
   645             }
   663             }
   646             break;
   664             break;
   647 
   665 
   648         default:
   666         default:
   649             __PHONELOG( EBasic, EPhonePhoneapp,
   667             __PHONELOG( EBasic, EPhonePhoneapp,
  2169     iToolbarController->DimToolbar( aIsEnabled );			
  2187     iToolbarController->DimToolbar( aIsEnabled );			
  2170 	iPhoneView->SetSecurityMode( aIsEnabled );
  2188 	iPhoneView->SetSecurityMode( aIsEnabled );
  2171 	iMenuController->SetSecurityMode( aIsEnabled );
  2189 	iMenuController->SetSecurityMode( aIsEnabled );
  2172 	if ( iDialer )
  2190 	if ( iDialer )
  2173 		{
  2191 		{
  2174         CDialingExtensionInterface* easyDialing = iDialer->GetEasyDialingInterface();
  2192         iDialerController->SetRestrictedDialer( aIsEnabled );
  2175         if ( easyDialing )
  2193 	
  2176             {
  2194         if ( iDialerActive && iSecurityMode != aIsEnabled )
       
  2195             {
       
  2196             CDialingExtensionInterface* easyDialing = iDialer->GetEasyDialingInterface();
       
  2197             if ( easyDialing )
       
  2198                 {
       
  2199                 if ( aIsEnabled )
       
  2200                     {
       
  2201                     // Reset the Easy Dialing just in case, this clears the existing matches
       
  2202                     // when restricted mode is activated
       
  2203                     easyDialing->Reset();
       
  2204                     }
       
  2205                 else
       
  2206                     {
       
  2207                     if ( easyDialing->IsEnabled() )
       
  2208                         {
       
  2209                         // If Easy Dialing is enabled, set the input from the numeric entry
       
  2210                         // field for updating the search result when restricted mode is
       
  2211                         // deactivated.
       
  2212                         TBuf<KDialerInputMaxChars> buf;
       
  2213                         iDialer->NumberEntry()->GetTextFromNumberEntry( buf );
       
  2214                         TRAP_IGNORE( easyDialing->SetInputL( buf ) );
       
  2215                         }
       
  2216                     }
       
  2217                 }
       
  2218             iDialer->RelayoutAndDraw();
       
  2219             
       
  2220             // also update cba if security mode changes while dialer is open
       
  2221             TPhoneCmdParamInteger integerParam;
  2177             if ( aIsEnabled )
  2222             if ( aIsEnabled )
  2178                 {
  2223                 {
  2179                 // Reset the Easy Dialing just in case, this clears the existing matches
  2224                 iNoteController->DestroyNote();
  2180                 // when restricted mode is activated
  2225                 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()->
  2181                 easyDialing->Reset();
  2226                         ResolveResourceID( EPhoneEmergencyModeNoteCBA ) );
  2182                 }
  2227                 }
  2183             else
  2228             else
  2184                 {
  2229                 {
  2185                 if ( easyDialing->IsEnabled() )
  2230                 integerParam.SetInteger( CPhoneMainResourceResolver::Instance()->
  2186                     {
  2231                         ResolveResourceID( EPhoneNumberAcqCBA ) );
  2187                     // If Easy Dialing is enabled, set the input from the numeric entry
  2232                 }
  2188                     // field for updating the search result when restricted mode is
  2233             TRAP_IGNORE( ExecuteCommandL( EPhoneViewUpdateCba, &integerParam ) );
  2189                     // deactivated.
  2234             }
  2190                     TBuf<KDialerInputMaxChars> buf;
       
  2191                     iDialer->NumberEntry()->GetTextFromNumberEntry( buf );
       
  2192                     easyDialing->SetInputL( buf );
       
  2193                     }
       
  2194                 }
       
  2195             }
       
  2196         iDialerController->SetRestrictedDialer( aIsEnabled );
       
  2197 		if ( iSecurityMode != aIsEnabled )
       
  2198 			{
       
  2199 			iDialer->RelayoutAndDraw();
       
  2200 			}
       
  2201 		}
  2235 		}
  2202     if ( iSecurityMode != aIsEnabled )
  2236     if ( iSecurityMode != aIsEnabled )
  2203         {
  2237         {
  2204         // Update status pane dimming
  2238         // Update status pane dimming
  2205         iStatusPane->StatusPane().SetDimmed( aIsEnabled );
  2239         iStatusPane->StatusPane().SetDimmed( aIsEnabled );
  3709             //Save previous indicator control
  3743             //Save previous indicator control
  3710             iPreviousIndicatorControl =
  3744             iPreviousIndicatorControl =
  3711                                     iStatusPane->StatusPane().SwapControlL(
  3745                                     iStatusPane->StatusPane().SwapControlL(
  3712             TUid::Uid( EEikStatusPaneUidIndic ), iIndiContainer );
  3746             TUid::Uid( EEikStatusPaneUidIndic ), iIndiContainer );
  3713             }
  3747             }
  3714         else
  3748         else if ( iPreviousIndicatorControl )
  3715             {
  3749             {
  3716             //Restore previous indicator control
  3750             //Restore previous indicator control
  3717             iStatusPane->StatusPane().SwapControlL(
  3751             iStatusPane->StatusPane().SwapControlL(
  3718             TUid::Uid( EEikStatusPaneUidIndic ), iPreviousIndicatorControl );
  3752             TUid::Uid( EEikStatusPaneUidIndic ), iPreviousIndicatorControl );
  3719             }
  3753             }
  4126     {
  4160     {
  4127     __PHONELOG1( EBasic, EPhoneUIView,
  4161     __PHONELOG1( EBasic, EPhoneUIView,
  4128         "CPhoneViewController::SetIncallBubbleVisibility(%d)",
  4162         "CPhoneViewController::SetIncallBubbleVisibility(%d)",
  4129         aVisible );
  4163         aVisible );
  4130 
  4164 
  4131         TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( aVisible ) ); 
  4165     TRAP_IGNORE( iIncallBubble->SetIncallBubbleAllowedInUsualL( aVisible ) ); 
  4132     }
  4166     }
  4133 
  4167 
       
  4168 // ---------------------------------------------------------------------------
       
  4169 // CPhoneViewController::SkinContentChanged
       
  4170 // ---------------------------------------------------------------------------
       
  4171 //
       
  4172 void CPhoneViewController::SkinContentChanged()
       
  4173     {
       
  4174     __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneViewController::SkinContentChanged()" );
       
  4175     iPhoneView->DrawNow();
       
  4176     }
       
  4177 
       
  4178 // ---------------------------------------------------------------------------
       
  4179 // CPhoneViewController::SkinConfigurationChanged
       
  4180 // ---------------------------------------------------------------------------
       
  4181 //
       
  4182 void CPhoneViewController::SkinConfigurationChanged( const TAknsSkinStatusConfigurationChangeReason /*aReason*/ )
       
  4183     {
       
  4184     __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneViewController::SkinConfigurationChanged()" );
       
  4185     iPhoneView->DrawNow();
       
  4186     }
       
  4187 
       
  4188 // ---------------------------------------------------------------------------
       
  4189 // CPhoneViewController::SkinPackageChanged
       
  4190 // ---------------------------------------------------------------------------
       
  4191 //
       
  4192 void CPhoneViewController::SkinPackageChanged( const TAknsSkinStatusPackageChangeReason /*aReason*/ )
       
  4193     {
       
  4194     __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneViewController::SkinPackageChanged()" );
       
  4195     iPhoneView->DrawNow();
       
  4196     }
  4134 // End of File
  4197 // End of File