--- a/phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp Wed Apr 14 15:56:42 2010 +0300
+++ b/phoneapp/phoneuicontrol/src/cphoneuicontroller.cpp Tue Apr 27 16:37:10 2010 +0300
@@ -68,8 +68,7 @@
iEngineHandler = CPhoneEngineHandler::NewL( iStateMachine );
// Create the system event handler
iSystemEventHandler = CPhoneSystemEventHandler::NewL( iStateMachine );
- // Create the remote control handler
- iRemoteControlHandler = CPhoneRemoteControlHandler::NewL( iStateMachine );
+
// Create the key event forwarder
iKeyEventForwarder = CPhoneKeyEventForwarder::NewL(
CEikonEnv::Static()->EikAppUi()->ClientRect(), iStateMachine, &aViewController );
@@ -178,6 +177,14 @@
const TInt aCallId )
{
__PHONELOGENGINEMSG( aMessage, aCallId );
+
+ // PhoneCmdHandler is using Call information API so
+ // Remote Control Handler can be constructed only after CCCE is constructed.
+ if ( aMessage == EPEMessagePEConstructionReady )
+ {
+ TRAP_IGNORE( ConstructRemoteControlHandlerL() );
+ }
+
TRAPD( err, iEngineHandler->DoHandleMessageL( aMessage, aCallId ) );
if ( err != KErrNone )
@@ -415,4 +422,14 @@
iStateMachine->State()->HandleNumberEntryEdited();
}
+// ---------------------------------------------------------
+// CPhoneUIController::ConstructRemoteControlHandlerL
+// ---------------------------------------------------------
+//
+void CPhoneUIController::ConstructRemoteControlHandlerL()
+ {
+ // Create the remote control handler
+ iRemoteControlHandler = CPhoneRemoteControlHandler::NewL( iStateMachine );
+ }
+
// End of File