27 #include <AknsConstants.h> |
27 #include <AknsConstants.h> |
28 #include <cscsettingsui.h> |
28 #include <cscsettingsui.h> |
29 #include <xSPViewServices.h> |
29 #include <xSPViewServices.h> |
30 #include <AiwServiceHandler.h> |
30 #include <AiwServiceHandler.h> |
31 #include <mspnotifychangeobserver.h> |
31 #include <mspnotifychangeobserver.h> |
|
32 #include <gsfwviewuids.h> |
|
33 #include <apgwgnam.h> |
|
34 #include <csc.hlp.hrh> |
32 |
35 |
33 #include "cscappui.h" |
36 #include "cscappui.h" |
34 #include "csclogger.h" |
37 #include "csclogger.h" |
35 #include "cscdocument.h" |
38 #include "cscdocument.h" |
36 #include "cscconstants.h" |
39 #include "cscconstants.h" |
43 #include "cscengservicepluginhandler.h" |
46 #include "cscengservicepluginhandler.h" |
44 #include "cscengdestinationshandler.h" |
47 #include "cscengdestinationshandler.h" |
45 #include "cscenguiextensionpluginhandler.h" |
48 #include "cscenguiextensionpluginhandler.h" |
46 |
49 |
47 const TInt KMaxParamLength = 255; |
50 const TInt KMaxParamLength = 255; |
|
51 const TInt KGSChildAppWindowGroupNameLength = 100; |
48 |
52 |
49 // ======== MEMBER FUNCTIONS ======== |
53 // ======== MEMBER FUNCTIONS ======== |
50 |
54 |
51 |
55 |
52 // --------------------------------------------------------------------------- |
56 // --------------------------------------------------------------------------- |
455 |
466 |
456 CleanupStack::PopAndDestroy( destHandler ); |
467 CleanupStack::PopAndDestroy( destHandler ); |
457 |
468 |
458 CSCDEBUG( "CCSCAppUi::SnapCheckL - end" ); |
469 CSCDEBUG( "CCSCAppUi::SnapCheckL - end" ); |
459 } |
470 } |
|
471 |
|
472 // --------------------------------------------------------------------------- |
|
473 // Check if GS has to be closed |
|
474 // --------------------------------------------------------------------------- |
|
475 // |
|
476 TBool CCSCAppUi::ExitGSIfParentL() |
|
477 { |
|
478 TBool ret = EFalse; |
|
479 |
|
480 RWsSession ws = CEikonEnv::Static()->WsSession(); |
|
481 TApaTaskList taskList( ws ); |
|
482 TApaTask gstask = taskList.FindApp( KUidGS ); |
|
483 |
|
484 if ( gstask.Exists() ) |
|
485 { |
|
486 TInt gswgid = gstask.WgId(); |
|
487 RArray<RWsSession::TWindowGroupChainInfo> wgrp; |
|
488 ws.WindowGroupList( &wgrp ); |
|
489 TInt i = 0; |
|
490 |
|
491 // Loop window groups, find GS's child app |
|
492 for ( i=0; i < wgrp.Count() ; ++i ) |
|
493 { |
|
494 TBuf< KGSChildAppWindowGroupNameLength > name; |
|
495 ws.GetWindowGroupNameFromIdentifier( wgrp[i].iId , name ); |
|
496 RWsSession::TWindowGroupChainInfo wginfo = wgrp[i]; |
|
497 if ( wginfo.iParentId == gswgid ) // Child of GS found |
|
498 { |
|
499 CApaWindowGroupName* windowName1 = |
|
500 CApaWindowGroupName::NewLC( ws, wginfo.iId ); // CS:1 |
|
501 TUid embeddeeuid; |
|
502 embeddeeuid = windowName1->AppUid(); |
|
503 |
|
504 // Check if CSC is the child of GS |
|
505 if ( KUidCscHelp == embeddeeuid ) |
|
506 { |
|
507 ret = ETrue; |
|
508 gstask.EndTask(); |
|
509 } |
|
510 CleanupStack::PopAndDestroy( windowName1 ); // CS:0 |
|
511 } |
|
512 } |
|
513 wgrp.Close(); |
|
514 } |
|
515 |
|
516 return ret; |
|
517 } |