129 STATIC_CAST( CNSmlDMSyncAppUi*, iEikonEnv->EikAppUi() )->CloseGs(); //control panel |
129 STATIC_CAST( CNSmlDMSyncAppUi*, iEikonEnv->EikAppUi() )->CloseGs(); //control panel |
130 break; |
130 break; |
131 }*/ |
131 }*/ |
132 |
132 |
133 case ENSmlMenuCmdFotaCheck: |
133 case ENSmlMenuCmdFotaCheck: |
134 { |
134 { |
135 InitiateFotaCheckL(); |
135 if(TUtil::ShowNativeDialogL(EPrivacyPolicy) == KErrNone) |
|
136 { |
|
137 InitiateFotaCheckL(); |
|
138 } |
136 break; |
139 break; |
137 } |
140 } |
138 case ENSmlMenuCmdFotaInstall: |
141 case ENSmlMenuCmdFotaInstall: |
139 { |
142 { |
140 InitiateFwUpdInstallL(); |
143 InitiateFwUpdInstallL(); |
205 // |
208 // |
206 void CNSmlDMFotaView::InitiateFotaCheckL() |
209 void CNSmlDMFotaView::InitiateFotaCheckL() |
207 { |
210 { |
208 FLOG( "[OMADM]\t CNSmlDMFotaView::InitiateFotaCheck()" ); |
211 FLOG( "[OMADM]\t CNSmlDMFotaView::InitiateFotaCheck()" ); |
209 TInt profileId( KErrNotFound ); |
212 TInt profileId( KErrNotFound ); |
210 TBool isValidId( EFalse ); |
213 TBool isValidId( EFalse ); |
211 HBufC* stringHolder = NULL; |
|
212 |
|
213 profileId = iFotaModel->DefaultFotaProfileIdL(); |
214 profileId = iFotaModel->DefaultFotaProfileIdL(); |
214 |
215 |
215 if ( profileId >= KErrNone ) |
216 if ( profileId >= KErrNone ) |
216 { |
217 { |
217 isValidId = iFotaModel->VerifyProfileL( profileId ); |
218 isValidId = iFotaModel->VerifyProfileL( profileId ); |
221 { |
222 { |
222 profileId = ShowFotaProfileQueryL(); |
223 profileId = ShowFotaProfileQueryL(); |
223 if( profileId == KErrNotFound ) |
224 if( profileId == KErrNotFound ) |
224 return; |
225 return; |
225 } |
226 } |
226 TInt query(EFalse); |
|
227 CRepository* cRepository=NULL; |
|
228 TRAPD ( error, cRepository = CRepository::NewL ( KCRUidNSmlNotifierDomainKeys ) ); |
|
229 if ( error == KErrNone ) |
|
230 { |
|
231 CleanupStack::PushL( cRepository ); |
|
232 TInt dmChargingNote(1); |
|
233 cRepository->Get ( KNSmlDMChargingNote, dmChargingNote ); |
|
234 if(dmChargingNote==1) |
|
235 { |
|
236 CAknQueryDialog* dlg = CAknQueryDialog::NewL(); |
|
237 CleanupStack::PushL( dlg ); |
|
238 stringHolder = StringLoader::LoadLC( R_QTN_FOTA_CONNECTION_NEEDED ); |
|
239 dlg->SetPromptL( stringHolder->Des() ); |
|
240 |
|
241 CleanupStack::PopAndDestroy( stringHolder ); |
|
242 stringHolder = NULL; |
|
243 |
|
244 CleanupStack::Pop( dlg ); |
|
245 |
|
246 query = dlg->ExecuteLD( R_SML_CONFIRMATION_QUERY ); |
|
247 } |
|
248 else |
|
249 query = ETrue; |
|
250 CleanupStack::PopAndDestroy( cRepository );//cRepository |
|
251 } |
|
252 if(query) |
|
253 { |
|
254 __ASSERT_ALWAYS( iFotaModel, TUtil::Panic( KErrGeneral ) ); |
227 __ASSERT_ALWAYS( iFotaModel, TUtil::Panic( KErrGeneral ) ); |
255 |
228 |
256 iFotaModel->EnableFwUpdRequestL( profileId ); |
229 iFotaModel->EnableFwUpdRequestL( profileId ); |
257 ( ( CNSmlDMSyncAppUi* ) AppUi() )->StartSyncL( profileId, ETrue ); |
230 ( ( CNSmlDMSyncAppUi* ) AppUi() )->StartSyncL( profileId, ETrue ); |
258 iFotaDLObserver->StartL(ETrue); |
231 iFotaDLObserver->StartL(ETrue); |
259 } |
|
260 |
232 |
261 FLOG( "[OMADM]\t CNSmlDMFotaView::InitiateFotaCheck() completed" ); |
233 FLOG( "[OMADM]\t CNSmlDMFotaView::InitiateFotaCheck() completed" ); |
262 } |
234 } |
263 |
235 |
264 // ----------------------------------------------------------------------------- |
236 // ----------------------------------------------------------------------------- |