82 { |
82 { |
83 __TICK( "CAppUi::ConstructL" ); |
83 __TICK( "CAppUi::ConstructL" ); |
84 |
84 |
85 iUiCtl.SetAppUi( *this ); |
85 iUiCtl.SetAppUi( *this ); |
86 |
86 |
|
87 iCoeEnv->DisableExitChecks( ETrue ); |
|
88 |
|
89 TRAPD( err, DoConstructL() ); |
|
90 |
|
91 if ( err ) |
|
92 { |
|
93 __TICK( "CAppUi::ConstructL - failed" ); |
|
94 |
|
95 // HandleUiShutdown must be called here |
|
96 // to free all control environment dependent framework objects |
|
97 iUiCtl.FwEventHandler()->HandleUiShutdown( iUiCtl ); |
|
98 } |
|
99 |
|
100 User::LeaveIfError( err ); |
|
101 |
|
102 __TICK( "CAppUi::ConstructL - done" ); |
|
103 } |
|
104 |
|
105 // ---------------------------------------------------------------------------- |
|
106 // CAppUi::DoConstructL() |
|
107 // ---------------------------------------------------------------------------- |
|
108 // |
|
109 void CAppUi::DoConstructL() |
|
110 { |
87 iUiCtl.NotifyAppEnvReadyL(); |
111 iUiCtl.NotifyAppEnvReadyL(); |
88 |
112 |
89 // Always reset the phoneforward P&S key on startup just in case |
113 // Always reset the phoneforward P&S key on startup just in case |
90 RProperty::Set( KPSUidAiInformation, |
114 RProperty::Set( KPSUidAiInformation, |
91 KActiveIdleForwardNumericKeysToPhone, EPSAiForwardNumericKeysToPhone ); |
115 KActiveIdleForwardNumericKeysToPhone, EPSAiForwardNumericKeysToPhone ); |
92 |
116 |
93 iEditModeTitle = StringLoader::LoadL( R_QTN_HS_TITLE_EDITMODE ); |
|
94 |
|
95 // Initialize with empty title pane so it's not shown on startup. |
117 // Initialize with empty title pane so it's not shown on startup. |
96 __HEAP("XML UI: Init - Construct App UI") |
118 __HEAP("XML UI: Init - Construct App UI") |
97 |
119 |
98 __TIME("XML UI: CXnAppUiAdapter::ConstructL", |
120 __TIME("XML UI: CXnAppUiAdapter::ConstructL", |
99 CXnAppUiAdapter::ConstructL() ); |
121 CXnAppUiAdapter::ConstructL() ); |
100 |
122 |
101 CAknAppUiBase::SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort | |
123 CAknAppUiBase::SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort | |
102 CAknAppUiBase::EDisableSendKeyLong ); |
124 CAknAppUiBase::EDisableSendKeyLong ); |
103 |
125 |
|
126 iEditModeTitle = StringLoader::LoadL( R_QTN_HS_TITLE_EDITMODE ); |
|
127 |
104 // Register for XML UI view activation & deactivation |
128 // Register for XML UI view activation & deactivation |
105 AddViewActivationObserverL( this ); |
129 AddViewActivationObserverL( this ); |
106 |
130 |
107 // Disable CCoeEnv exit checks. |
|
108 // Active Idle Framework will perform the checks. |
|
109 iCoeEnv->DisableExitChecks( ETrue ); |
|
110 |
|
111 __TIME("XML UI: Construct Content Renderer", |
131 __TIME("XML UI: Construct Content Renderer", |
112 iContentRenderer = CContentRenderer::NewL( *this ); |
132 iContentRenderer = CContentRenderer::NewL( *this ); |
113 ) |
133 ) |
114 __HEAP("XML UI: Construct Content Renderer"); |
134 __HEAP("XML UI: Construct Content Renderer"); |
115 |
135 |
165 // CAppUi::ActivateUi() |
185 // CAppUi::ActivateUi() |
166 // ---------------------------------------------------------------------------- |
186 // ---------------------------------------------------------------------------- |
167 // |
187 // |
168 void CAppUi::ActivateUi() |
188 void CAppUi::ActivateUi() |
169 { |
189 { |
170 __PRINTS( "*** CAppUi::ActivateUi" ); |
|
171 |
|
172 if ( iDeviceStatusInfo.Uid() == TUid::Null() ) |
|
173 { |
|
174 __PRINTS( "*** CAppUi::ActivateUI - Loading DeviceStatus plugin" ); |
|
175 |
|
176 _LIT8( KNs, "namespace" ); |
|
177 |
|
178 // Load device status plugin here because it is always needed |
|
179 iDeviceStatusInfo = THsPublisherInfo( KDeviceStatusPluginUid, |
|
180 KDeviceStatusPluginName, KNs ); |
|
181 |
|
182 TAiFwPublisherInfo info( iDeviceStatusInfo, |
|
183 TAiFwCallback(), EAiFwSystemStartup ); |
|
184 |
|
185 iUiCtl.FwStateHandler()->LoadPlugin( info ); |
|
186 } |
|
187 |
|
188 __PRINTS( "*** CAppUi::ActivateUi - done" ); |
190 __PRINTS( "*** CAppUi::ActivateUi - done" ); |
189 } |
191 } |
190 |
192 |
191 // ---------------------------------------------------------------------------- |
193 // ---------------------------------------------------------------------------- |
192 // CAppUi::HandleUiReadyEventL() |
194 // CAppUi::HandleUiReadyEventL() |