uifw/AknGlobalUI/AknCapServer/src/AknFastswapWindowControl.cpp
branchRCL_3
changeset 19 aecbbf00d063
parent 9 0aa5fbdfbc30
child 20 d48ab3b357f1
equal deleted inserted replaced
18:fcdfafb36fe7 19:aecbbf00d063
    37 #include <skinlayout.cdl.h>
    37 #include <skinlayout.cdl.h>
    38 
    38 
    39 #include <akntransitionutils.h>
    39 #include <akntransitionutils.h>
    40 #include <akntranseffect.h>
    40 #include <akntranseffect.h>
    41 #include <gfxtranseffect/gfxtranseffect.h>
    41 #include <gfxtranseffect/gfxtranseffect.h>
    42 #include <widgetregistryconstants.h>
       
    43 #include <widgetregistrydata.h>
       
    44 #include <featmgr.h>
    42 #include <featmgr.h>
    45 #include <aknglobalpopupprioritycontroller.h>
    43 #include <aknglobalpopupprioritycontroller.h>
    46 #include <centralrepository.h>
    44 #include <centralrepository.h>
    47 #include <AknTasHook.h>
    45 #include <AknTasHook.h>
    48 #include <touchfeedback.h>
    46 #include <touchfeedback.h>
   155     CAknTransitionUtils::RemoveObserver( this, aEvent );
   153     CAknTransitionUtils::RemoveObserver( this, aEvent );
   156     _AKNTRACE_FUNC_EXIT; 
   154     _AKNTRACE_FUNC_EXIT; 
   157     return KErrNone;
   155     return KErrNone;
   158     }
   156     }
   159 
   157 
   160 NONSHARABLE_CLASS(CAknWidgetList) : public CBase
       
   161     {
       
   162     public:
       
   163         static CAknWidgetList* NewL( CAknFastSwapWindowControl& aParent );
       
   164         /** Destructor */
       
   165         ~CAknWidgetList();
       
   166 
       
   167         /**
       
   168          * Initializes the list that stores widgets.
       
   169          * @return   -
       
   170          */        
       
   171         void InitializeWidgetListL();
       
   172 
       
   173         /**
       
   174          * Check if a uid is the uid of the widget application.
       
   175          * @param    aAppUid The application uid to be checked.
       
   176          * @return   ETrue application uid belongs to widget application - EFalse otherwise.
       
   177          */
       
   178         TBool IsWidgetAppUI( TUid aAppUid );
       
   179 
       
   180         /**
       
   181          * Check if the window group id value refers to widget.
       
   182          * @param aWgId window group id.
       
   183          * @return ETrue if window group id has value that refers to widget.
       
   184          */
       
   185         TBool IsWidget( TInt aWgId );
       
   186 
       
   187         /**
       
   188          * Map tasklist application index to application Uid.
       
   189          *  
       
   190          * @param    aIndex index of tasklist item array.
       
   191          * @param    aAlwaysShownCount number of applications that are always shown on
       
   192                      the active applications list.
       
   193          * @return   application Uid
       
   194          */
       
   195         TUid IndexToAppUid( TInt aIndex, TInt aAlwaysShownCount );
       
   196         
       
   197     private:
       
   198         /** Constructor */
       
   199         CAknWidgetList( CAknFastSwapWindowControl& aParent );
       
   200         void ConstructL();
       
   201         void ResetArrayOfWidgetInfo( RWidgetInfoArray& aWidgetInfoArr );
       
   202         
       
   203         static void CleanupConnect( TAny* aThis );
       
   204 
       
   205     public:
       
   206         /** Contains list of widgets that are currently running */
       
   207         RWidgetInfoArray iRunningWidgets;
       
   208     private:
       
   209         CAknFastSwapWindowControl& iParent;
       
   210         RWidgetRegistryClientSession iWidgetRegistryClientSession;
       
   211     };
       
   212 
       
   213 
       
   214 CAknWidgetList* CAknWidgetList::NewL( CAknFastSwapWindowControl& aParent )
       
   215     {
       
   216     _AKNTRACE_FUNC_ENTER;
       
   217     CAknWidgetList* self = new (ELeave) CAknWidgetList( aParent );
       
   218     CleanupStack::PushL(self);
       
   219     self->ConstructL();
       
   220     CleanupStack::Pop(); //self
       
   221     _AKNTRACE_FUNC_EXIT;
       
   222     return self;
       
   223     }
       
   224     
       
   225 CAknWidgetList::CAknWidgetList( CAknFastSwapWindowControl& aParent ): iParent( aParent )
       
   226     {
       
   227     }
       
   228 
       
   229 CAknWidgetList::~CAknWidgetList()
       
   230     {
       
   231     _AKNTRACE_FUNC_ENTER;    
       
   232     ResetArrayOfWidgetInfo( iRunningWidgets );        
       
   233     iRunningWidgets.Reset();
       
   234     _AKNTRACE_FUNC_EXIT;
       
   235     }
       
   236 
       
   237 void CAknWidgetList::ConstructL()
       
   238     {
       
   239     }
       
   240     
       
   241 void CAknWidgetList::CleanupConnect( TAny* aThis )
       
   242     {
       
   243     _AKNTRACE_FUNC_ENTER;
       
   244      (( CAknWidgetList*)aThis)->iWidgetRegistryClientSession.Disconnect();   
       
   245     _AKNTRACE_FUNC_EXIT;
       
   246     }
       
   247 
       
   248 void CAknWidgetList::InitializeWidgetListL()
       
   249     {
       
   250     _AKNTRACE_FUNC_ENTER;
       
   251     ResetArrayOfWidgetInfo( iRunningWidgets );
       
   252     iRunningWidgets.Reset();
       
   253     User::LeaveIfError( iWidgetRegistryClientSession.Connect() );
       
   254     CleanupStack::PushL( TCleanupItem( CleanupConnect, this) );
       
   255     iWidgetRegistryClientSession.RunningWidgetsL(iRunningWidgets);
       
   256     for ( TInt i = iRunningWidgets.Count() - 1; i > -1; i-- )
       
   257         {
       
   258         if ( !iWidgetRegistryClientSession.IsWidgetInFullView(iRunningWidgets[i]->iUid) )
       
   259             {
       
   260             delete iRunningWidgets[i];
       
   261             iRunningWidgets.Remove(i);
       
   262             }
       
   263         }
       
   264     CleanupStack::Pop(); // clean WidgetRegistryClientSession item
       
   265     iWidgetRegistryClientSession.Disconnect();
       
   266     _AKNTRACE_FUNC_EXIT;
       
   267     }
       
   268     
       
   269 TBool CAknWidgetList::IsWidgetAppUI( TUid aAppUid )
       
   270     {
       
   271     _AKNTRACE( "[%s] aAppUid = %d", 
       
   272 	           __FUNCTION__, aAppUid.iUid );
       
   273     return (aAppUid == KWidgetAppUid);
       
   274     }
       
   275 
       
   276 TBool CAknWidgetList::IsWidget( TInt aWgId )
       
   277     {
       
   278     _AKNTRACE( "[%s] aWgId = %d", 
       
   279 	           __FUNCTION__, aWgId );
       
   280     return (aWgId == KWidgetWithoutWG);
       
   281     }
       
   282 
       
   283 TUid CAknWidgetList::IndexToAppUid( TInt aIndex, TInt aAlwaysShownCount )
       
   284     {
       
   285     _AKNTRACE( "[%s] aIndex = %d aAlwaysShownCount = %d",
       
   286     		   __FUNCTION__, aIndex, aAlwaysShownCount );
       
   287     return iRunningWidgets[aIndex + iRunningWidgets.Count() + 
       
   288         aAlwaysShownCount - iParent.iNumberOfWGs]->iUid;
       
   289     }
       
   290 
       
   291 void CAknWidgetList::ResetArrayOfWidgetInfo( 
       
   292     RWidgetInfoArray& aWidgetInfoArr )
       
   293     {
       
   294     _AKNTRACE_FUNC_ENTER;
       
   295     for ( TInt i = 0; i < aWidgetInfoArr.Count(); i++ )
       
   296         {
       
   297         CWidgetInfo *item = aWidgetInfoArr[i];
       
   298         delete item ; 
       
   299         }
       
   300     _AKNTRACE_FUNC_EXIT;
       
   301     }
       
   302 
       
   303 
       
   304 NONSHARABLE_CLASS(CAknAlwaysShownAppList) : public CBase
   158 NONSHARABLE_CLASS(CAknAlwaysShownAppList) : public CBase
   305     {
   159     {
   306     public:
   160     public:
   307        // always shown application info  
   161        // always shown application info  
   308        // used in the always shown application list
   162        // used in the always shown application list
   526 // ================= MEMBER FUNCTIONS =======================
   380 // ================= MEMBER FUNCTIONS =======================
   527 // C++ default constructor can NOT contain any code, that
   381 // C++ default constructor can NOT contain any code, that
   528 // might leave.
   382 // might leave.
   529 //
   383 //
   530 CAknFastSwapWindowControl::CAknFastSwapWindowControl(CAknCapAppServerAppUi& aAppUi)
   384 CAknFastSwapWindowControl::CAknFastSwapWindowControl(CAknCapAppServerAppUi& aAppUi)
   531 : iAppUi( aAppUi ),iLowMemory( EFalse ), iLowMemIcons( EFalse ), iAppArcSessionInitiated( EFalse ),
   385 : iAppUi( aAppUi ), iLowMemory( EFalse ), iLowMemIcons( EFalse ), iAppArcSessionInitiated( EFalse ),
   532   iWidgetAppUiWgId(-1), iWidgetsSupported( EFalse ),
   386   iTooltipModeTouch( EFalse ), iTransparencyEnabled( CAknEnv::Static()->TransparencyEnabled() ), 
   533   iTooltipModeTouch( EFalse ),iTransparencyEnabled( CAknEnv::Static()->TransparencyEnabled() ), 
       
   534   iIsStylusPopupShow(EFalse), iState( EWaiting )
   387   iIsStylusPopupShow(EFalse), iState( EWaiting )
   535     { 
   388     { 
   536     AKNTASHOOK_ADD( this, "CAknFastSwapWindowControl" );
   389     AKNTASHOOK_ADD( this, "CAknFastSwapWindowControl" );
   537     }
   390     }
   538 
   391 
   557             {
   410             {
   558             Window().SetBackgroundColor(~0);
   411             Window().SetBackgroundColor(~0);
   559             }
   412             }
   560         }
   413         }
   561 
   414 
   562     if (FeatureManager::FeatureSupported(KFeatureIdWebWidgets))
       
   563         {   
       
   564         iWidgetsSupported = ETrue;     
       
   565         }
       
   566     CreateCbaL();
   415     CreateCbaL();
   567     CreateGridL();
   416     CreateGridL();
   568     CreateItemArraysL();
   417     CreateItemArraysL();
   569     CreateTooltipL();
   418     CreateTooltipL();
   570     CreateLabelL();
   419     CreateLabelL();
   585         KAknsIIDQsnFrPopup, nullRect, nullRect, EFalse);
   434         KAknsIIDQsnFrPopup, nullRect, nullRect, EFalse);
   586 
   435 
   587     // the list for always shown applications in the fast swap
   436     // the list for always shown applications in the fast swap
   588     iAlwaysShownList = CAknAlwaysShownAppList::NewL( *this );
   437     iAlwaysShownList = CAknAlwaysShownAppList::NewL( *this );
   589 
   438 
   590     if (iWidgetsSupported)
       
   591         {        
       
   592         iWidgetList = CAknWidgetList::NewL( *this );
       
   593         }
       
   594     MakeVisible( EFalse );
   439     MakeVisible( EFalse );
   595     _AKNTRACE_FUNC_EXIT; 
   440     _AKNTRACE_FUNC_EXIT; 
   596     }
   441     }
   597     
   442     
   598 // Destructor
   443 // Destructor
   608     if ( iGrid )
   453     if ( iGrid )
   609         {
   454         {
   610         AknsUtils::DeregisterControlPosition( iGrid );
   455         AknsUtils::DeregisterControlPosition( iGrid );
   611         }
   456         }
   612     delete iAlwaysShownList;
   457     delete iAlwaysShownList;
   613     delete iWidgetList;
   458     
   614     FadeBackground( EFalse );
   459     FadeBackground( EFalse );
   615     delete iFrameContext;
   460     delete iFrameContext;
   616     delete iGrid; // destroys also iIconArray and scrollbar frame
   461     delete iGrid; // destroys also iIconArray and scrollbar frame
   617     delete iShownWgIds;
   462     delete iShownWgIds;
   618     if ( iAllWgIds )
   463     if ( iAllWgIds )
   667     if ( effectValue == 0 )     /* TAT on */
   512     if ( effectValue == 0 )     /* TAT on */
   668         {
   513         {
   669         MTouchFeedback* feedback = MTouchFeedback::Instance();
   514         MTouchFeedback* feedback = MTouchFeedback::Instance();
   670         if ( feedback )
   515         if ( feedback )
   671             {
   516             {
   672             feedback->InstantFeedback( ETouchFeedbackIncreasingPopUp );
   517             feedback->InstantFeedback( ETouchFeedbackPopupOpen );
   673             }
   518             }
   674         }
   519         }
   675     
   520     
   676     GfxTransEffect::Register( this, KGfxTaskSwapperControlUid, EFalse );
   521     GfxTransEffect::Register( this, KGfxTaskSwapperControlUid, EFalse );
   677     GfxTransEffect::Abort();
   522     GfxTransEffect::Abort();
   884         iAppArcSessionInitiated = ETrue;
   729         iAppArcSessionInitiated = ETrue;
   885         }
   730         }
   886     iAppArcSession.GetAllApps();
   731     iAppArcSession.GetAllApps();
   887     // create list for always shown applications    
   732     // create list for always shown applications    
   888     iAlwaysShownList->InitializeAlwaysShownListL();         
   733     iAlwaysShownList->InitializeAlwaysShownListL();         
   889     if (iWidgetsSupported)
   734     
   890         {        
       
   891         iWidgetList->InitializeWidgetListL();
       
   892         }
       
   893     //Initializes CAknFastSwapWindowControl private data ( iWgIds, iNumberOfWGs )
   735     //Initializes CAknFastSwapWindowControl private data ( iWgIds, iNumberOfWGs )
   894     RWsSession& wsSession=iEikonEnv->WsSession();
   736     RWsSession& wsSession=iEikonEnv->WsSession();
   895     TInt count=wsSession.NumWindowGroups( 0 );
   737     TInt count=wsSession.NumWindowGroups( 0 );
   896 
   738 
   897     RArray<RWsSession::TWindowGroupChainInfo>* allWgIds = new (ELeave)
   739     RArray<RWsSession::TWindowGroupChainInfo>* allWgIds = new (ELeave)
   938             // always shown applications are appended to the end of window group list 
   780             // always shown applications are appended to the end of window group list 
   939             if ( iAlwaysShownList->IsAlwaysShownApp( applicationUid ) )
   781             if ( iAlwaysShownList->IsAlwaysShownApp( applicationUid ) )
   940                 {
   782                 {
   941                 iAlwaysShownList->AddWgGroupToAlwaysShownList( applicationUid, wgId );
   783                 iAlwaysShownList->AddWgGroupToAlwaysShownList( applicationUid, wgId );
   942                 }
   784                 }
   943             else if (iWidgetsSupported && iWidgetList->IsWidgetAppUI(applicationUid))
   785             
   944                 {
       
   945                 iWidgetAppUiWgId = wgId;
       
   946                 }
       
   947             // could't use windowName->IsAppReady(), because then java and console application
   786             // could't use windowName->IsAppReady(), because then java and console application
   948             // wouldn't be seen in FSW. Now it is possible that some system apps are seen at the
   787             // wouldn't be seen in FSW. Now it is possible that some system apps are seen at the
   949             // beginning of their start for a while in FSW (even they should be hidden all the time)
   788             // beginning of their start for a while in FSW (even they should be hidden all the time)
   950             // temporary solution since application shell is normally hidden from tasklist
   789             // temporary solution since application shell is normally hidden from tasklist
   951             // and in the new solution it should be shown
   790             // and in the new solution it should be shown
   954                 {
   793                 {
   955                 SWindowGroupInfo wgInfo = { wgId, windowName->IsSystem() };
   794                 SWindowGroupInfo wgInfo = { wgId, windowName->IsSystem() };
   956                 shownWgIds->AppendL(wgInfo);
   795                 shownWgIds->AppendL(wgInfo);
   957                 }
   796                 }
   958             CleanupStack::PopAndDestroy();  //windowName
   797             CleanupStack::PopAndDestroy();  //windowName
   959             }
       
   960         }
       
   961 
       
   962     if (iWidgetsSupported)
       
   963         {        
       
   964         for ( TInt index = 0; index < iWidgetList->iRunningWidgets.Count(); index++)
       
   965             {
       
   966             SWindowGroupInfo wgInfo = { KWidgetWithoutWG, EFalse };
       
   967             shownWgIds->AppendL( wgInfo );
       
   968             }
   798             }
   969         }
   799         }
   970 
   800 
   971     // always shown applications are appended to the end of window group list 
   801     // always shown applications are appended to the end of window group list 
   972     for ( TInt index = 0; index < iAlwaysShownList->iAppList->Count(); index++)
   802     for ( TInt index = 0; index < iAlwaysShownList->iAppList->Count(); index++)
  1638         case MEikListBoxObserver::EEventEnterKeyPressed:
  1468         case MEikListBoxObserver::EEventEnterKeyPressed:
  1639             SwitchToApplicationL( iGrid->CurrentDataIndex() );    
  1469             SwitchToApplicationL( iGrid->CurrentDataIndex() );    
  1640             break;
  1470             break;
  1641 
  1471 
  1642         case MEikListBoxObserver::EEventItemClicked:
  1472         case MEikListBoxObserver::EEventItemClicked:
  1643         case MEikListBoxObserver::EEventItemSingleClicked:
       
  1644             if ( !iItemDraggingActioned && !iIsStylusPopupShow )
  1473             if ( !iItemDraggingActioned && !iIsStylusPopupShow )
  1645                 {
  1474                 {
  1646                 TTime now;
  1475                 TTime now;
  1647                 now.HomeTime();
  1476                 now.HomeTime();
  1648                 TInt64 diffTime = KPressedDownEffectTime - now.MicroSecondsFrom(iPressDownTime).Int64();         
  1477                 TInt64 diffTime = KPressedDownEffectTime - now.MicroSecondsFrom(iPressDownTime).Int64();         
  2042             name.AppendNum( index ); 
  1871             name.AppendNum( index ); 
  2043             
  1872             
  2044             name.Append( KTab );
  1873             name.Append( KTab );
  2045             name.Append( caption );
  1874             name.Append( caption );
  2046             }
  1875             }
  2047         else if (iWidgetsSupported && iWidgetList->IsWidget( wgId ))
       
  2048             {
       
  2049             appUid = iWidgetList->IndexToAppUid( index, iAlwaysShownList->iAppList->Count() );
       
  2050             iAppArcSession.GetAppInfo( info, appUid );
       
  2051 
       
  2052             // retrieve the app name
       
  2053             TPtrC caption = info.iShortCaption;
       
  2054             name.Zero();
       
  2055             
       
  2056             // conversion from TInt to TReal, might be a problem in the future
       
  2057             name.AppendNum( index ); 
       
  2058             
       
  2059             name.Append( KTab );
       
  2060             name.Append( caption );            
       
  2061             }            
       
  2062         //
  1876         //
  2063         // Running Applications
  1877         // Running Applications
  2064         //
  1878         //
  2065         else 
  1879         else 
  2066             {
  1880             {
  2230     // launches application and closes fastswap
  2044     // launches application and closes fastswap
  2231     if ( wgId == KApplicationWithoutWG )
  2045     if ( wgId == KApplicationWithoutWG )
  2232         {
  2046         {
  2233         LaunchAppL( iAlwaysShownList->IndexToAppUid( aIndex ) );
  2047         LaunchAppL( iAlwaysShownList->IndexToAppUid( aIndex ) );
  2234         }
  2048         }
  2235     else if ( iWidgetsSupported && wgId == KWidgetWithoutWG )
       
  2236         {
       
  2237         LaunchAppL( iWidgetList->IndexToAppUid( aIndex, iAlwaysShownList->iAppList->Count() ) );
       
  2238         }
       
  2239     // brings existing application to foreground and closes fastswap    
  2049     // brings existing application to foreground and closes fastswap    
  2240     else 
  2050     else 
  2241         {
  2051         {
  2242         if ( iAlwaysShownList->IsAlwaysShownApp( wgId ) &&
  2052         if ( iAlwaysShownList->IsAlwaysShownApp( wgId ) &&
  2243              iAlwaysShownList->IndexToAppUid( aIndex ) == KMenuAppUid )
  2053              iAlwaysShownList->IndexToAppUid( aIndex ) == KMenuAppUid )
  2327         if ( effectValue == 0 ) /* TAT on */
  2137         if ( effectValue == 0 ) /* TAT on */
  2328             {
  2138             {
  2329             MTouchFeedback* feedback = MTouchFeedback::Instance();
  2139             MTouchFeedback* feedback = MTouchFeedback::Instance();
  2330             if ( feedback )
  2140             if ( feedback )
  2331                 {
  2141                 {
  2332                 feedback->InstantFeedback( ETouchFeedbackDecreasingPopUp );
  2142                 feedback->InstantFeedback( ETouchFeedbackPopupClose );
  2333                 }
  2143                 }
  2334             }
  2144             }
  2335         // calculate already here since PositionRelativeToScreen
  2145         // calculate already here since PositionRelativeToScreen
  2336         // causes a flush to WS, which can disturb transition
  2146         // causes a flush to WS, which can disturb transition
  2337         TPoint dPoint( iGrid->PositionRelativeToScreen() );
  2147         TPoint dPoint( iGrid->PositionRelativeToScreen() );
  2922 // ---------------------------------------------------------
  2732 // ---------------------------------------------------------
  2923 //
  2733 //
  2924 TPtrC CAknFastSwapWindowControl::CurrentAppName()
  2734 TPtrC CAknFastSwapWindowControl::CurrentAppName()
  2925     {
  2735     {
  2926     _AKNTRACE_FUNC_ENTER;
  2736     _AKNTRACE_FUNC_ENTER;
  2927     TInt textindex = iGrid->CurrentDataIndex();
  2737     TPtrC name = iGrid->Model()->ItemText( iGrid->CurrentDataIndex() );
  2928     TPtrC name;
  2738     name.Set( name.Mid( name.Find(KTab)+1) );
  2929     if ( textindex > 0 )
       
  2930         {
       
  2931         name.Set( iGrid->Model()->ItemText( textindex ) );
       
  2932         name.Set( name.Mid( name.Find(KTab)+1 ) );
       
  2933         }
       
  2934     _AKNTRACE_FUNC_EXIT;
  2739     _AKNTRACE_FUNC_EXIT;
  2935     return name;
  2740     return name;
  2936     }        
  2741     }        
  2937 
  2742 
  2938 // ----------------------------------------------------------------------------
  2743 // ----------------------------------------------------------------------------
  3037     // if this leaves, okToClose will be left as ETrue
  2842     // if this leaves, okToClose will be left as ETrue
  3038     iTooltip->HideInfoPopupNote();
  2843     iTooltip->HideInfoPopupNote();
  3039 
  2844 
  3040     iIsClosing = ETrue;
  2845     iIsClosing = ETrue;
  3041     
  2846     
  3042     if (iWidgetsSupported && iWidgetList->IsWidget( iConfirmCloseWgId ))
  2847     if ( aIsShift )
  3043         {
       
  3044         TWsEvent event;
       
  3045         event.SetType(EEventUser);
       
  3046             
       
  3047         TUid widgetUid = iWidgetList->IndexToAppUid(aIndex, iAlwaysShownList->iAppList->Count());
       
  3048 
       
  3049         TInt32 widgetAppUiUidInt = KWidgetAppUid.iUid;
       
  3050         TInt32 widgetUidInt = widgetUid.iUid;
       
  3051         TUint8* eventData = event.EventData();
       
  3052         // Fill bits 0-31 with widget application Uid.
       
  3053         (TUint32&)*eventData = widgetAppUiUidInt;
       
  3054         eventData+=sizeof(TUint32);
       
  3055         // Fill bits 32-63 with uid of the widget that should be closed.
       
  3056         (TUint32&)*eventData = widgetUidInt;
       
  3057         // Send the event to Widget AppUi.
       
  3058         iEikonEnv->WsSession().SendEventToWindowGroup(iWidgetAppUiWgId, event);
       
  3059         }
       
  3060     else if ( aIsShift )
       
  3061         {
  2848         {
  3062         TApaTask task( iEikonEnv->WsSession() );
  2849         TApaTask task( iEikonEnv->WsSession() );
  3063         task.SetWgId( iConfirmCloseWgId );
  2850         task.SetWgId( iConfirmCloseWgId );
  3064         task.SendSystemEvent( EApaSystemEventShutdown);
  2851         task.SendSystemEvent( EApaSystemEventShutdown);
  3065         }
  2852         }