122 |
122 |
123 #include "AknNotifierControllerPlugin.h" |
123 #include "AknNotifierControllerPlugin.h" |
124 #include <AknCustomCursorSupport.h> |
124 #include <AknCustomCursorSupport.h> |
125 #include "AknEikSrv.pan" |
125 #include "AknEikSrv.pan" |
126 |
126 |
|
127 #include <hb/hbcore/hbsymbianvariant.h> |
|
128 #include <hb/hbcore/hbdevicedialogsymbian.h> |
|
129 |
127 #if defined(__WINS__) |
130 #if defined(__WINS__) |
128 const TInt KEikServSideBarWidth = 35; |
131 const TInt KEikServSideBarWidth = 35; |
129 const TInt KEikServAppbarHeight = 50; |
132 const TInt KEikServAppbarHeight = 50; |
130 #endif |
133 #endif |
131 |
134 |
623 iEikServExtra->iServerRestarter = CPeriodic::NewL(CActive::EPriorityStandard); |
626 iEikServExtra->iServerRestarter = CPeriodic::NewL(CActive::EPriorityStandard); |
624 } |
627 } |
625 |
628 |
626 EXPORT_C void CEikServAppUiBase::HandleThreadExitL(RThread& aThread) |
629 EXPORT_C void CEikServAppUiBase::HandleThreadExitL(RThread& aThread) |
627 { |
630 { |
|
631 _LIT(KAppArcServerThread, "AppArcServerThread"); |
628 if (aThread.Name() == ASCliDefinitions::ServerAndThreadName()) // alarm server died |
632 if (aThread.Name() == ASCliDefinitions::ServerAndThreadName()) // alarm server died |
629 { |
633 { |
630 aThread.Close(); // need to Close() before restarting with same name |
634 aThread.Close(); // need to Close() before restarting with same name |
631 iServerToRestart |= EAlwlSvr; // restarted under active object |
635 iServerToRestart |= EAlwlSvr; // restarted under active object |
632 } |
636 } |
633 else if (aThread.Name()==NameApaServServerThread()) // AppArc server died |
637 else if (aThread.Name() == KAppArcServerThread) // AppArc server died |
634 { |
638 { |
635 aThread.Close(); |
639 aThread.Close(); |
636 iServerToRestart|=EApaSvr; |
640 iServerToRestart|=EApaSvr; |
637 } |
641 } |
638 |
642 |
1058 // Invented new API. |
1062 // Invented new API. |
1059 ReplaceKeySoundsL(0x100053D0); |
1063 ReplaceKeySoundsL(0x100053D0); |
1060 KeySounds()->BringToForeground(); |
1064 KeySounds()->BringToForeground(); |
1061 } |
1065 } |
1062 |
1066 |
|
1067 LOCAL_C void ShowNotificationDialog(const TDesC& aNoteText) |
|
1068 { |
|
1069 _LIT(KNotificationDialogPlugin, "com.nokia.hb.devicenotificationdialog/1.0"); |
|
1070 _LIT(KTimeout, "timeout"); |
|
1071 _LIT(KTitle, "title"); |
|
1072 |
|
1073 //@TODO replace the hardcoded parameter after enum EASyncServerStartup |
|
1074 // is defined(after MCL wk26). |
|
1075 //CHbDeviceDialogSymbian* dlg = CHbDeviceDialogSymbian::NewL( |
|
1076 // CHbDeviceDialogSymbian::EASyncServerStartup); |
|
1077 CHbDeviceDialogSymbian* dlg = CHbDeviceDialogSymbian::NewL(2); |
|
1078 CleanupStack::PushL(dlg); |
|
1079 |
|
1080 TInt timeout = 0; |
|
1081 |
|
1082 CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL(); |
|
1083 CleanupStack::PushL(map); |
|
1084 |
|
1085 map->Add(KTimeout, CHbSymbianVariant::NewL(&timeout, CHbSymbianVariant::EInt)); |
|
1086 map->Add(KTitle, CHbSymbianVariant::NewL(&aNoteText, CHbSymbianVariant::EDes)); |
|
1087 |
|
1088 dlg->Show(KNotificationDialogPlugin, *map); |
|
1089 |
|
1090 CleanupStack::PopAndDestroy(2); |
|
1091 } |
1063 |
1092 |
1064 void CEikServAppUi::HandleThreadExitL(RThread& aThread) |
1093 void CEikServAppUi::HandleThreadExitL(RThread& aThread) |
1065 { |
1094 { |
1066 if(aThread.Name().CompareF(_L("aknnfysrv")) == 0) |
1095 if(aThread.Name().CompareF(_L("aknnfysrv")) == 0) |
1067 { |
1096 { |
1093 KFeatureIdShowPanics )) ) |
1122 KFeatureIdShowPanics )) ) |
1094 { |
1123 { |
1095 // Construct text for a panic note. |
1124 // Construct text for a panic note. |
1096 HBufC* panicText = ConstructPanicTextLC( aThread, rdSupport ); |
1125 HBufC* panicText = ConstructPanicTextLC( aThread, rdSupport ); |
1097 |
1126 |
1098 iAknCapServerClient.ShowGlobalNoteL(panicText->Des(), EAknGlobalErrorNote); |
1127 /* iAknCapServerClient.ShowGlobalNoteL(panicText->Des(), EAknGlobalErrorNote); */ |
|
1128 |
|
1129 ShowNotificationDialog( panicText->Des() ); |
|
1130 |
1099 CleanupStack::PopAndDestroy(); // panicText |
1131 CleanupStack::PopAndDestroy(); // panicText |
1100 } |
1132 } |
1101 |
1133 |
1102 CEikServAppUiBase::HandleThreadExitL(aThread); |
1134 CEikServAppUiBase::HandleThreadExitL(aThread); |
1103 } |
1135 } |