equal
deleted
inserted
replaced
20 #include "appmngr2model.h" // CAppMngr2Model |
20 #include "appmngr2model.h" // CAppMngr2Model |
21 #include "appmngr2internalpskeys.h" // KAppManagerApplicationMode |
21 #include "appmngr2internalpskeys.h" // KAppManagerApplicationMode |
22 #include "appmngr2installedview.h" // CAppMngr2InstalledView |
22 #include "appmngr2installedview.h" // CAppMngr2InstalledView |
23 #include "appmngr2packagesview.h" // CAppMngr2PackagesView |
23 #include "appmngr2packagesview.h" // CAppMngr2PackagesView |
24 #include "appmngr2.hrh" // Command IDs |
24 #include "appmngr2.hrh" // Command IDs |
|
25 #include "appmngr2exittimer.h" // Exit Timer |
|
26 |
25 #include <appmngr2runtime.h> // CAppMngr2Runtime |
27 #include <appmngr2runtime.h> // CAppMngr2Runtime |
26 #include <appmngr2driveutils.h> // TAppMngr2DriveUtils |
28 #include <appmngr2driveutils.h> // TAppMngr2DriveUtils |
27 #include <appmngr2debugutils.h> // FLOG macros |
29 #include <appmngr2debugutils.h> // FLOG macros |
28 #include <eikdoc.h> // CEikDocument |
30 #include <eikdoc.h> // CEikDocument |
29 #include <appmngr2.rsg> // Resource IDs |
31 #include <appmngr2.rsg> // Resource IDs |
94 } |
96 } |
95 |
97 |
96 FLOG( "CAppMngr2AppUi::ConstructL, starting delayed construct" ); |
98 FLOG( "CAppMngr2AppUi::ConstructL, starting delayed construct" ); |
97 iIdle = CIdle::NewL( CActive::EPriorityStandard ); |
99 iIdle = CIdle::NewL( CActive::EPriorityStandard ); |
98 iIdle->Start( TCallBack( &CAppMngr2AppUi::DelayedConstructL, this ) ); |
100 iIdle->Start( TCallBack( &CAppMngr2AppUi::DelayedConstructL, this ) ); |
|
101 |
|
102 FLOG( "CAppMngr2AppUi::ConstructL, iExitTimer = NULL" ); |
|
103 iExitTimer = NULL; |
99 } |
104 } |
100 |
105 |
101 // --------------------------------------------------------------------------- |
106 // --------------------------------------------------------------------------- |
102 // CAppMngr2AppUi::~CAppMngr2AppUi() |
107 // CAppMngr2AppUi::~CAppMngr2AppUi() |
103 // --------------------------------------------------------------------------- |
108 // --------------------------------------------------------------------------- |
109 delete iModel; |
114 delete iModel; |
110 if( iResourceFileOffset > 0 ) |
115 if( iResourceFileOffset > 0 ) |
111 { |
116 { |
112 iEikonEnv->DeleteResourceFile( iResourceFileOffset ); |
117 iEikonEnv->DeleteResourceFile( iResourceFileOffset ); |
113 } |
118 } |
114 FeatureManager::UnInitializeLib(); |
119 FeatureManager::UnInitializeLib(); |
|
120 delete iExitTimer; |
115 } |
121 } |
116 |
122 |
117 // --------------------------------------------------------------------------- |
123 // --------------------------------------------------------------------------- |
118 // CAppMngr2AppUi::Model() |
124 // CAppMngr2AppUi::Model() |
119 // --------------------------------------------------------------------------- |
125 // --------------------------------------------------------------------------- |
206 { |
212 { |
207 FLOG( "CAppMngr2AppUi::HandleCommandL( %d )", aCommand ); |
213 FLOG( "CAppMngr2AppUi::HandleCommandL( %d )", aCommand ); |
208 switch ( aCommand ) |
214 switch ( aCommand ) |
209 { |
215 { |
210 case EEikCmdExit: |
216 case EEikCmdExit: |
|
217 if ( iModel->IsUninstall() && iModel->IsActive() ) |
|
218 { |
|
219 // In case we have uninstall process ongoing we need to |
|
220 // start delay timer for Exit. This is because in some cases |
|
221 // like VPN plug-in the GS is closed and app.mngr exit may come |
|
222 // just when SWInstLauncer is completing req. in RunL (long |
|
223 // running task). CActive do not return from Cancel and |
|
224 // AppMngr2Model's destructor jams. |
|
225 if ( !iExitTimer ) |
|
226 { |
|
227 // If there is not exit timer already let's make one. |
|
228 iExitTimer = CAppMngr2ExitTimer::NewL( this ); |
|
229 iExitTimer->StartExitTimer(); |
|
230 } |
|
231 } |
|
232 else |
|
233 { |
|
234 // if we do not have uninstall request let's do Exit now. |
|
235 Exit(); |
|
236 } |
|
237 break; |
|
238 |
211 case EAknCmdExit: |
239 case EAknCmdExit: |
212 case EAknSoftkeyExit: |
240 case EAknSoftkeyExit: |
213 Exit(); |
241 Exit(); |
214 break; |
242 break; |
215 |
243 |