idlehomescreen/xmluicontroller/src/appui.cpp
branchRCL_3
changeset 30 b8fae6b8a148
parent 16 9674c1a575e9
child 34 d05a55b217df
equal deleted inserted replaced
16:9674c1a575e9 30:b8fae6b8a148
    83     __TICK( "CAppUi::ConstructL" );
    83     __TICK( "CAppUi::ConstructL" );
    84     
    84     
    85     // Always reset the phoneforward P&S key on startup just in case
    85     // Always reset the phoneforward P&S key on startup just in case
    86     RProperty::Set( KPSUidAiInformation,
    86     RProperty::Set( KPSUidAiInformation,
    87       KActiveIdleForwardNumericKeysToPhone, EPSAiForwardNumericKeysToPhone );
    87       KActiveIdleForwardNumericKeysToPhone, EPSAiForwardNumericKeysToPhone );
    88 
    88         
    89     iEditModeTitle = StringLoader::LoadL( R_QTN_HS_TITLE_EDITMODE );
    89     iEditModeTitle = StringLoader::LoadL( R_QTN_HS_TITLE_EDITMODE );
    90     
    90     
    91     // Initialize with empty title pane so it's not shown on startup.                  
    91     // Initialize with empty title pane so it's not shown on startup.                  
    92     __HEAP("XML UI: Init - Construct App UI")
    92     __HEAP("XML UI: Init - Construct App UI")
       
    93     
    93     __TIME("XML UI: CXnAppUiAdapter::ConstructL",
    94     __TIME("XML UI: CXnAppUiAdapter::ConstructL",
    94         CXnAppUiAdapter::ConstructL();       
    95         CXnAppUiAdapter::ConstructL() );       
    95     ) 
       
    96       
    96       
    97     CAknAppUiBase::SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort |
    97     CAknAppUiBase::SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort |
    98                                      CAknAppUiBase::EDisableSendKeyLong );
    98                                      CAknAppUiBase::EDisableSendKeyLong );
    99     
    99     
   100     // Register for XML UI view activation & deactivation
   100     // Register for XML UI view activation & deactivation
   165 // CAppUi::ActivateUi()
   165 // CAppUi::ActivateUi()
   166 // ----------------------------------------------------------------------------
   166 // ----------------------------------------------------------------------------
   167 //
   167 //
   168 void CAppUi::ActivateUi()
   168 void CAppUi::ActivateUi()
   169     {
   169     {
   170     __TICK( "CAppUi::ActivateUi" );
   170     __PRINTS( "*** CAppUi::ActivateUi" );
   171     
   171        
   172     TVwsViewId activeViewId;
       
   173         
       
   174     TInt err( GetActiveViewId( activeViewId ) );
       
   175     
       
   176     if ( err == KErrNotFound )
       
   177         {    
       
   178         // Get Xml Ui view id
       
   179         TVwsViewId xmlViewId( View().ViewId() );
       
   180     
       
   181         TRAP_IGNORE( ActivateLocalViewL( xmlViewId.iViewUid ) );              
       
   182         }                  
       
   183 
       
   184     if ( iDeviceStatusInfo.Uid() == TUid::Null() )
   172     if ( iDeviceStatusInfo.Uid() == TUid::Null() )
   185         {
   173         {
   186         __PRINTS( "*** CAppUi::ActivateUI - Loading DeviceStatus plugin" );
   174         __PRINTS( "*** CAppUi::ActivateUI - Loading DeviceStatus plugin" );
   187         
   175         
   188         _LIT8( KNs, "namespace" );
   176         _LIT8( KNs, "namespace" );
   190         // Load device status plugin here because it is always needed    
   178         // Load device status plugin here because it is always needed    
   191         iDeviceStatusInfo = THsPublisherInfo( KDeviceStatusPluginUid, 
   179         iDeviceStatusInfo = THsPublisherInfo( KDeviceStatusPluginUid, 
   192             KDeviceStatusPluginName, KNs ); 
   180             KDeviceStatusPluginName, KNs ); 
   193                            
   181                            
   194         iUiCtl.FwStateHandler()->LoadPlugin( 
   182         iUiCtl.FwStateHandler()->LoadPlugin( 
   195             iDeviceStatusInfo, EAiFwSystemStartup );                                       
   183             iDeviceStatusInfo, EAiFwSystemStartup );                                           
   196         }
   184         }        
   197     
       
   198     TRAP_IGNORE( iUiCtl.FwEventHandler()->HandleUiReadyEventL( iUiCtl ) );
       
   199     
   185     
   200     __PRINTS( "*** CAppUi::ActivateUi - done" );
   186     __PRINTS( "*** CAppUi::ActivateUi - done" );
       
   187     }
       
   188 
       
   189 // ----------------------------------------------------------------------------
       
   190 // CAppUi::HandleUiReadyEventL()
       
   191 // ----------------------------------------------------------------------------
       
   192 //
       
   193 void CAppUi::HandleUiReadyEventL()
       
   194     {
       
   195     __PRINTS( "*** CAppUi::HandleUiReadyEventL" );
       
   196     
       
   197     iUiCtl.FwEventHandler()->HandleUiReadyEventL( iUiCtl );
       
   198     
       
   199     __PRINTS( "*** CAppUi::HandleUiReadyEventL - done" );    
   201     }
   200     }
   202 
   201 
   203 // ----------------------------------------------------------------------------
   202 // ----------------------------------------------------------------------------
   204 // CAppUi::PrepareToExit()
   203 // CAppUi::PrepareToExit()
   205 // ----------------------------------------------------------------------------
   204 // ----------------------------------------------------------------------------