17 */ |
17 */ |
18 |
18 |
19 |
19 |
20 |
20 |
21 // INCLUDES |
21 // INCLUDES |
|
22 #include <avkon.hrh> |
|
23 #include <StringLoader.h> |
22 #include <centralrepository.h> |
24 #include <centralrepository.h> |
|
25 #include <AknUtils.h> |
23 #include <SWInstDefs.h> |
26 #include <SWInstDefs.h> |
|
27 #include <avkon.rsg> |
24 #include <featurecontrol.h> |
28 #include <featurecontrol.h> |
25 #include <cmmanager.h> |
29 #include <cmmanager.h> |
26 #include <qapplication.h> |
30 #include <iaupdate.rsg> |
27 #include <hbaction.h> |
|
28 #include <hbprogressdialog.h> |
|
29 #include <iaupdateparameters.h> |
31 #include <iaupdateparameters.h> |
30 |
32 |
31 #include "iaupdateuicontroller.h" |
33 #include "iaupdateuicontroller.h" |
32 #include "iaupdateuicontrollerobserver.h" |
34 #include "iaupdateuicontrollerobserver.h" |
|
35 #include "iaupdateappui.h" |
33 #include "iaupdate.hrh" |
36 #include "iaupdate.hrh" |
|
37 #include "iaupdatewaitdialog.h" |
|
38 #include "iaupdateprogressdialog.h" |
34 #include "iaupdatenode.h" |
39 #include "iaupdatenode.h" |
35 #include "iaupdatefwnode.h" |
40 #include "iaupdatefwnode.h" |
36 #include "iaupdatebasenode.h" |
41 #include "iaupdatebasenode.h" |
37 #include "iaupdatenodefilter.h" |
42 #include "iaupdatenodefilter.h" |
38 #include "iaupdatefactory.h" |
43 #include "iaupdatefactory.h" |
39 #include "iaupdatestarter.h" |
44 #include "iaupdatestarter.h" |
40 #include "iaupdateprivatecrkeys.h" |
45 #include "iaupdateprivatecrkeys.h" |
41 #include "iaupdatecontrollerfile.h" |
46 #include "iaupdatecontrollerfile.h" |
42 #include "iaupdateuiconfigdata.h" |
47 #include "iaupdateuiconfigdata.h" |
|
48 #include "iaupdatedialogutil.h" |
43 #include "iaupdateutils.h" |
49 #include "iaupdateutils.h" |
44 #include "iaupdateagreement.h" |
50 #include "iaupdateagreement.h" |
45 #include "iaupdateautomaticcheck.h" |
51 #include "iaupdateautomaticcheck.h" |
46 #include "iaupdateroaminghandler.h" |
52 #include "iaupdateroaminghandler.h" |
47 #include "iaupdatependingnodesfile.h" |
53 #include "iaupdatependingnodesfile.h" |
49 #include "iaupdaterresultsfile.h" |
55 #include "iaupdaterresultsfile.h" |
50 #include "iaupdaterresult.h" |
56 #include "iaupdaterresult.h" |
51 #include "iaupdateridentifier.h" |
57 #include "iaupdateridentifier.h" |
52 #include "iaupdateruids.h" |
58 #include "iaupdateruids.h" |
53 #include "iaupdaterdefs.h" |
59 #include "iaupdaterdefs.h" |
|
60 #include "iaupdatetools.h" |
54 #include "iaupdateparametersfilemanager.h" |
61 #include "iaupdateparametersfilemanager.h" |
55 #include "iaupdateerrorcodes.h" |
62 #include "iaupdateerrorcodes.h" |
56 #include "iaupdatefileconsts.h" |
63 #include "iaupdatefileconsts.h" |
57 #include "iaupdatefirsttimeinfo.h" |
64 #include "iaupdatefirsttimeinfo.h" |
58 #include "iaupdaterefreshhandler.h" |
65 #include "iaupdaterefreshhandler.h" |
59 #include "iaupdatenodeid.h" |
66 #include "iaupdatenodeid.h" |
60 #include "iaupdatewaitdialog.h" |
|
61 #include "iaupdatedialogutil.h" |
|
62 #include "iaupdatedebug.h" |
67 #include "iaupdatedebug.h" |
63 |
68 |
64 |
69 |
65 // cenrep in emulator: |
70 // cenrep in emulator: |
66 // copy 2000F85A.txt to '\epoc32\release\winscw\udeb\Z\private\10202be9\' |
71 // copy 2000F85A.txt to '\epoc32\release\winscw\udeb\Z\private\10202be9\' |
329 // agreement (disclaimer) dialog is not prompted when CheckUpdates is called |
332 // agreement (disclaimer) dialog is not prompted when CheckUpdates is called |
330 // |
333 // |
331 // Refresh from network is allowed when first time case |
334 // Refresh from network is allowed when first time case |
332 iRefreshFromNetworkDenied = EFalse; |
335 iRefreshFromNetworkDenied = EFalse; |
333 agreementAccepted = agreement->AcceptAgreementL(); |
336 agreementAccepted = agreement->AcceptAgreementL(); |
334 if (!agreementAccepted) |
|
335 { |
|
336 if ( !mDialogUtil ) |
|
337 { |
|
338 mDialogUtil = new IAUpdateDialogUtil(NULL, this); |
|
339 } |
|
340 if ( mDialogUtil ) |
|
341 { |
|
342 mPrimaryAction = NULL; |
|
343 //mPrimaryAction = new HbAction(hbTrId("txt_software_button_accept")); |
|
344 mPrimaryAction = new HbAction("Accept"); |
|
345 HbAction *secondaryAction = NULL; |
|
346 //secondaryAction = new HbAction(hbTrId("txt_software_button_decline")); |
|
347 secondaryAction = new HbAction("Decline"); |
|
348 mDialogUtil->showAgreement(mPrimaryAction,secondaryAction); |
|
349 iDialogState = EAgreement; |
|
350 } |
|
351 } |
|
352 } |
337 } |
353 CleanupStack::PopAndDestroy( agreement ); |
338 CleanupStack::PopAndDestroy( agreement ); |
354 } |
339 } |
355 if ( iDialogState != EAgreement ) |
340 |
356 { |
|
357 AgreementHandledL(); |
|
358 } |
|
359 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::CheckUpdatesL() end"); |
|
360 return; |
|
361 } |
|
362 |
|
363 // --------------------------------------------------------------------------- |
|
364 // CIAUpdateUiController:: AgreementHandledL |
|
365 // Updates the update item list. |
|
366 // --------------------------------------------------------------------------- |
|
367 // |
|
368 void CIAUpdateUiController::AgreementHandledL() |
|
369 { |
|
370 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::AgreementHandledL() begin"); |
|
371 TBool agreementAccepted( EFalse ); |
|
372 CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC(); |
|
373 agreementAccepted = agreement->AgreementAcceptedL(); |
|
374 CleanupStack::PopAndDestroy( agreement ); |
|
375 if ( !agreementAccepted && !ForcedRefresh() ) |
341 if ( !agreementAccepted && !ForcedRefresh() ) |
376 { |
342 { |
377 if ( iRequestType == IAUpdateUiDefines::ECheckUpdates ) |
343 if ( iRequestType == IAUpdateUiDefines::ECheckUpdates ) |
378 { |
344 { |
379 CIAUpdateAutomaticCheck* automaticCheck = CIAUpdateAutomaticCheck::NewLC(); |
345 CIAUpdateAutomaticCheck* automaticCheck = CIAUpdateAutomaticCheck::NewLC(); |
552 MIAUpdateNode* selectedNode = iSelectedNodesArray[ iNodeIndex ]; |
507 MIAUpdateNode* selectedNode = iSelectedNodesArray[ iNodeIndex ]; |
553 |
508 |
554 // Only update items that have not been installed yet. |
509 // Only update items that have not been installed yet. |
555 if ( !selectedNode->IsInstalled() ) |
510 if ( !selectedNode->IsInstalled() ) |
556 { |
511 { |
557 IAUPDATE_TRACE("[IAUPDATE] Item not installed yet"); |
512 IAUPDATE_TRACE("[IAUPDATE] Item not installed yet"); |
558 iFilter->SortThisNodeFirstL( selectedNode, iNodes ); |
|
559 if ( !selectedNode->IsDownloaded() ) |
513 if ( !selectedNode->IsDownloaded() ) |
560 { |
514 { |
561 // Because content has not been downloaded or installed yet, |
515 // Because content has not been downloaded or installed yet, |
562 // it needs to be downloaded before it can be installed. |
516 // it needs to be downloaded before it can be installed. |
563 IAUPDATE_TRACE("[IAUPDATE] Download"); |
517 IAUPDATE_TRACE("[IAUPDATE] Download"); |
564 selectedNode->DownloadL( *this ); |
518 selectedNode->DownloadL( *this ); |
565 iState = EDownloading; |
519 iState = EDownloading; |
566 iClosingAllowedByClient = ETrue; |
520 iClosingAllowedByClient = ETrue; |
567 selectedNode->SetUiState( MIAUpdateNode::EDownloading ); |
521 ShowUpdatingDialogL( R_IAUPDATE_DOWNLOADING_NOTE, |
568 iObserver.RefreshUI(); |
522 selectedNode->Base().Name(), |
|
523 iNodeIndex + 1, |
|
524 iSelectedNodesArray.Count() ); |
569 nextUpdate = EFalse; |
525 nextUpdate = EFalse; |
570 } |
526 } |
571 else |
527 else |
572 { |
528 { |
573 // Because content has been downloaded but not installed yet, |
529 // Because content has been downloaded but not installed yet, |
574 // it needs to be installed now. |
530 // it needs to be installed now. |
575 IAUPDATE_TRACE("[IAUPDATE] Install"); |
531 IAUPDATE_TRACE("[IAUPDATE] Install"); |
576 selectedNode->InstallL( *this ); |
532 selectedNode->InstallL( *this ); |
577 iState = EInstalling; |
533 iState = EInstalling; |
578 iClosingAllowedByClient = EFalse; |
534 iClosingAllowedByClient = EFalse; |
579 selectedNode->SetUiState( MIAUpdateNode::EInstalling ); |
535 CIAUpdateAppUi* appUi = |
580 iObserver.RefreshUI(); |
536 static_cast< CIAUpdateAppUi* >( iEikEnv->EikAppUi() ); |
|
537 appUi->StartWGListChangeMonitoring(); |
|
538 ShowUpdatingDialogL( R_IAUPDATE_INSTALLING_NOTE, |
|
539 selectedNode->Base().Name(), |
|
540 iNodeIndex + 1, |
|
541 iSelectedNodesArray.Count() ); |
581 nextUpdate = EFalse; |
542 nextUpdate = EFalse; |
582 } |
543 } |
583 } |
544 } |
584 } |
545 } |
585 else |
546 else |
1563 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RoamingHandlerPrepared() end"); |
1533 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RoamingHandlerPrepared() end"); |
1564 } |
1534 } |
1565 |
1535 |
1566 |
1536 |
1567 // ----------------------------------------------------------------------------- |
1537 // ----------------------------------------------------------------------------- |
1568 // CIAUpdateUiController::HandleWaitDialogCancel |
1538 // CIAUpdateUiController::HandleDialogExitL |
1569 // Called when wait dialog is cancelled. |
1539 // Called when wait/progress dialog is about to be cancelled. |
1570 // (other items were commented in a header). |
1540 // (other items were commented in a header). |
1571 // ----------------------------------------------------------------------------- |
1541 // ----------------------------------------------------------------------------- |
1572 // |
1542 // |
1573 void CIAUpdateUiController::HandleWaitDialogCancel() |
1543 TBool CIAUpdateUiController::HandleDialogExitL( TInt aButtonId ) |
1574 { |
1544 { |
1575 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() begin"); |
1545 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleDialogExitL() begin"); |
1576 |
1546 IAUPDATE_TRACE_1("[IAUPDATE] button id: %d", aButtonId ); |
1577 TRAPD ( err, HandleUserCancelL() ); |
1547 |
1578 if ( err != KErrNone ) |
1548 TInt ret( ETrue ); |
1579 { |
1549 if ( aButtonId == EAknSoftkeyCancel ) |
1580 iObserver.HandleLeaveErrorL( err ); |
1550 { |
1581 } |
1551 TRAPD ( err, HandleUserCancelL() ); |
1582 |
1552 if ( err != KErrNone ) |
1583 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleWaitDialogCancel() end"); |
1553 { |
1584 |
1554 iObserver.HandleLeaveErrorL( err ); |
1585 } |
1555 } |
1586 |
1556 } |
1587 // ----------------------------------------------------------------------------- |
1557 |
1588 // CIAUpdateUiController::dialogFinished |
1558 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::HandleDialogExitL() end"); |
1589 // Called when dialog is finished. |
1559 |
1590 // ----------------------------------------------------------------------------- |
1560 return ret; |
1591 // |
|
1592 void CIAUpdateUiController::dialogFinished(HbAction *action) |
|
1593 { |
|
1594 TDialogState dialogState = iDialogState; |
|
1595 iDialogState = ENoDialog; |
|
1596 |
|
1597 switch ( dialogState ) |
|
1598 { |
|
1599 case EAgreement: |
|
1600 if ( action == mPrimaryAction ) |
|
1601 { |
|
1602 CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC(); |
|
1603 agreement->SetAgreementAcceptedL(); |
|
1604 |
|
1605 CleanupStack::PopAndDestroy(agreement); |
|
1606 } |
|
1607 AgreementHandledL(); |
|
1608 break; |
|
1609 case EInsufficientMemory: |
|
1610 break; |
|
1611 default: |
|
1612 break; |
|
1613 } |
|
1614 } |
1561 } |
1615 |
1562 |
1616 // ----------------------------------------------------------------------------- |
1563 // ----------------------------------------------------------------------------- |
1617 // CIAUpdateUiController::HandleUiRefreshL |
1564 // CIAUpdateUiController::HandleUiRefreshL |
1618 // |
1565 // |
2044 // Notice, that in case of cancellations there would not be any need |
1995 // Notice, that in case of cancellations there would not be any need |
2045 // for timer. But just use it as in normal cases. Then, server report |
1996 // for timer. But just use it as in normal cases. Then, server report |
2046 // completion or timer will call the callback later. But, that callback |
1997 // completion or timer will call the callback later. But, that callback |
2047 // will be ignored in CIAUpdateUiController::ServerReportSent because |
1998 // will be ignored in CIAUpdateUiController::ServerReportSent because |
2048 // iState is already then changed from ESendingReport to something else. |
1999 // iState is already then changed from ESendingReport to something else. |
2049 |
2000 const TInt KServerReportMaxWaitTime( 10000000 ); |
2050 //const TInt KServerReportMaxWaitTime( 10000000 ); //Commented TEMP |
2001 iController->FinishedUpdatesL( ETrue, KServerReportMaxWaitTime ); |
2051 //iController->FinishedUpdatesL( ETrue, KServerReportMaxWaitTime ); //Commented TEMP |
2002 iState = ESendingReport; |
2052 //iState = ESendingReport; //Commented temporarily |
|
2053 EndUpdateFlowL( KErrNone ); //TEMP |
|
2054 return; //TEMP |
|
2055 } |
2003 } |
2056 |
2004 |
2057 // When reports are sent, EndUpdateFlowL is called via the callback functions |
2005 // When reports are sent, EndUpdateFlowL is called via the callback functions |
2058 // and the update flow will be finished there. But, if we come here when cancel |
2006 // and the update flow will be finished there. But, if we come here when cancel |
2059 // is pressed, then call EndUpdateFlowL directly because then we do not wait |
2007 // is pressed, then call EndUpdateFlowL directly because then we do not wait |
2168 CArrayFix<TInt>* numberArray = new( ELeave ) CArrayFixFlat<TInt>( 2 ); |
2115 CArrayFix<TInt>* numberArray = new( ELeave ) CArrayFixFlat<TInt>( 2 ); |
2169 CleanupStack::PushL( numberArray ); |
2116 CleanupStack::PushL( numberArray ); |
2170 numberArray->AppendL( aNumber ); |
2117 numberArray->AppendL( aNumber ); |
2171 numberArray->AppendL( aTotalCount ); |
2118 numberArray->AppendL( aTotalCount ); |
2172 HBufC* noteText = NULL; |
2119 HBufC* noteText = NULL; |
2173 //noteText = StringLoader::LoadLC( aTextResourceId, |
2120 noteText = StringLoader::LoadLC( aTextResourceId, |
2174 // *stringArray, |
2121 *stringArray, |
2175 // *numberArray ); |
2122 *numberArray ); |
2176 TPtr ptr = noteText->Des(); |
2123 TPtr ptr = noteText->Des(); |
2177 //AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); |
2124 AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); |
2178 if ( iState == EDownloading ) |
2125 if ( iState == EDownloading ) |
2179 { |
2126 { |
2180 ShowProgressDialogL( *noteText, ETrue ); |
2127 ShowProgressDialogL( *noteText, ETrue ); |
2181 } |
2128 } |
2182 else |
2129 else |
2183 { |
2130 { |
2184 //ShowWaitDialogL( *noteText, ETrue ); |
2131 ShowWaitDialogL( *noteText, ETrue ); |
2185 } |
2132 } |
2186 |
2133 |
2187 CleanupStack::PopAndDestroy( noteText ); |
2134 CleanupStack::PopAndDestroy( noteText ); |
2188 CleanupStack::PopAndDestroy( numberArray ); |
2135 CleanupStack::PopAndDestroy( numberArray ); |
2189 CleanupStack::PopAndDestroy( stringArray ); |
2136 CleanupStack::PopAndDestroy( stringArray ); |
2190 |
2137 |
2191 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowUpdatingDialogL() end"); |
2138 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowUpdatingDialogL() end"); |
2192 }*/ |
2139 } |
2193 |
2140 |
2194 |
2141 |
2195 // --------------------------------------------------------------------------- |
2142 // --------------------------------------------------------------------------- |
2196 // CIAUpdateUiController::ShowWaitDialogL |
2143 // CIAUpdateUiController::ShowWaitDialogL |
2197 // |
2144 // |
2198 // --------------------------------------------------------------------------- |
2145 // --------------------------------------------------------------------------- |
2199 // |
2146 // |
2200 void CIAUpdateUiController::ShowWaitDialogL( const QString& aDisplayString, |
2147 void CIAUpdateUiController::ShowWaitDialogL( const TDesC& aDisplayString, |
2201 TBool /*aVisibilityDelayOff*/ ) |
2148 TBool aVisibilityDelayOff ) |
2202 { |
2149 { |
2203 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() begin"); |
2150 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() begin"); |
2204 if ( !mWaitDialog ) |
2151 |
2205 { |
2152 if ( iWaitDialog ) |
2206 mWaitDialog = new IAUpdateWaitDialog(); |
|
2207 mWaitDialog->SetCallback( this ); |
|
2208 mWaitDialog->showDialog( aDisplayString ); |
|
2209 } |
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 /*if ( iWaitDialog ) |
|
2215 { |
2153 { |
2216 IAUPDATE_TRACE("[IAUPDATE] Wait dialog already existed. Remove it first"); |
2154 IAUPDATE_TRACE("[IAUPDATE] Wait dialog already existed. Remove it first"); |
2217 // in some rare cases previous dialog still exists |
2155 // in some rare cases previous dialog still exists |
2218 // it's now just deleted (not recommended way) to avoid forwarding problem(s). |
2156 // it's now just deleted (not recommended way) to avoid forwarding problem(s). |
2219 //delete iWaitDialog; |
2157 delete iWaitDialog; |
2220 iWaitDialog = NULL; |
2158 iWaitDialog = NULL; |
2221 }*/ |
2159 } |
2222 /* iWaitDialog = |
2160 iWaitDialog = |
2223 new( ELeave ) CIAUpdateWaitDialog( |
2161 new( ELeave ) CIAUpdateWaitDialog( |
2224 reinterpret_cast< CEikDialog** >( &iWaitDialog ), |
2162 reinterpret_cast< CEikDialog** >( &iWaitDialog ), |
2225 aVisibilityDelayOff ); |
2163 aVisibilityDelayOff ); |
2226 |
2164 |
2227 iWaitDialog->SetTextL( aDisplayString ); |
2165 iWaitDialog->SetTextL( aDisplayString ); |
2228 iWaitDialog->SetCallback( this ); |
2166 iWaitDialog->SetCallback( this ); |
2229 iWaitDialog->ExecuteLD( R_IAUPDATE_WAIT_DIALOG ); */ |
2167 iWaitDialog->ExecuteLD( R_IAUPDATE_WAIT_DIALOG ); |
2230 |
2168 |
2231 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() end"); |
2169 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowWaitDialogL() end"); |
2232 } |
2170 } |
2233 |
2171 |
2234 |
2172 |
2235 // -------------------------------------------------------------------------- |
2173 // --------------------------------------------------------------------------- |
2236 // CIAUpdateUiController::ShowProgressDialogL |
2174 // CIAUpdateUiController::ShowProgressDialogL |
2237 // |
2175 // |
2238 // --------------------------------------------------------------------------- |
2176 // --------------------------------------------------------------------------- |
2239 // |
2177 // |
2240 void CIAUpdateUiController::ShowProgressDialogL( const TDesC& /*aDisplayString*/, |
2178 void CIAUpdateUiController::ShowProgressDialogL( const TDesC& aDisplayString, |
2241 TBool /*aVisibilityDelayOff*/ ) |
2179 TBool aVisibilityDelayOff ) |
2242 { |
2180 { |
2243 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() begin"); |
2181 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() begin"); |
2244 |
2182 |
2245 if ( iProgressDialog ) |
2183 if ( iProgressDialog ) |
2246 { |
2184 { |
2247 IAUPDATE_TRACE("[IAUPDATE] Progress dialog already existed. Remove it first"); |
2185 IAUPDATE_TRACE("[IAUPDATE] Progress dialog already existed. Remove it first"); |
2248 // in some rare cases previous dialog still exists |
2186 // in some rare cases previous dialog still exists |
2249 // it's now just deleted (not recommended way) to avoid forwarding problem(s). |
2187 // it's now just deleted (not recommended way) to avoid forwarding problem(s). |
2250 //delete iProgressDialog; |
2188 delete iProgressDialog; |
2251 iProgressDialog = NULL; |
2189 iProgressDialog = NULL; |
2252 } |
2190 } |
2253 /* iProgressDialog = |
2191 iProgressDialog = |
2254 new( ELeave ) CIAUpdateProgressDialog( |
2192 new( ELeave ) CIAUpdateProgressDialog( |
2255 reinterpret_cast< CEikDialog** >( &iProgressDialog ), |
2193 reinterpret_cast< CEikDialog** >( &iProgressDialog ), |
2256 aVisibilityDelayOff ); |
2194 aVisibilityDelayOff ); |
2257 |
2195 |
2258 iProgressDialog->SetTextL( aDisplayString ); |
2196 iProgressDialog->SetTextL( aDisplayString ); |
2259 iProgressDialog->SetCallback( this ); |
2197 iProgressDialog->SetCallback( this ); |
2260 iProgressDialog->ExecuteLD( R_IAUPDATE_PROGRESS_DIALOG ); */ |
2198 iProgressDialog->ExecuteLD( R_IAUPDATE_PROGRESS_DIALOG ); |
2261 |
2199 |
2262 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() end"); |
2200 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::ShowProgressDialogL() end"); |
2263 } |
2201 } |
2264 |
2202 |
2265 |
2203 |
2285 // --------------------------------------------------------------------------- |
2223 // --------------------------------------------------------------------------- |
2286 // |
2224 // |
2287 void CIAUpdateUiController::RemoveWaitDialogL() |
2225 void CIAUpdateUiController::RemoveWaitDialogL() |
2288 { |
2226 { |
2289 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() begin"); |
2227 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() begin"); |
2290 if ( mWaitDialog ) |
|
2291 { |
|
2292 mWaitDialog->close(); |
|
2293 } |
|
2294 /*if ( !iCancelling ) //that's needed because AVKON in 3.2.3 wk12, returning |
|
2295 //EFalse in TryToExitL() causes a crash |
|
2296 { |
|
2297 if ( iWaitDialog ) |
|
2298 { |
|
2299 iWaitDialog->ProcessFinishedL(); |
|
2300 } |
|
2301 }*/ |
|
2302 |
|
2303 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() end"); |
|
2304 } |
|
2305 |
|
2306 |
|
2307 // --------------------------------------------------------------------------- |
|
2308 // CIAUpdateUiController::RemoveProgressDialogL |
|
2309 // |
|
2310 // --------------------------------------------------------------------------- |
|
2311 // |
|
2312 void CIAUpdateUiController::RemoveProgressDialogL() |
|
2313 { |
|
2314 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() begin"); |
|
2315 |
2228 |
2316 if ( !iCancelling ) //that's needed because AVKON in 3.2.3 wk12, returning |
2229 if ( !iCancelling ) //that's needed because AVKON in 3.2.3 wk12, returning |
2317 //EFalse in TryToExitL() causes a crash |
2230 //EFalse in TryToExitL() causes a crash |
2318 { |
2231 { |
|
2232 if ( iWaitDialog ) |
|
2233 { |
|
2234 iWaitDialog->ProcessFinishedL(); |
|
2235 } |
|
2236 } |
|
2237 |
|
2238 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveWaitDialogL() end"); |
|
2239 } |
|
2240 |
|
2241 |
|
2242 // --------------------------------------------------------------------------- |
|
2243 // CIAUpdateUiController::RemoveProgressDialogL |
|
2244 // |
|
2245 // --------------------------------------------------------------------------- |
|
2246 // |
|
2247 void CIAUpdateUiController::RemoveProgressDialogL() |
|
2248 { |
|
2249 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() begin"); |
|
2250 |
|
2251 if ( !iCancelling ) //that's needed because AVKON in 3.2.3 wk12, returning |
|
2252 //EFalse in TryToExitL() causes a crash |
|
2253 { |
2319 if ( iProgressDialog ) |
2254 if ( iProgressDialog ) |
2320 { |
2255 { |
2321 //iProgressDialog->ProcessFinishedL(); |
2256 iProgressDialog->ProcessFinishedL(); |
2322 } |
2257 } |
2323 } |
2258 } |
2324 |
2259 |
2325 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() end"); |
2260 IAUPDATE_TRACE("[IAUPDATE] CIAUpdateUiController::RemoveProgressDialogL() end"); |
2326 } |
2261 } |
2720 { |
2655 { |
2721 iForcedRefresh = aForcedRefresh; |
2656 iForcedRefresh = aForcedRefresh; |
2722 } |
2657 } |
2723 |
2658 |
2724 // --------------------------------------------------------------------------- |
2659 // --------------------------------------------------------------------------- |
2725 // CIAUpdateUiController::RefreshNodeList |
|
2726 // |
|
2727 // --------------------------------------------------------------------------- |
|
2728 // |
|
2729 void CIAUpdateUiController::RefreshNodeList() |
|
2730 { |
|
2731 // Restore list after update, that nodes are shown in original sequence |
|
2732 iFilter->RestoreNodeListL( iNodes ); |
|
2733 // Remove installed nodes from the node array. |
|
2734 // Set temp UI state to normal for remaining nodes |
|
2735 for ( TInt i = iNodes.Count() - 1; i >= 0; --i ) |
|
2736 { |
|
2737 MIAUpdateNode* node = iNodes[ i ]; |
|
2738 if ( node->IsInstalled() ) |
|
2739 { |
|
2740 iNodes.Remove( i ); |
|
2741 } |
|
2742 else |
|
2743 { |
|
2744 node->SetUiState( MIAUpdateNode::ENormal ); |
|
2745 } |
|
2746 } |
|
2747 } |
|
2748 |
|
2749 |
|
2750 // --------------------------------------------------------------------------- |
|
2751 // CIAUpdateUiController::ParamsWriteFileL |
2660 // CIAUpdateUiController::ParamsWriteFileL |
2752 // |
2661 // |
2753 // --------------------------------------------------------------------------- |
2662 // --------------------------------------------------------------------------- |
2754 // |
2663 // |
2755 void CIAUpdateUiController::ParamsWriteFileL() |
2664 void CIAUpdateUiController::ParamsWriteFileL() |