110 TBool isHidden = doomed->Hidden(); |
110 TBool isHidden = doomed->Hidden(); |
111 #endif // _DEBUG |
111 #endif // _DEBUG |
112 // This UID comes from the app, not the mmp! |
112 // This UID comes from the app, not the mmp! |
113 TUid uid = doomed->AppUid(); |
113 TUid uid = doomed->AppUid(); |
114 iWs.GetWindowGroupClientThreadId(wgIds->At(ii), threadId); |
114 iWs.GetWindowGroupClientThreadId(wgIds->At(ii), threadId); |
115 thd.Open(threadId); |
115 TInt error = thd.Open(threadId); |
116 CleanupClosePushL( thd ); |
116 CleanupClosePushL( thd ); |
117 |
117 |
118 // Is this app OK to kill? We don't kill the this app, EikSrv backdrop or the app that |
118 // Is this app OK to kill? We don't kill the this app, EikSrv backdrop or the app that |
119 // instigated the shutdown. |
119 // instigated the shutdown. |
120 if ((uid != aRequesterUID) && ( uid != KCapServerUid ) && ( uid != KFepSwitchWGId ) && |
120 if ((uid != aRequesterUID) && ( uid != KCapServerUid ) && ( uid != KFepSwitchWGId ) && |
121 ( doomed->Caption() != EIKON_SERVER_BACKDROP_WINDOW_GROUP_NAME ) && |
121 ( doomed->Caption() != EIKON_SERVER_BACKDROP_WINDOW_GROUP_NAME ) && |
122 !IsSystemCriticalThread( thd ) ) |
122 !IsSystemCriticalThread( thd ) && (!doomed->IsSystem()) && (uid.iUid != 0)) |
123 { |
123 { |
124 TApaTask* harbingerOfDoom = new (ELeave) TApaTask(iWs); |
124 TApaTask* harbingerOfDoom = new (ELeave) TApaTask(iWs); |
125 CleanupDeletePushL(harbingerOfDoom); |
125 CleanupDeletePushL(harbingerOfDoom); |
126 harbingerOfDoom->SetWgId(wgIds->At(ii)); |
126 harbingerOfDoom->SetWgId(wgIds->At(ii)); |
127 |
127 |
249 { |
249 { |
250 if (aHowClosed == CAppExitNotifier::EAppExitNormal) |
250 if (aHowClosed == CAppExitNotifier::EAppExitNormal) |
251 { |
251 { |
252 #ifdef _DEBUG |
252 #ifdef _DEBUG |
253 RDebug::Print(_L("SHUTDOWN: App with ThreadId %d has exited"), TUint(aNotifier->ThreadId())); |
253 RDebug::Print(_L("SHUTDOWN: App with ThreadId %d has exited"), TUint(aNotifier->ThreadId())); |
|
254 #else |
|
255 aNotifier->ThreadId(); // just for fixing warning |
254 #endif |
256 #endif |
255 } |
257 } |
256 else if (aHowClosed == CAppExitNotifier::EAppExitForced) |
258 else if (aHowClosed == CAppExitNotifier::EAppExitForced) |
257 { |
259 { |
258 #ifdef _DEBUG |
260 #ifdef _DEBUG |
259 RDebug::Print(_L("SHUTDOWN: App with ThreadId %d was killed"), TUint(aNotifier->ThreadId())); |
261 RDebug::Print(_L("SHUTDOWN: App with ThreadId %d was killed"), TUint(aNotifier->ThreadId())); |
|
262 #else |
|
263 aNotifier->ThreadId(); // just for fixing warning |
260 #endif |
264 #endif |
261 } |
265 } |
262 iTotalAppExitNotifiers--; |
266 iTotalAppExitNotifiers--; |
263 |
267 |
264 // If all the apps have exited then complete the request. |
268 // If all the apps have exited then complete the request. |