diff -r fcdfafb36fe7 -r aecbbf00d063 uifw/AvKon/src/aknApp.cpp --- a/uifw/AvKon/src/aknApp.cpp Thu Aug 19 10:11:06 2010 +0300 +++ b/uifw/AvKon/src/aknApp.cpp Tue Aug 31 15:28:30 2010 +0300 @@ -31,7 +31,6 @@ #include #include #include -#include LOCAL_C TBool IsInHiddenList(const TUid& aUid) { @@ -65,40 +64,15 @@ CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC(ws, myWg); wgName->SetAppUid(uid); wgName->SetWindowGroupName(env->RootWin()); - - // Use a CAknTaskList to check for root instances of apps - CAknTaskList* taskList = CAknTaskList::NewLC(ws); - TBool foundInstance = EFalse; - + + // Use a CAknTaskList to check for root instances of apps + CAknTaskList* taskList = CAknTaskList::NewLC(ws); + TBool foundInstance = EFalse; + // Look for another instance of this app while (wgId>=0) { - TBool rootTask = taskList->IsRootWindowGroup(wgId); - TBool rootWg = EFalse; - TInt wndPriority = -1; - if ( wgId != myWg && wgId > 0 && !rootTask ) - { - wndPriority = ws.GetWindowGroupOrdinalPriority( wgId ); - RArray wgs; - // it seems effecient to call WindowGroupList here, this codes will seldom executed. - ws.WindowGroupList( wndPriority, &wgs ); - - TInt count = wgs.Count(); - for ( TInt ii=0; iiIsRootWindowGroup(wgId)) { // found another app, switch to it & die /* TApaTask other(ws);