|
1 /* |
|
2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Call submenu in General Settings. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "GSCallPlugin.h" //for CGSCallPlugin |
|
21 #include "GSCallPluginContainer.h" //for CGSCallPluginContainer |
|
22 #include "GsLogger.h" |
|
23 #include "GSCallPlugin.h" //for pluginUID |
|
24 #include <akntitle.h> // for title pane |
|
25 #include <coeaui.h> |
|
26 #include <hlplch.h> // For HlpLauncher |
|
27 #include <aknnotewrappers.h> //for Note Wrappers |
|
28 #include <aknradiobuttonsettingpage.h> //for Radiobutton pages |
|
29 #include <akntextsettingpage.h> //for TextSettings pages |
|
30 #include <aknmessagequerydialog.h> //for Message Query Dialog |
|
31 #include <aknViewAppUi.h> |
|
32 #include <aknnotedialog.h> |
|
33 #include <AknWaitDialog.h> |
|
34 #include <gscommon.hrh> |
|
35 |
|
36 // headers for still image |
|
37 #include <imageconversion.h> |
|
38 #include <MGFetch.h> // Image selection |
|
39 #include <DRMCommon.h> |
|
40 |
|
41 #include <eikmenup.h> //for menu bar |
|
42 #include <PsetContainer.h> //for container |
|
43 #include <PsuiContainer.h> //for CPsuiContainer |
|
44 #include <featmgr.h> |
|
45 #include <secuisecurityhandler.h> //for PIN2 query |
|
46 #include <secui.h> //for TSecUi |
|
47 #include <secuisecuritysettings.h> //for CSecuritySettings |
|
48 #include <gscallpluginrsc.rsg> //for resource IDs |
|
49 #include <gscallplugin.mbg> |
|
50 #include <gsfwviewuids.h> |
|
51 #include <gslistbox.h> //for CGSListBoxItemTextArray |
|
52 |
|
53 #include <settingsinternalcrkeys.h> |
|
54 #include <ctsydomainpskeys.h> |
|
55 #include <gsprivatepluginproviderids.h> |
|
56 |
|
57 // LOCAL CONSTANTS |
|
58 _LIT( KGSNameOfClass, "GSCallPlugin" ); |
|
59 _LIT( KGSVTStillImgPath, "" ); |
|
60 //Use default values for external calls. |
|
61 const TInt KGSUseDefault = 0; |
|
62 //Call Prefix setting page items |
|
63 const TInt KGSSettingItemOff = 1; |
|
64 const TInt KGSSettingItemOn = 0; |
|
65 //Lines in setting page. |
|
66 const TInt KGSFirstLine = 0; |
|
67 const TInt KGSSecondLine = 1; |
|
68 // Middle Softkey control ID. |
|
69 const TInt KGSMSKControlID = 3; |
|
70 |
|
71 // VT still image values. Basically everything above 0 should be considered as |
|
72 // 'On' value so do not compare with 1 |
|
73 const TInt KGSVTStillImageOff = 0; |
|
74 |
|
75 |
|
76 // ========================= MEMBER FUNCTIONS ================================ |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 // Constructor. |
|
80 // |
|
81 // --------------------------------------------------------------------------- |
|
82 CGSCallPlugin::CGSCallPlugin() |
|
83 :iMskCommandFlag( ETrue ) |
|
84 { |
|
85 } |
|
86 |
|
87 // --------------------------------------------------------------------------- |
|
88 // |
|
89 // Symbian OS two-phased constructor (second phase) |
|
90 // |
|
91 // --------------------------------------------------------------------------- |
|
92 void CGSCallPlugin::ConstructL() |
|
93 { |
|
94 __GSLOGSTRING("[GSCallPlugin]--> CGSCallPlugin::ConstructL"); |
|
95 OpenLocalizedResourceFileL( KGSCallPluginResourceFileName, |
|
96 iResourceLoader ); |
|
97 |
|
98 BaseConstructL( R_GS_CALL_VIEW ); |
|
99 |
|
100 iModel = CGSCallPluginModel::NewL(); |
|
101 iRestrictedClir = iModel->RestrictedSendCallerIdSupportedL(); |
|
102 iSecureClir = iModel->SecureSendCallerIdSupportedL(); |
|
103 __GSLOGSTRING("[GSCallPlugin]--> ConstructL - Model created"); |
|
104 iSettings = CPsetContainer::NewL(); |
|
105 __GSLOGSTRING("[GSCallPlugin]--> ConstructL - PSetContainer created"); |
|
106 iObsContainer = CPsuiContainer::NewL(); |
|
107 __GSLOGSTRING("[GSCallPlugin]--> ConstructL - PsuiContainer created"); |
|
108 iCwObserver = iObsContainer->CreateCWObsL(); |
|
109 __GSLOGSTRING("[GSCallPlugin]--> ConstructL - CreateCWObsL done"); |
|
110 iWaiting = iSettings->CreateCWObjectL( *iCwObserver ); |
|
111 __GSLOGSTRING("[GSCallPlugin]--> ConstructL - CreateCWObjectL done"); |
|
112 iSsSettings = new (ELeave) RSSSettings; |
|
113 __GSLOGSTRING("[GSCallPlugin]--> ConstructL - SSSettings created"); |
|
114 |
|
115 User::LeaveIfError( iSsSettings->Open() ); |
|
116 User::LeaveIfError( iSsSettings->RegisterAll( *this ) ); |
|
117 __GSLOGSTRING("[GSCallPlugin]--> ConstructL - SSSettings opening successful"); |
|
118 |
|
119 #ifndef __WINS__ |
|
120 iSsSettings->Get( ESSSettingsAls, iAls ); |
|
121 iSsSettings->Get( ESSSettingsAlsBlocking, iAlsBlock ); |
|
122 #endif //__WINS__ |
|
123 |
|
124 iVTImageSelectionOngoing = EFalse; |
|
125 |
|
126 __GSLOGSTRING("[GSCallPlugin] <--CGSCallPlugin::ConstructL"); |
|
127 } |
|
128 |
|
129 // --------------------------------------------------------------------------- |
|
130 // |
|
131 // Symbian OS two-phased constructor (first phase) |
|
132 // |
|
133 // --------------------------------------------------------------------------- |
|
134 CGSCallPlugin* CGSCallPlugin::NewLC() |
|
135 { |
|
136 CGSCallPlugin* self = new ( ELeave ) CGSCallPlugin; |
|
137 CleanupStack::PushL( self ); |
|
138 self->ConstructL(); |
|
139 return self; |
|
140 } |
|
141 |
|
142 // --------------------------------------------------------------------------- |
|
143 // CGSCallPlugin::NewL() |
|
144 // Static constructor |
|
145 // |
|
146 // --------------------------------------------------------------------------- |
|
147 // |
|
148 CGSCallPlugin* CGSCallPlugin::NewL( TAny* /*aInitParams*/ ) |
|
149 { |
|
150 CGSCallPlugin* self = new(ELeave) CGSCallPlugin(); |
|
151 CleanupStack::PushL(self); |
|
152 self->ConstructL(); |
|
153 CleanupStack::Pop(self); |
|
154 return self; |
|
155 } |
|
156 |
|
157 // --------------------------------------------------------------------------- |
|
158 // |
|
159 // Destructor |
|
160 // |
|
161 // --------------------------------------------------------------------------- |
|
162 CGSCallPlugin::~CGSCallPlugin() |
|
163 { |
|
164 __GSLOGSTRING("[GSCallPlugin] ~CGSCallPlugin()|->"); |
|
165 |
|
166 delete iObsContainer; |
|
167 delete iCwObserver; |
|
168 if ( iWaiting ) |
|
169 { |
|
170 delete iWaiting; |
|
171 } |
|
172 delete iSettings; |
|
173 |
|
174 if ( iSsSettings ) |
|
175 { |
|
176 iSsSettings->CancelAll( *this ); |
|
177 iSsSettings->Close(); |
|
178 delete iSsSettings; |
|
179 } |
|
180 |
|
181 if( iModel ) |
|
182 { |
|
183 delete iModel; |
|
184 } |
|
185 |
|
186 if( iImageHandler ) |
|
187 { |
|
188 delete iImageHandler; |
|
189 } |
|
190 |
|
191 __GSLOGSTRING("[GSCallPlugin] ~CGSCallPlugin()-|"); |
|
192 } |
|
193 |
|
194 // --------------------------------------------------------------------------- |
|
195 // |
|
196 // Returns Id of the Call submenu |
|
197 // |
|
198 // --------------------------------------------------------------------------- |
|
199 TUid CGSCallPlugin::Id() const |
|
200 { |
|
201 return KCallPluginUID; |
|
202 } |
|
203 |
|
204 // --------------------------------------------------------------------------- |
|
205 // |
|
206 // Handles user inputs in Options menu |
|
207 // |
|
208 // --------------------------------------------------------------------------- |
|
209 void CGSCallPlugin::HandleCommandL( TInt aCommand ) |
|
210 { |
|
211 __GSLOGSTRING1("[GSCallPlugin] HandleCommandL(%d)|->", aCommand ); |
|
212 switch ( aCommand ) |
|
213 { |
|
214 case EGSMSKCmdAppChange: |
|
215 HandleListBoxSelectionL(); |
|
216 break; |
|
217 // Command Obtained from Context Options |
|
218 // set in ProcessCommandL() |
|
219 case ECFCmdActivate: |
|
220 case EGSCmdCallWaitActivate: |
|
221 iWaiting->SetCallWaitingL( MPsetCallWaiting::EActivateCallWaiting, |
|
222 EAllTeleAndBearer ); |
|
223 break; |
|
224 // Command Obtained from Context Options |
|
225 // set in ProcessCommandL() |
|
226 case ECFCmdCheckStatus: |
|
227 case EGSCmdCallWaitInquiry: |
|
228 iWaiting->GetCallWaitingStatusL(); |
|
229 break; |
|
230 // Command Obtained from Context Options |
|
231 // set in ProcessCommandL() |
|
232 case ECFCmdCancel: |
|
233 case EGSCmdCallWaitDeactivate: |
|
234 iWaiting->SetCallWaitingL( MPsetCallWaiting::EDeactivateCallWaiting, |
|
235 EAllTeleAndBearer ); |
|
236 break; |
|
237 case EAppCmdCreatePopupList: |
|
238 { |
|
239 const TInt currentFeatureId = Container()->CurrentFeatureId(); |
|
240 HandleCreatePopupL( currentFeatureId ); |
|
241 } |
|
242 break; |
|
243 case EAknSoftkeyBack: |
|
244 iAppUi->ActivateLocalViewL( KGSTelPluginUid ); |
|
245 break; |
|
246 case EAknCmdHelp: |
|
247 { |
|
248 if( FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
249 { |
|
250 HlpLauncher::LaunchHelpApplicationL( |
|
251 iEikonEnv->WsSession(), iAppUi->AppHelpContextL() ); |
|
252 } |
|
253 break; |
|
254 } |
|
255 default: |
|
256 iAppUi->HandleCommandL( aCommand ); |
|
257 break; |
|
258 } |
|
259 __GSLOGSTRING("[CGSCallPlugin] HandleCommandL()-|"); |
|
260 } |
|
261 |
|
262 |
|
263 // --------------------------------------------------------------------------- |
|
264 // |
|
265 // Handles user inputs in Options menu |
|
266 // |
|
267 // --------------------------------------------------------------------------- |
|
268 void CGSCallPlugin::ProcessCommandL( TInt aCommand ) |
|
269 { |
|
270 MenuBar()->SetContextMenuTitleResourceId( R_CALL_DIVERT_MSK_CONTEXTMENUBAR ); |
|
271 // Call base class |
|
272 CAknView::ProcessCommandL( aCommand ); |
|
273 } |
|
274 // --------------------------------------------------------------------------- |
|
275 // |
|
276 // Activates the view |
|
277 // |
|
278 // --------------------------------------------------------------------------- |
|
279 void CGSCallPlugin::DoActivateL( const TVwsViewId& aPrevViewId , |
|
280 TUid aCustomMessageId, |
|
281 const TDesC8& aCustomMessage ) |
|
282 { |
|
283 __GSLOGSTRING( "[GSCallPlugin] DoActivateL()|->" ); |
|
284 CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage ); |
|
285 Container()->SetMiddleSoftkeyObserver( this ); |
|
286 SetMiddleSoftKeyLabelL( R_CALL_MSK_CHANGE, EGSMSKCmdAppChange ); |
|
287 // This way we set which command is set for MSK |
|
288 iMskCommandFlag = ETrue; |
|
289 // iContainer->iListBox->SetTopItemIndex( iTopItemIndex ); |
|
290 |
|
291 // if ( iCurrentItem >= 0 && |
|
292 // iCurrentItem < iContainer->iListBox->Model()->NumberOfItems() ) |
|
293 // { |
|
294 // iContainer->iListBox->SetCurrentItemIndexAndDraw( iCurrentItem ); |
|
295 // } |
|
296 CheckMiddleSoftkeyLabelL(); |
|
297 |
|
298 // If AppUid is different or placeholderview is used, this view has been launched from outside GS |
|
299 if ( iPrevViewId.iAppUid != KUidGS || iPrevViewId.iViewUid == TUid::Uid(0x0DEADBED ) ) |
|
300 { |
|
301 CEikButtonGroupContainer* cbaGroup = Cba(); |
|
302 if( cbaGroup ) |
|
303 { |
|
304 HBufC* rightSKText = StringLoader::LoadLC ( R_GS_CBA_EXIT ); |
|
305 TPtr rskPtr = rightSKText->Des(); |
|
306 cbaGroup->SetCommandL( 2, EAknSoftkeyExit, *rightSKText ); |
|
307 CleanupStack::PopAndDestroy( rightSKText ); |
|
308 } |
|
309 } |
|
310 |
|
311 __GSLOGSTRING( "[GSCallPlugin] DoActivateL()-|" ); |
|
312 } |
|
313 |
|
314 // --------------------------------------------------------------------------- |
|
315 // |
|
316 // Deactivates the view |
|
317 // |
|
318 // --------------------------------------------------------------------------- |
|
319 void CGSCallPlugin::DoDeactivate() |
|
320 { |
|
321 __GSLOGSTRING("[GSCallPlugin]--> DoDeactivate"); |
|
322 if ( iContainer ) |
|
323 { |
|
324 if ( iContainer->iListBox && iContainer->iListBox->View() ) |
|
325 { |
|
326 iTopItemIndex = iContainer->iListBox->TopItemIndex(); |
|
327 iCurrentItem = iContainer->iListBox->CurrentItemIndex(); |
|
328 } |
|
329 CGSBaseView::DoDeactivate(); |
|
330 } |
|
331 __GSLOGSTRING("[GSCallPlugin] <--DoDeactivate"); |
|
332 } |
|
333 |
|
334 |
|
335 |
|
336 // --------------------------------------------------------------------------- |
|
337 // |
|
338 // Handle status pane size changed |
|
339 // |
|
340 // --------------------------------------------------------------------------- |
|
341 void CGSCallPlugin::HandleStatusPaneSizeChange() |
|
342 { |
|
343 if ( Container() ) |
|
344 Container()->SetRect( ClientRect()); |
|
345 } |
|
346 |
|
347 |
|
348 // --------------------------------------------------------------------------- |
|
349 // |
|
350 // Shows setting page - for ON/OFF setting items |
|
351 // |
|
352 // --------------------------------------------------------------------------- |
|
353 void CGSCallPlugin::ShowSettingPageL( TGSCallItemIds aPage ) |
|
354 { |
|
355 __GSLOGSTRING("[GSCallPlugin]--> CGSCallPlugin::ShowSettingPageL"); |
|
356 |
|
357 CDesCArrayFlat* items = |
|
358 new ( ELeave ) CDesCArrayFlat( KGSCallPopupMenuItems ); |
|
359 CleanupStack::PushL( items ); |
|
360 |
|
361 TInt titleID = 0; |
|
362 TInt currentSettingItem = KErrNone; |
|
363 TCallSettId keyName = EGSNotSet; |
|
364 |
|
365 switch ( aPage ) |
|
366 { |
|
367 case EGSOpeningSlideAnswerCallItemId: |
|
368 keyName = EGSOpeningSlideAnswerCall; |
|
369 titleID = R_CP_SETTING_TITLE_OPENING_SLIDE; |
|
370 AppendItemL( *items, R_CP_SETTING_OPENING_SLIDE_ANSWER ); |
|
371 AppendItemL( *items, R_CP_SETTING_OPENING_SLIDE_NOT_ANSWER ); |
|
372 break; |
|
373 case EGSClosingSlideEndCallItemId: |
|
374 keyName = EGSClosingSlideEndCall; |
|
375 titleID = R_CP_SETTING_TITLE_CLOSING_SLIDE; |
|
376 AppendItemL( *items, R_CP_SETTING_CLOSING_SLIDE_END ); |
|
377 AppendItemL( *items, R_CP_SETTING_CLOSING_SLIDE_NOT_END ); |
|
378 break; |
|
379 case EGSICSendIntCallIdItemId: |
|
380 titleID = R_SET_IC_CLIR; |
|
381 AppendItemL( *items, R_SET_IC_CLIR_ON ); |
|
382 AppendItemL( *items, R_SET_IC_CLIR_OFF ); |
|
383 break; |
|
384 case EGSICWaitingItemId: |
|
385 titleID = R_SET_IC_WAITING; |
|
386 AppendItemL( *items, R_SET_IC_WAITING_ACTIVE ); |
|
387 AppendItemL( *items, R_SET_IC_WAITING_NOT_ACTIVE ); |
|
388 break; |
|
389 case EGSICPreferredTelephonyId: |
|
390 titleID = R_SET_IC_PREFERRED_TELEPHONE; |
|
391 AppendItemL( *items, R_SET_IC_PREFERRED_TELEPHONE_CS ); |
|
392 AppendItemL( *items, R_SET_IC_PREFERRED_TELEPHONE_PS ); |
|
393 break; |
|
394 case EGSDndItemId: |
|
395 titleID = R_SET_IC_DND; |
|
396 AppendItemL( *items, R_SET_IC_DND_ACTIVE ); |
|
397 AppendItemL( *items, R_SET_IC_DND_NOT_ACTIVE ); |
|
398 break; |
|
399 case EGSCliItemId: |
|
400 titleID = R_OWN_NUMBER_SENDING_HEADING; |
|
401 |
|
402 // Restrict the default option if necessary |
|
403 if ( !iRestrictedClir ) |
|
404 { |
|
405 AppendItemL( *items, R_CLI_SENDING_DEFAULT ); |
|
406 } |
|
407 |
|
408 AppendItemL( *items, R_CLI_SENDING_ON ); |
|
409 AppendItemL( *items, R_CLI_SENDING_OFF ); |
|
410 break; |
|
411 case EGSSummaryAfterCallItemId: |
|
412 keyName = EGSSummaryAfterCall; |
|
413 titleID = R_CTERM_SETTING; |
|
414 AppendItemL( *items, R_CALL_TERMINATION_NOTE_ON ); |
|
415 AppendItemL( *items, R_CALL_TERMINATION_NOTE_OFF ); |
|
416 break; |
|
417 default: |
|
418 Panic( KGSNameOfClass, EInvalidIndex ); |
|
419 break; |
|
420 } |
|
421 |
|
422 if ( aPage == EGSICSendIntCallIdItemId || |
|
423 aPage == EGSICWaitingItemId || |
|
424 aPage == EGSICPreferredTelephonyId || |
|
425 aPage == EGSDndItemId ) |
|
426 { |
|
427 currentSettingItem = GetLineForSelectedVoipSetting( aPage ); |
|
428 } |
|
429 // CLI item does not have a keyName and/or literal, hence |
|
430 // this additional checking for CLI item. |
|
431 else if ( aPage != EGSCliItemId && keyName != EGSNotSet ) |
|
432 { |
|
433 iModel->GetCallSettingValue( keyName, currentSettingItem ); |
|
434 __GSLOGSTRING1("[GSCallPlugin] ShowSettingPageL: currentSettingItem: %d", currentSettingItem); |
|
435 // switch value to settings page value |
|
436 SwitchValue( currentSettingItem ); |
|
437 } |
|
438 else |
|
439 { |
|
440 TInt err = iSsSettings->Get( ESSSettingsClir, currentSettingItem ); |
|
441 __GSLOGSTRING1("[GSCallPlugin] ShowSettingPageL: currentSettingItem1: %d", currentSettingItem); |
|
442 if ( err == KErrNone ) |
|
443 { |
|
444 CliConvertValue( currentSettingItem ); |
|
445 |
|
446 if ( iRestrictedClir ) |
|
447 { |
|
448 // For indexing listbox which does not include KGSCliDefault |
|
449 currentSettingItem--; |
|
450 } |
|
451 } |
|
452 } |
|
453 |
|
454 HBufC* buffer = NULL; |
|
455 |
|
456 buffer = HBufC::NewLC( KGSMaxStringLength ); |
|
457 TPtr str = buffer->Des(); |
|
458 StringLoader::Load( str, titleID ); |
|
459 |
|
460 TPtr string = buffer->Des(); |
|
461 const TInt oldSettingItem = currentSettingItem; |
|
462 CAknRadioButtonSettingPage* dlg = new ( ELeave ) |
|
463 CAknRadioButtonSettingPage( |
|
464 &string, |
|
465 EAknSettingPageNoOrdinalDisplayed, |
|
466 KGSUseDefault, |
|
467 KGSUseDefault, |
|
468 R_SETTING_PAGE, |
|
469 currentSettingItem, |
|
470 items ); |
|
471 |
|
472 if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) |
|
473 { |
|
474 const TBool settingItemChanged = oldSettingItem != currentSettingItem; |
|
475 |
|
476 if ( aPage == EGSICSendIntCallIdItemId || |
|
477 aPage == EGSICWaitingItemId || |
|
478 aPage == EGSICPreferredTelephonyId || |
|
479 aPage == EGSDndItemId ) |
|
480 { |
|
481 // Change new VoIP setting based selected line. |
|
482 SetVoipSettingBasedSelectedLine( aPage, currentSettingItem ); |
|
483 } |
|
484 else |
|
485 { |
|
486 if ( aPage != EGSCliItemId && keyName != EGSNotSet ) |
|
487 { |
|
488 // switch settings page value to shared data value |
|
489 SwitchValue( currentSettingItem ); |
|
490 iModel->SetCallSettingValue( keyName, currentSettingItem ); |
|
491 __GSLOGSTRING1("[GSCallPlugin] ShowSettingPageL: currentSettingItem2: %d", currentSettingItem); |
|
492 } |
|
493 else |
|
494 { |
|
495 if ( iRestrictedClir ) |
|
496 { |
|
497 // For indexing listbox which does not include KGSCliDefault |
|
498 currentSettingItem++; |
|
499 } |
|
500 |
|
501 CliConvertValue( currentSettingItem ); |
|
502 |
|
503 // Secure setting of Send Caller Id if required |
|
504 if ( !iSecureClir ) |
|
505 { |
|
506 iSsSettings->Set( ESSSettingsClir, currentSettingItem ); |
|
507 } |
|
508 else |
|
509 { |
|
510 if ( settingItemChanged && MakeSecCodeQueryL() ) |
|
511 { |
|
512 iSsSettings->Set( ESSSettingsClir, currentSettingItem ); |
|
513 } |
|
514 } |
|
515 __GSLOGSTRING1("[GSCallPlugin] ShowSettingPageL: currentSettingItem3: %d", currentSettingItem); |
|
516 } |
|
517 } |
|
518 |
|
519 UpdateListBoxL( aPage, currentSettingItem ); |
|
520 } |
|
521 |
|
522 CleanupStack::PopAndDestroy( buffer ); |
|
523 CleanupStack::PopAndDestroy( items ); |
|
524 __GSLOGSTRING("[GSCallPlugin] <--CGSCallPlugin::ShowSettingPageL"); |
|
525 } |
|
526 |
|
527 // --------------------------------------------------------------------------- |
|
528 // |
|
529 // Shows ALS setting page - either line blocking or line selected |
|
530 // |
|
531 // --------------------------------------------------------------------------- |
|
532 void CGSCallPlugin::ShowAlsSettingPageL( TGSCallItemIds aPage ) |
|
533 { |
|
534 __GSLOGSTRING("[GSCallPlugin]--> CGSCallPlugin::ShowAlsSettingPageL"); |
|
535 CDesCArrayFlat* items = new ( ELeave ) CDesCArrayFlat( KGSCallPopupMenuItems ); |
|
536 CleanupStack::PushL( items ); |
|
537 |
|
538 TInt currentItem = 0; |
|
539 |
|
540 switch ( aPage ) |
|
541 { |
|
542 case EGSLineChangeItemId: |
|
543 //causes PIN2 query to launch, if necessary |
|
544 if ( iAlsBlock == ESSSettingsAlsBlockingOn ) |
|
545 { |
|
546 TInt pin = MakePin2QueryL(); |
|
547 if ( pin != KGSPinQueryOk ) |
|
548 { |
|
549 CleanupStack::PopAndDestroy( items ); |
|
550 return; //User failed in Pin2 Query |
|
551 } |
|
552 } |
|
553 AppendItemL( *items, R_ALS_LINE1 ); |
|
554 AppendItemL( *items, R_ALS_LINE2 ); |
|
555 currentItem = iAls - 1; |
|
556 break; |
|
557 case EGSALSBlockItemId: |
|
558 { |
|
559 TInt pin = MakePin2QueryL(); |
|
560 if ( pin != KGSPinQueryOk ) |
|
561 { |
|
562 CleanupStack::PopAndDestroy( items ); |
|
563 return; //User failed in Pin2 Query |
|
564 } |
|
565 AppendItemL( *items, R_ALS_LINE_BLOCKING_ON ); |
|
566 AppendItemL( *items, R_ALS_LINE_BLOCKING_OFF ); |
|
567 if ( iAlsBlock == ESSSettingsAlsBlockingOn ) |
|
568 { |
|
569 currentItem = KGSAlsBlockOn; |
|
570 } |
|
571 else |
|
572 { |
|
573 currentItem = KGSAlsBlockOff; |
|
574 } |
|
575 break; |
|
576 } |
|
577 default: |
|
578 Panic( KGSNameOfClass, EInvalidIndex ); |
|
579 break; |
|
580 } |
|
581 HBufC* buffer = |
|
582 HBufC::NewLC( KGSMaxStringLength ); |
|
583 TPtr string( buffer->Des() ); |
|
584 StringLoader::Load( |
|
585 string, |
|
586 ( aPage == EGSLineChangeItemId ) ? |
|
587 R_ALS_LINE_SELECTION_MODE : |
|
588 R_ALS_PHONELINE_BLOCK_MODE ); |
|
589 |
|
590 CAknRadioButtonSettingPage* dlg = new ( ELeave ) |
|
591 CAknRadioButtonSettingPage( |
|
592 &string, |
|
593 EAknSettingPageNoOrdinalDisplayed, |
|
594 KGSUseDefault, |
|
595 KGSUseDefault, |
|
596 R_SETTING_PAGE, |
|
597 currentItem, |
|
598 items ); |
|
599 |
|
600 // handle als and blocking separately... |
|
601 if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) |
|
602 { |
|
603 if ( aPage == EGSALSBlockItemId ) |
|
604 { |
|
605 AlsBlockConvertValue( currentItem ); |
|
606 iSsSettings->Set( ESSSettingsAlsBlocking, iAlsBlock ); |
|
607 } |
|
608 else if ( aPage == EGSLineChangeItemId ) |
|
609 { |
|
610 iAls = currentItem + 1; |
|
611 iSsSettings->Set( ESSSettingsAls, iAls ); |
|
612 } |
|
613 } |
|
614 CleanupStack::PopAndDestroy( 2 ); // items, string |
|
615 __GSLOGSTRING("[GSCallPlugin] <--CGSCallPlugin::ShowAlsSettingPageL"); |
|
616 } |
|
617 |
|
618 |
|
619 // --------------------------------------------------------------------------- |
|
620 // |
|
621 // Changes value from 0 to 1 and vice versa |
|
622 // Used when Central Repository is enabled |
|
623 // |
|
624 // --------------------------------------------------------------------------- |
|
625 void CGSCallPlugin::SwitchOnOffSetting( TCallSettId aSetting ) |
|
626 { |
|
627 TInt value = KGSSettingOff; |
|
628 // Reads a value and switches value (0 -> 1, 1 -> 0). |
|
629 iModel->GetCallSettingValue( aSetting, value ); |
|
630 SwitchValue( value ); |
|
631 iModel->SetCallSettingValue( aSetting, value ); |
|
632 } |
|
633 |
|
634 // --------------------------------------------------------------------------- |
|
635 // |
|
636 // Appends given item to given list |
|
637 // |
|
638 // --------------------------------------------------------------------------- |
|
639 void CGSCallPlugin::AppendItemL( CDesCArrayFlat& aList, TInt aItem ) |
|
640 { |
|
641 HBufC* string = StringLoader::LoadLC( aItem ); |
|
642 aList.AppendL( *string ); |
|
643 CleanupStack::PopAndDestroy( string ); |
|
644 } |
|
645 |
|
646 // --------------------------------------------------------------------------- |
|
647 // |
|
648 // Selects what kind of menu is created |
|
649 // |
|
650 // --------------------------------------------------------------------------- |
|
651 void CGSCallPlugin::HandleCreatePopupL( TInt aIndex ) |
|
652 { |
|
653 __GSLOGSTRING("[GSCallPlugin]--> CGSCallPlugin::HandleCreatePopupL"); |
|
654 switch ( aIndex ) |
|
655 { |
|
656 case EGSCallWaitingItemId: |
|
657 break; |
|
658 case EGSLineChangeItemId: |
|
659 ShowAlsSettingPageL( EGSLineChangeItemId ); |
|
660 break; |
|
661 case EGSALSBlockItemId: |
|
662 ShowAlsSettingPageL( EGSALSBlockItemId ); |
|
663 break; |
|
664 case EGSSoftRejectTextItemId: |
|
665 ShowSoftRejectSettingPageL(); |
|
666 UpdateListBoxL( EGSSoftRejectTextItemId, KGSNotUsed ); |
|
667 break; |
|
668 case EGSStillImageItemId: |
|
669 if ( FeatureManager::FeatureSupported( |
|
670 KFeatureIdCsVideoTelephony ) ) |
|
671 { |
|
672 ShowVTStillImageSettingPageL(); |
|
673 } |
|
674 break; |
|
675 case EGSOwnImageVtCallItemId: |
|
676 if ( FeatureManager::FeatureSupported( |
|
677 KFeatureIdCsVideoTelephony ) ) |
|
678 { |
|
679 ShowOwnImageVtCallSettingPageL(); |
|
680 } |
|
681 break; |
|
682 case EGSReplacePrefixItemId: |
|
683 if ( FeatureManager::FeatureSupported( KFeatureIdJapanPrefixChange ) ) |
|
684 { |
|
685 ChangePrefixSettingL( ETrue ); |
|
686 UpdateListBoxL( EGSReplacePrefixItemId, KGSNotUsed ); |
|
687 } |
|
688 break; |
|
689 case EGSShowCallDurationItemId: |
|
690 ChangeCallDurationSettingL( ETrue ); |
|
691 UpdateListBoxL( EGSShowCallDurationItemId, KGSNotUsed ); |
|
692 break; |
|
693 case EGSLongPressCallKeyItemId: |
|
694 #ifdef RD_VT_LONG_SEND_KEY |
|
695 ChangeLongPressCallKeySettingL( ETrue ); |
|
696 #endif |
|
697 break; |
|
698 default: |
|
699 ShowSettingPageL( static_cast<TGSCallItemIds> ( aIndex ) ); |
|
700 break; |
|
701 } |
|
702 __GSLOGSTRING("[GSCallPlugin] <--CGSCallPlugin::HandleCreatePopupL"); |
|
703 } |
|
704 |
|
705 // --------------------------------------------------------------------------- |
|
706 // |
|
707 // Sets title text to a setting page |
|
708 // |
|
709 // --------------------------------------------------------------------------- |
|
710 void CGSCallPlugin::SetTitleToSettingL( CAknRadioButtonSettingPage& aDlg, |
|
711 TInt aTitleID ) |
|
712 { |
|
713 HBufC* title = StringLoader::LoadLC ( aTitleID ); |
|
714 aDlg.SetSettingTextL( *title ); |
|
715 CleanupStack::PopAndDestroy( title ); |
|
716 } |
|
717 |
|
718 |
|
719 /*// --------------------------------------------------------------------------- |
|
720 // |
|
721 // Sets title text to a status pane |
|
722 // |
|
723 // --------------------------------------------------------------------------- |
|
724 void CGSCallPlugin::SetTitleL( TInt aTitleID ) |
|
725 { |
|
726 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
727 CleanupStack::PushL(statusPane); |
|
728 CAknTitlePane* titlePane = (CAknTitlePane*) statusPane->ControlL(TUid::Uid( |
|
729 EEikStatusPaneUidTitle)); |
|
730 CleanupStack::PushL( titlePane ); |
|
731 |
|
732 TResourceReader reader; |
|
733 iCoeEnv->CreateResourceReaderLC( reader, aTitleID ); |
|
734 titlePane->SetFromResourceL( reader ); |
|
735 |
|
736 CleanupStack::PopAndDestroy();//reader |
|
737 |
|
738 CleanupStack::Pop(titlePane); |
|
739 CleanupStack::Pop(statusPane); |
|
740 } |
|
741 */ |
|
742 |
|
743 // --------------------------------------------------------------------------- |
|
744 // |
|
745 // Switches value between setting page and shared data. |
|
746 // Values in shared data do not map nicely to values in setting menu, |
|
747 // therefore sharedData:SettingOn(1) => settingPage:IndexOn(0). |
|
748 // --------------------------------------------------------------------------- |
|
749 TInt CGSCallPlugin::SwitchValue( TInt& aValue ) |
|
750 { |
|
751 if ( aValue == KGSSettingOn ) |
|
752 { |
|
753 aValue = KGSIndexOn; |
|
754 } |
|
755 else if ( aValue == KGSSettingOff ) |
|
756 { |
|
757 aValue = KGSIndexOff; |
|
758 } |
|
759 return aValue; |
|
760 } |
|
761 |
|
762 // --------------------------------------------------------------------------- |
|
763 // |
|
764 // Observes changes to ALS, ALS Block and CLIR values. |
|
765 // |
|
766 // --------------------------------------------------------------------------- |
|
767 void CGSCallPlugin::PhoneSettingChanged( TSSSettingsSetting aSetting, |
|
768 TInt aNewValue ) |
|
769 { |
|
770 __GSLOGSTRING("[GSCallPlugin]--> CGSCallPlugin::PhoneSettingChanged"); |
|
771 TInt updateMe = KErrNone; |
|
772 switch( aSetting ) |
|
773 { |
|
774 case ESSSettingsClir: |
|
775 iClir = aNewValue; |
|
776 updateMe = EGSCliItemId; |
|
777 break; |
|
778 case ESSSettingsAls: |
|
779 iAls = aNewValue; |
|
780 updateMe = EGSLineChangeItemId; |
|
781 break; |
|
782 case ESSSettingsAlsBlocking: |
|
783 iAlsBlock = aNewValue; |
|
784 updateMe = EGSALSBlockItemId; |
|
785 TRAP_IGNORE( ShowAlsBlockNoteL() ); |
|
786 break; |
|
787 default: |
|
788 break; |
|
789 } |
|
790 __GSLOGSTRING1("[GSCallPlugin] PhoneSettingChanged: aNewValue: %d", aNewValue); |
|
791 if ( ( iContainer ) && ( updateMe != KErrNone ) ) |
|
792 { |
|
793 TRAP_IGNORE( UpdateListBoxL( updateMe, aNewValue ) ); |
|
794 } |
|
795 __GSLOGSTRING("[GSCallPlugin] <--CGSCallPlugin::PhoneSettingChanged"); |
|
796 } |
|
797 |
|
798 // --------------------------------------------------------------------------- |
|
799 // |
|
800 // Shows notes when Als Block value has been changed. |
|
801 // |
|
802 // --------------------------------------------------------------------------- |
|
803 void CGSCallPlugin::ShowAlsBlockNoteL() |
|
804 { |
|
805 TInt noteText; |
|
806 if ( iAlsBlock == ESSSettingsAlsBlockingOn ) |
|
807 { |
|
808 noteText = R_ALS_LINE_BLOCKING_ON_SEL; |
|
809 } |
|
810 else |
|
811 { |
|
812 noteText = R_ALS_LINE_BLOCKING_OFF_SEL; |
|
813 } |
|
814 |
|
815 HBufC* string = StringLoader::LoadLC( noteText ); |
|
816 CAknInformationNote* note = new ( ELeave ) CAknInformationNote(); |
|
817 note->ExecuteLD( *string ); |
|
818 CleanupStack::PopAndDestroy( string ); |
|
819 } |
|
820 |
|
821 // --------------------------------------------------------------------------- |
|
822 // |
|
823 // Creates new iContainer. |
|
824 // |
|
825 // --------------------------------------------------------------------------- |
|
826 void CGSCallPlugin::NewContainerL() |
|
827 { |
|
828 __GSLOGSTRING("[GSCallPlugin]--> NewContainerL"); |
|
829 iContainer = new (ELeave) CGSCallPluginContainer; |
|
830 __GSLOGSTRING("[GSCallPlugin] <--NewContainerL"); |
|
831 } |
|
832 |
|
833 // --------------------------------------------------------------------------- |
|
834 // CGSCallPlugin::HandleListBoxSelectionL |
|
835 // |
|
836 // Handle user selection in the listbox to perform an associated action |
|
837 // --------------------------------------------------------------------------- |
|
838 void CGSCallPlugin::HandleListBoxSelectionL() |
|
839 { |
|
840 TBool updateValue = EFalse; |
|
841 TInt value( KErrNone ); |
|
842 CEikMenuBar* menuBar = this->MenuBar(); |
|
843 |
|
844 const TInt currentFeatureId = Container()->CurrentFeatureId(); |
|
845 |
|
846 TBool featureVoipSupported = iModel->VoIPSupported(); |
|
847 |
|
848 switch ( currentFeatureId ) |
|
849 { |
|
850 case EGSOpeningSlideAnswerCallItemId: |
|
851 SwitchOnOffSetting( EGSOpeningSlideAnswerCall ); |
|
852 updateValue = ETrue; |
|
853 break; |
|
854 case EGSClosingSlideEndCallItemId: |
|
855 SwitchOnOffSetting( EGSClosingSlideEndCall ); |
|
856 updateValue = ETrue; |
|
857 break; |
|
858 case EGSCliItemId: |
|
859 ShowSettingPageL( EGSCliItemId ); |
|
860 break; |
|
861 case EGSCallWaitingItemId: |
|
862 iRockerPress = ETrue; |
|
863 menuBar->SetMenuType(CEikMenuBar::EMenuContext); |
|
864 menuBar->TryDisplayMenuBarL(); |
|
865 menuBar->SetMenuType(CEikMenuBar::EMenuOptions); |
|
866 iRockerPress = EFalse; |
|
867 break; |
|
868 case EGSICSendIntCallIdItemId: // Send my Internet call id. |
|
869 if ( featureVoipSupported ) |
|
870 { |
|
871 iModel->GetVoIPCallSettingValue( EGSVoIPSendIntCallId, value ); |
|
872 |
|
873 if ( value == EGSSendIntCallIdOff ) |
|
874 { |
|
875 iModel->SetVoIPCallSettingValue( |
|
876 EGSVoIPSendIntCallId, EGSSendIntCallIdOn ); |
|
877 } |
|
878 else |
|
879 { |
|
880 iModel->SetVoIPCallSettingValue( |
|
881 EGSVoIPSendIntCallId, EGSSendIntCallIdOff ); |
|
882 |
|
883 TInt status( KErrNone ); |
|
884 iModel->GetSCCPStatus( status ); |
|
885 |
|
886 if ( status == 1 ) |
|
887 { |
|
888 HBufC* prompt = StringLoader:: |
|
889 LoadLC( R_QTN_VOIP_SCCP_NO_CLIR ); |
|
890 CAknInformationNote* note = |
|
891 new(ELeave) CAknInformationNote( ETrue ); |
|
892 note->ExecuteLD( *prompt ); |
|
893 CleanupStack::PopAndDestroy( prompt ); |
|
894 } |
|
895 } |
|
896 updateValue = ETrue; |
|
897 } |
|
898 break; |
|
899 case EGSICWaitingItemId: // Internet call waiting item. |
|
900 if ( featureVoipSupported ) |
|
901 { |
|
902 iModel->GetVoIPCallSettingValue( EGSVoIPCW, value ); |
|
903 |
|
904 if ( value == EGSCSCallWaitingOff ) |
|
905 { |
|
906 iModel->SetVoIPCallSettingValue( |
|
907 EGSVoIPCW, EGSCSCallWaitingOn ); |
|
908 } |
|
909 else |
|
910 { |
|
911 iModel->SetVoIPCallSettingValue( |
|
912 EGSVoIPCW, EGSCSCallWaitingOff ); |
|
913 } |
|
914 updateValue = ETrue; |
|
915 } |
|
916 break; |
|
917 case EGSICPreferredTelephonyId: // Preferred call type. |
|
918 if ( featureVoipSupported ) |
|
919 { |
|
920 iModel->GetVoIPCallSettingValue( EGSVoIPPreType, value ); |
|
921 |
|
922 if ( value == EGSPreferredCS ) |
|
923 { |
|
924 iModel->SetVoIPCallSettingValue( |
|
925 EGSVoIPPreType, EGSPreferredPS ); |
|
926 |
|
927 // Show message query dialog if preferred call |
|
928 // setting was changed to the Int. Telephone. |
|
929 ShowPreferredTelephonyNoteL(); |
|
930 } |
|
931 else |
|
932 { |
|
933 iModel->SetVoIPCallSettingValue( |
|
934 EGSVoIPPreType, EGSPreferredCS ); |
|
935 } |
|
936 updateValue = ETrue; |
|
937 } |
|
938 break; |
|
939 case EGSDndItemId: // Do not disturb. |
|
940 if ( featureVoipSupported ) |
|
941 { |
|
942 iModel->GetVoIPCallSettingValue( EGSVoIPDnd, value ); |
|
943 |
|
944 if ( value == EGSCSCallDndOff ) |
|
945 { |
|
946 iModel->SetVoIPCallSettingValue( |
|
947 EGSVoIPDnd, EGSCSCallDndOn ); |
|
948 } |
|
949 else |
|
950 { |
|
951 iModel->SetVoIPCallSettingValue( |
|
952 EGSVoIPDnd, EGSCSCallDndOff ); |
|
953 } |
|
954 updateValue = ETrue; |
|
955 } |
|
956 break; |
|
957 case EGSSoftRejectTextItemId: |
|
958 ShowSoftRejectSettingPageL(); |
|
959 updateValue = ETrue; |
|
960 break; |
|
961 case EGSSummaryAfterCallItemId: |
|
962 SwitchOnOffSetting( EGSSummaryAfterCall ); |
|
963 updateValue = ETrue; |
|
964 break; |
|
965 case EGSLineChangeItemId: |
|
966 SwitchAlsSettingL(); |
|
967 break; |
|
968 case EGSALSBlockItemId: |
|
969 ShowAlsSettingPageL( EGSALSBlockItemId ); |
|
970 break; |
|
971 //Still image listbox creating |
|
972 case EGSStillImageItemId: |
|
973 if ( FeatureManager::FeatureSupported( |
|
974 KFeatureIdCsVideoTelephony ) && |
|
975 !iVTImageSelectionOngoing ) |
|
976 { |
|
977 //Locking listbox selection so user cannot click |
|
978 //VT still image item twice |
|
979 iVTImageSelectionOngoing = ETrue; |
|
980 |
|
981 //This takes some time |
|
982 ShowVTStillImageSettingPageL(); |
|
983 |
|
984 //Releasing lock |
|
985 iVTImageSelectionOngoing = EFalse; |
|
986 } |
|
987 break; |
|
988 case EGSOwnImageVtCallItemId: |
|
989 if ( FeatureManager::FeatureSupported( |
|
990 KFeatureIdCsVideoTelephony ) ) |
|
991 { |
|
992 ShowOwnImageVtCallSettingPageL(); |
|
993 } |
|
994 break; |
|
995 case EGSReplacePrefixItemId: |
|
996 if ( FeatureManager::FeatureSupported( KFeatureIdJapanPrefixChange ) ) |
|
997 { |
|
998 ChangePrefixSettingL( EFalse ); |
|
999 updateValue = ETrue; |
|
1000 } |
|
1001 break; |
|
1002 case EGSShowCallDurationItemId: |
|
1003 ChangeCallDurationSettingL( EFalse ); |
|
1004 updateValue = ETrue; |
|
1005 break; |
|
1006 case EGSLongPressCallKeyItemId: |
|
1007 #ifdef RD_VT_LONG_SEND_KEY |
|
1008 ChangeLongPressCallKeySettingL( EFalse ); |
|
1009 #endif |
|
1010 break; |
|
1011 default: |
|
1012 break; |
|
1013 } |
|
1014 if ( updateValue ) |
|
1015 { |
|
1016 UpdateListBoxL( currentFeatureId, KGSNotUsed ); |
|
1017 } |
|
1018 } |
|
1019 |
|
1020 // --------------------------------------------------------------------------- |
|
1021 // |
|
1022 // Converts value from setting page to SsSettings: |
|
1023 // settin page: line change disabled(0) => ESSSettingsAlsBlockingOn(2) |
|
1024 // settin page: line change enabled(1) => ESSSettingsAlsBlockingOff(1) |
|
1025 // --------------------------------------------------------------------------- |
|
1026 // |
|
1027 void CGSCallPlugin::AlsBlockConvertValue( TInt& aValue ) |
|
1028 { |
|
1029 __GSLOGSTRING("[GSCallPlugin]--> CGSCallPlugin::AlsBlockConvertValue"); |
|
1030 __GSLOGSTRING1("[GSCallPlugin] AlsBlockConvertValue: aValue: %d", aValue); |
|
1031 if ( aValue == KGSAlsBlockOn ) |
|
1032 { |
|
1033 iAlsBlock = ESSSettingsAlsBlockingOn; |
|
1034 } |
|
1035 else |
|
1036 { |
|
1037 iAlsBlock = ESSSettingsAlsBlockingOff; |
|
1038 } |
|
1039 __GSLOGSTRING1("[GSCallPlugin] AlsBlockConvertValue: aValue: %d", aValue); |
|
1040 __GSLOGSTRING("[GSCallPlugin] <--CGSCallPlugin::AlsBlockConvertValue"); |
|
1041 } |
|
1042 |
|
1043 // --------------------------------------------------------------------------- |
|
1044 // |
|
1045 // Converts value from setting page to SsSettings: |
|
1046 // settin page: own number sending default(0) => |
|
1047 // SsSettings: ESSSettingsClirNetworkDefault(0) |
|
1048 // settin page: own number sending on (1) => |
|
1049 // SsSettings: ESSSettingsClirExplicitSuppress(2) |
|
1050 // settin page: own number sending off (2) => |
|
1051 // SsSettings: ESSSettingsClirExplicitInvoke(1) |
|
1052 // --------------------------------------------------------------------------- |
|
1053 // |
|
1054 void CGSCallPlugin::CliConvertValue( TInt& aValue ) |
|
1055 { |
|
1056 switch ( aValue ) |
|
1057 { |
|
1058 case KGSCliDefault: |
|
1059 aValue = ESSSettingsClirNetworkDefault; |
|
1060 break; |
|
1061 case KGSCliOn: |
|
1062 aValue = ESSSettingsClirExplicitSuppress; |
|
1063 break; |
|
1064 case KGSCliOff: |
|
1065 aValue = ESSSettingsClirExplicitInvoke; |
|
1066 break; |
|
1067 default: |
|
1068 //error, return to-be converted value w/o changes |
|
1069 break; |
|
1070 } |
|
1071 } |
|
1072 |
|
1073 // --------------------------------------------------------------------------- |
|
1074 // |
|
1075 // Updates specific value to container. |
|
1076 // |
|
1077 // --------------------------------------------------------------------------- |
|
1078 // |
|
1079 void CGSCallPlugin::UpdateListBoxL( const TInt& aListItem, |
|
1080 TInt aNewValue ) |
|
1081 { |
|
1082 /*if ( aListItem == EGSStillImageItemId ) |
|
1083 { |
|
1084 TRAP_IGNORE( iAvkonAppUi->StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ); |
|
1085 SetTitleL( R_GS_CALL_VIEW_TITLE ); |
|
1086 TRAP_IGNORE( iAvkonAppUi->StatusPane()->DrawNow() ); |
|
1087 }*/ |
|
1088 if ( Container() ) |
|
1089 { |
|
1090 Container()->UpdateListBoxL( aListItem, aNewValue ); |
|
1091 } |
|
1092 CheckMiddleSoftkeyLabelL(); |
|
1093 } |
|
1094 |
|
1095 // --------------------------------------------------------------------------- |
|
1096 // |
|
1097 // Before showing a options menu |
|
1098 // |
|
1099 // --------------------------------------------------------------------------- |
|
1100 // |
|
1101 void CGSCallPlugin::DynInitMenuPaneL( TInt aResourceId, |
|
1102 CEikMenuPane* aMenuPane ) |
|
1103 { |
|
1104 __GSLOGSTRING("[GSCallPlugin]--> DynInitMenuPaneL"); |
|
1105 const TInt currentFeatureId = Container()->CurrentFeatureId(); |
|
1106 CEikMenuBar* menuBar = this->MenuBar(); |
|
1107 if ( aResourceId == R_GS_CALL_VIEW_MENU ) |
|
1108 { |
|
1109 if ( currentFeatureId == EGSCallWaitingItemId ) |
|
1110 { |
|
1111 //add CW menu |
|
1112 if (MenuBar()->ItemSpecificCommandsEnabled() || MenuBar()->GetMenuType() == CEikMenuBar::EMenuContext) |
|
1113 { |
|
1114 aMenuPane->AddMenuItemsL( R_GS_CALL_WAIT_VIEW_MENU,EAppCmdCreatePopupList ); |
|
1115 } |
|
1116 |
|
1117 //hide Change if call waiting is selected |
|
1118 aMenuPane->SetItemDimmed( EAppCmdCreatePopupList, ETrue ); |
|
1119 |
|
1120 if ( iRockerPress ) |
|
1121 { |
|
1122 aMenuPane->SetItemDimmed( EAknCmdExit, ETrue ); |
|
1123 } |
|
1124 |
|
1125 if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) |
|
1126 && !iRockerPress ) |
|
1127 { |
|
1128 aMenuPane->SetItemDimmed( EAknCmdHelp, EFalse ); |
|
1129 } |
|
1130 else |
|
1131 { |
|
1132 aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); |
|
1133 } |
|
1134 } |
|
1135 else |
|
1136 { |
|
1137 //for other items than call waiting |
|
1138 if ( FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
1139 { |
|
1140 aMenuPane->SetItemDimmed( EAknCmdHelp, EFalse ); |
|
1141 } |
|
1142 else |
|
1143 { |
|
1144 aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); |
|
1145 } |
|
1146 } |
|
1147 } |
|
1148 |
|
1149 __GSLOGSTRING("[GSCallPlugin] <--DynInitMenuPaneL"); |
|
1150 } |
|
1151 |
|
1152 // --------------------------------------------------------------------------- |
|
1153 // |
|
1154 // Requests user to enter PIN2 |
|
1155 // |
|
1156 // --------------------------------------------------------------------------- |
|
1157 // |
|
1158 TInt CGSCallPlugin::MakePin2QueryL() |
|
1159 { |
|
1160 TInt retValue = KErrNone; |
|
1161 TSecUi::InitializeLibL(); |
|
1162 |
|
1163 CSecuritySettings* settings = CSecuritySettings::NewL(); |
|
1164 CleanupStack::PushL( settings ); |
|
1165 |
|
1166 if ( settings->AskPin2L() ) |
|
1167 { |
|
1168 retValue = KGSPinQueryOk; |
|
1169 } |
|
1170 |
|
1171 CleanupStack::PopAndDestroy( settings ); |
|
1172 TSecUi::UnInitializeLib(); |
|
1173 |
|
1174 return retValue; |
|
1175 } |
|
1176 |
|
1177 // --------------------------------------------------------------------------- |
|
1178 // |
|
1179 // Requests user to enter security code |
|
1180 // |
|
1181 // --------------------------------------------------------------------------- |
|
1182 // |
|
1183 TInt CGSCallPlugin::MakeSecCodeQueryL() |
|
1184 { |
|
1185 TBool retValue = EFalse; |
|
1186 TSecUi::InitializeLibL(); |
|
1187 |
|
1188 CSecuritySettings* settings = CSecuritySettings::NewL(); |
|
1189 CleanupStack::PushL( settings ); |
|
1190 |
|
1191 retValue = settings->AskSecCodeL(); |
|
1192 |
|
1193 CleanupStack::PopAndDestroy( settings ); |
|
1194 TSecUi::UnInitializeLib(); |
|
1195 |
|
1196 return retValue; |
|
1197 } |
|
1198 |
|
1199 // --------------------------------------------------------------------------- |
|
1200 // |
|
1201 // Changes value in shared data for Als |
|
1202 // |
|
1203 // --------------------------------------------------------------------------- |
|
1204 // |
|
1205 void CGSCallPlugin::SwitchAlsSettingL() |
|
1206 { |
|
1207 __GSLOGSTRING("[GSCallPlugin]--> CGSCallPlugin::SwitchAlsSettingL"); |
|
1208 //causes PIN2 query to launch, if necessary |
|
1209 if ( iAlsBlock == ESSSettingsAlsBlockingOn ) |
|
1210 { |
|
1211 TInt pin = MakePin2QueryL(); |
|
1212 if ( pin != KGSPinQueryOk ) |
|
1213 { |
|
1214 __GSLOGSTRING("[GSCallPlugin] SwitchAlsSettingL: User failed in Pin2 Query"); |
|
1215 return; //User failed in Pin2 Query |
|
1216 } |
|
1217 } |
|
1218 iSsSettings->Get( ESSSettingsAls, iAls ); |
|
1219 if ( iAls == ESSSettingsAlsPrimary ) |
|
1220 { |
|
1221 iAls = ESSSettingsAlsAlternate; |
|
1222 } |
|
1223 else |
|
1224 { |
|
1225 iAls = ESSSettingsAlsPrimary; |
|
1226 } |
|
1227 iSsSettings->Set( ESSSettingsAls, iAls ); |
|
1228 __GSLOGSTRING("[GSCallPlugin] <--CGSCallPlugin::SwitchAlsSettingL"); |
|
1229 } |
|
1230 |
|
1231 |
|
1232 // --------------------------------------------------------------------------- |
|
1233 // |
|
1234 // Show Soft Reject Text setting page |
|
1235 // |
|
1236 // --------------------------------------------------------------------------- |
|
1237 // |
|
1238 void CGSCallPlugin::ShowSoftRejectSettingPageL() |
|
1239 { |
|
1240 __GSLOGSTRING("[GSCallPlugin]--> ShowSoftRejectSettingPageL"); |
|
1241 HBufC* dynamicText = HBufC::NewLC( KGSSMSTxtEditorLength ); |
|
1242 TPtr string( dynamicText->Des() ); |
|
1243 |
|
1244 Container()->GetSoftRejectTextL( string ); |
|
1245 |
|
1246 HBufC* title = Container()->ReadFromResourceL( R_SOFT_REJECT_TXT_TITLE ); |
|
1247 CleanupStack::PushL( title ); |
|
1248 |
|
1249 // Open resource file, to get the resource texts for setting page. |
|
1250 // Find the resource file |
|
1251 RConeResourceLoader loader( *iCoeEnv ); |
|
1252 TParse parse; |
|
1253 parse.Set( KGSSoftRejectResource, &KDC_RESOURCE_FILES_DIR, NULL ); |
|
1254 TFileName fileName( parse.FullName() ); |
|
1255 |
|
1256 // Get language of resource file |
|
1257 BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); |
|
1258 |
|
1259 // Open resource file |
|
1260 TInt err = loader.Open( fileName ); |
|
1261 if ( err == KErrNotFound ) |
|
1262 { |
|
1263 User::Leave( KErrGeneral ); |
|
1264 } |
|
1265 CleanupClosePushL( loader ); |
|
1266 |
|
1267 CAknSettingPage* dlg = new( ELeave )CAknTextSettingPage( |
|
1268 title, |
|
1269 EAknSettingPageNoOrdinalDisplayed, |
|
1270 KGSUseDefault, |
|
1271 KGSUseDefault, |
|
1272 R_TEXT_SETTING_PAGE, |
|
1273 string, |
|
1274 CAknTextSettingPage::EZeroLengthAllowed | |
|
1275 CAknTextSettingPage::EPredictiveTextEntryPermitted ); |
|
1276 |
|
1277 if ( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) ) |
|
1278 { |
|
1279 TInt value = KGSSettingOn; |
|
1280 iModel->SetCallSettingValue( EGSSoftRejectDefault, value ); |
|
1281 AknTextUtils::StripCharacters( string, KAknStripTabs ); |
|
1282 iModel->SetSoftRejectText( string ); |
|
1283 } |
|
1284 |
|
1285 CleanupStack::PopAndDestroy( 3 ); //title, dynamicText, loader |
|
1286 __GSLOGSTRING("[GSCallPlugin] <--ShowSoftRejectSettingPageL"); |
|
1287 } |
|
1288 |
|
1289 |
|
1290 // --------------------------------------------------------------------------- |
|
1291 // |
|
1292 // Show Replace Prefix setting page |
|
1293 // |
|
1294 // --------------------------------------------------------------------------- |
|
1295 // |
|
1296 TBool CGSCallPlugin::ShowPrefixSettingPageL( TInt& aCurrentValue ) |
|
1297 { |
|
1298 __GSLOGSTRING("[GSCallPlugin]--> ShowPrefixSettingPageL"); |
|
1299 CDesCArrayFlat* items = |
|
1300 iCoeEnv->ReadDesC16ArrayResourceL( R_GS_REPLACE_PREFIX_SETTING_PAGE_LBX ); |
|
1301 CleanupStack::PushL( items ); |
|
1302 |
|
1303 CAknRadioButtonSettingPage* dlg = |
|
1304 new (ELeave) CAknRadioButtonSettingPage( R_GS_REPLACE_PREFIX_SETTING_PAGE, |
|
1305 aCurrentValue, items ); |
|
1306 |
|
1307 TBool ret = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ); |
|
1308 CleanupStack::PopAndDestroy( items ); |
|
1309 |
|
1310 __GSLOGSTRING1("[GSCallPlugin] ShowPrefixSettingPageL: aCurrentValue: %d", aCurrentValue); |
|
1311 __GSLOGSTRING("[GSCallPlugin] <--ShowPrefixSettingPageL"); |
|
1312 return ret; |
|
1313 } |
|
1314 |
|
1315 // --------------------------------------------------------------------------- |
|
1316 // CGSCallPlugin::ChangePrefixSettingL |
|
1317 // |
|
1318 // Change replace prefix setting. |
|
1319 // --------------------------------------------------------------------------- |
|
1320 // |
|
1321 void CGSCallPlugin::ChangePrefixSettingL( TBool aSettingPage ) |
|
1322 { |
|
1323 __GSLOGSTRING("[GSCallPlugin]--> ChangePrefixSettingL"); |
|
1324 |
|
1325 TInt changeMode = iModel->PrefixChangeModeL(); |
|
1326 TInt prevChangeMode = changeMode; |
|
1327 TBool updateValue = ETrue; |
|
1328 TBool rockerPress = EFalse; |
|
1329 |
|
1330 __GSLOGSTRING1("[GSCallPlugin] ChangePrefixSettingL: prevChangeMode: %d", prevChangeMode); |
|
1331 if ( aSettingPage ) |
|
1332 { |
|
1333 updateValue = ShowPrefixSettingPageL( changeMode ); |
|
1334 } |
|
1335 else |
|
1336 { |
|
1337 rockerPress = ETrue; |
|
1338 if( changeMode == KGSSettingItemOff ) |
|
1339 { |
|
1340 changeMode = KGSSettingItemOn; |
|
1341 } |
|
1342 else |
|
1343 { |
|
1344 changeMode = KGSSettingItemOff; |
|
1345 } |
|
1346 } |
|
1347 |
|
1348 __GSLOGSTRING1("[GSCallPlugin] ChangePrefixSettingL: changeMode: %d", changeMode); |
|
1349 if ( updateValue ) |
|
1350 { |
|
1351 //if the value is changed and is set to ON, display the query dialog |
|
1352 if ( changeMode == KGSSettingItemOn ) |
|
1353 { |
|
1354 HBufC* replacePrefix = HBufC::NewLC( KGSReplacePrefixTextLength ); |
|
1355 TPtr string( replacePrefix->Des() ); |
|
1356 string.Zero(); |
|
1357 |
|
1358 iModel->PrefixChangeDataL( string ); |
|
1359 |
|
1360 CAknTextQueryDialog* dlg = new( ELeave ) CAknTextQueryDialog( string ); |
|
1361 |
|
1362 TBool ret = dlg->ExecuteLD( R_REPLACE_PREFIX_DATA_QUERY ); |
|
1363 if( ret ) |
|
1364 { |
|
1365 rockerPress = ETrue; |
|
1366 iModel->SetPrefixChangeDataL( string ); |
|
1367 } |
|
1368 else |
|
1369 { |
|
1370 rockerPress = EFalse; |
|
1371 } |
|
1372 CleanupStack::PopAndDestroy( replacePrefix ); |
|
1373 |
|
1374 } |
|
1375 else |
|
1376 { |
|
1377 rockerPress = ETrue; |
|
1378 } |
|
1379 } |
|
1380 |
|
1381 if ( prevChangeMode != changeMode && rockerPress ) |
|
1382 { |
|
1383 iModel->SetPrefixChangeModeL( changeMode ); |
|
1384 } |
|
1385 |
|
1386 __GSLOGSTRING("[GSCallPlugin] <--ChangePrefixSettingL"); |
|
1387 } |
|
1388 |
|
1389 |
|
1390 // --------------------------------------------------------------------------- |
|
1391 // CGSCallPlugin::SetVoipSettingBasedSelectedLine |
|
1392 // |
|
1393 // Set the new changes to VOIP variables. |
|
1394 // --------------------------------------------------------------------------- |
|
1395 // |
|
1396 void CGSCallPlugin::SetVoipSettingBasedSelectedLine( |
|
1397 const TGSCallItemIds aPage, TInt aCurrentSetting ) |
|
1398 { |
|
1399 switch ( aPage ) |
|
1400 { |
|
1401 case EGSICSendIntCallIdItemId: |
|
1402 if ( aCurrentSetting == KGSFirstLine ) |
|
1403 { |
|
1404 iModel->SetVoIPCallSettingValue( |
|
1405 EGSVoIPSendIntCallId, EGSSendIntCallIdOn ); |
|
1406 } |
|
1407 else |
|
1408 { |
|
1409 iModel->SetVoIPCallSettingValue( |
|
1410 EGSVoIPSendIntCallId, EGSSendIntCallIdOff ); |
|
1411 } |
|
1412 break; |
|
1413 case EGSICWaitingItemId: |
|
1414 if ( aCurrentSetting == KGSFirstLine ) |
|
1415 { |
|
1416 iModel->SetVoIPCallSettingValue( |
|
1417 EGSVoIPCW, EGSCSCallWaitingOn ); |
|
1418 } |
|
1419 else |
|
1420 { |
|
1421 iModel->SetVoIPCallSettingValue( |
|
1422 EGSVoIPCW, EGSCSCallWaitingOff ); |
|
1423 } |
|
1424 break; |
|
1425 case EGSICPreferredTelephonyId: |
|
1426 if ( aCurrentSetting == KGSFirstLine ) |
|
1427 { |
|
1428 iModel->SetVoIPCallSettingValue( |
|
1429 EGSVoIPPreType, EGSPreferredCS ); |
|
1430 } |
|
1431 else |
|
1432 { |
|
1433 iModel->SetVoIPCallSettingValue( |
|
1434 EGSVoIPPreType, EGSPreferredPS ); |
|
1435 |
|
1436 // Show message query dialog if preferred call |
|
1437 // setting was changed to the Int. Telephone. |
|
1438 TRAP_IGNORE( ShowPreferredTelephonyNoteL() ); |
|
1439 } |
|
1440 break; |
|
1441 case EGSDndItemId: |
|
1442 if ( aCurrentSetting == KGSFirstLine ) |
|
1443 { |
|
1444 iModel->SetVoIPCallSettingValue( |
|
1445 EGSVoIPDnd, EGSCSCallDndOn ); |
|
1446 } |
|
1447 else |
|
1448 { |
|
1449 iModel->SetVoIPCallSettingValue( |
|
1450 EGSVoIPDnd, EGSCSCallDndOff ); |
|
1451 } |
|
1452 break; |
|
1453 default: |
|
1454 break; |
|
1455 } |
|
1456 } |
|
1457 |
|
1458 // --------------------------------------------------------------------------- |
|
1459 // CGSCallPlugin::Container |
|
1460 // |
|
1461 // Returns call container item |
|
1462 // --------------------------------------------------------------------------- |
|
1463 // |
|
1464 CGSCallPluginContainer* CGSCallPlugin::Container() |
|
1465 { |
|
1466 return static_cast <CGSCallPluginContainer*> ( iContainer ); |
|
1467 } |
|
1468 |
|
1469 // --------------------------------------------------------------------------- |
|
1470 // CGSCallPlugin::GetLineForSelectedVoipSetting |
|
1471 // |
|
1472 // Returns selected line based on setting value. |
|
1473 // --------------------------------------------------------------------------- |
|
1474 // |
|
1475 TInt CGSCallPlugin::GetLineForSelectedVoipSetting( |
|
1476 const TGSCallItemIds aPage ) |
|
1477 { |
|
1478 if ( !iModel->VoIPSupported() ) |
|
1479 { |
|
1480 return KErrNone; |
|
1481 } |
|
1482 |
|
1483 TInt value( KErrNone ); |
|
1484 |
|
1485 // Get value based from setting page. |
|
1486 switch ( aPage ) |
|
1487 { |
|
1488 case EGSICSendIntCallIdItemId: // No swap. |
|
1489 iModel->GetVoIPCallSettingValue( EGSVoIPSendIntCallId, value ); |
|
1490 break; |
|
1491 case EGSICWaitingItemId: |
|
1492 iModel->GetVoIPCallSettingValue( EGSVoIPCW, value ); |
|
1493 break; |
|
1494 case EGSICPreferredTelephonyId: // No swap. |
|
1495 iModel->GetVoIPCallSettingValue( EGSVoIPPreType, value ); |
|
1496 break; |
|
1497 case EGSDndItemId: |
|
1498 iModel->GetVoIPCallSettingValue( EGSVoIPDnd, value ); |
|
1499 break; |
|
1500 default: |
|
1501 break; |
|
1502 } |
|
1503 |
|
1504 // Swap items. |
|
1505 if ( aPage != EGSICPreferredTelephonyId && |
|
1506 aPage != EGSICSendIntCallIdItemId ) |
|
1507 { |
|
1508 if ( value == KGSSecondLine ) |
|
1509 { |
|
1510 value = KGSFirstLine; |
|
1511 } |
|
1512 else |
|
1513 { |
|
1514 value = KGSSecondLine; |
|
1515 } |
|
1516 } |
|
1517 |
|
1518 return value; |
|
1519 } |
|
1520 |
|
1521 |
|
1522 // --------------------------------------------------------------------------- |
|
1523 // CGSCallPlugin::ShowVTStillImageSettingPageL |
|
1524 // |
|
1525 // Display Video Telephony Still Image setting page. |
|
1526 // --------------------------------------------------------------------------- |
|
1527 // |
|
1528 void CGSCallPlugin::ShowVTStillImageSettingPageL() |
|
1529 { |
|
1530 iVtStillImage = iModel->VTStillImageL(); |
|
1531 // Store previous in case something goes wrong. |
|
1532 iPreviousVtStillImage = iVtStillImage; |
|
1533 |
|
1534 CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL( |
|
1535 R_GS_STILL_IMAGE_SETTING_PAGE_LBX ); |
|
1536 CleanupStack::PushL( items ); |
|
1537 |
|
1538 // Map CenRep value to lbx items: |
|
1539 TInt dialogSelection = EGSVtStillImageNotInUse; |
|
1540 if ( iVtStillImage != KGSVTStillImageOff ) dialogSelection = EGSVtStillImageInUse; |
|
1541 |
|
1542 CAknRadioButtonSettingPage* dlg = |
|
1543 new( ELeave ) CAknRadioButtonSettingPage( R_GS_STILL_IMAGE_SETTING_PAGE, |
|
1544 dialogSelection, items ); |
|
1545 |
|
1546 TBool ret = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ); |
|
1547 |
|
1548 if ( ret ) |
|
1549 { |
|
1550 if ( dialogSelection == EGSVtStillImageNotInUse ) |
|
1551 { |
|
1552 // Still image not used |
|
1553 iModel->SetVTStillImageL( KGSVTStillImageOff ); |
|
1554 } |
|
1555 else |
|
1556 { |
|
1557 // User decided to update still image |
|
1558 ShowStillImageListL(); |
|
1559 } |
|
1560 |
|
1561 // Update VT item in CGSCallPlugin listbox. iVtStillImage value is |
|
1562 // irrelevant as UpdateListBoxL actually reads the new value from |
|
1563 // CenRep and converts it to lbx item value correctly (Off/On). |
|
1564 UpdateListBoxL( EGSStillImageItemId, iVtStillImage ); |
|
1565 } |
|
1566 CleanupStack::PopAndDestroy( items ); |
|
1567 } |
|
1568 |
|
1569 |
|
1570 // --------------------------------------------------------------------------- |
|
1571 // CGSCallPlugin::ShowStillImageListL() |
|
1572 // |
|
1573 // Display background image list from media gallery. |
|
1574 // --------------------------------------------------------------------------- |
|
1575 // |
|
1576 void CGSCallPlugin::ShowStillImageListL() |
|
1577 { |
|
1578 CDesCArray* selectedFiles = new ( ELeave ) CDesCArrayFlat( 1 ); |
|
1579 CleanupStack::PushL( selectedFiles ); |
|
1580 |
|
1581 TBool ret = MGFetch::RunL( *selectedFiles, EImageFile, EFalse, this ); |
|
1582 |
|
1583 if ( ret && selectedFiles->MdcaCount() == 1 ) |
|
1584 { |
|
1585 iImageHandler = CGSAsyncImageHandling::NewL( iCoeEnv->FsSession(), |
|
1586 this, KGSVTStillImgPath ); |
|
1587 |
|
1588 TPtrC imagePath = selectedFiles->MdcaPoint( 0 ); |
|
1589 |
|
1590 TRAPD( error, iModel->iBackgroundApi->SetVTStillImagePathL( imagePath, |
|
1591 *iImageHandler ) ); |
|
1592 if ( error == KErrNone ) |
|
1593 { |
|
1594 // Show wait note |
|
1595 ShowImageLoadWaitNoteL(); |
|
1596 } |
|
1597 else |
|
1598 { |
|
1599 HandleImageErrorsL( error ); |
|
1600 } |
|
1601 } |
|
1602 CleanupStack::PopAndDestroy( selectedFiles ); |
|
1603 } |
|
1604 |
|
1605 |
|
1606 // --------------------------------------------------------------------------- |
|
1607 // CGSCallPlugin::ImageHandlingComplete() |
|
1608 // |
|
1609 // Method derived from MGSSyncImageHandlingObserver |
|
1610 // Run when the asynchronous image converting is complete |
|
1611 // --------------------------------------------------------------------------- |
|
1612 // |
|
1613 void CGSCallPlugin::ImageHandlingCompleteL( TInt aError ) |
|
1614 { |
|
1615 if ( aError != KErrNone ) |
|
1616 { |
|
1617 HandleImageErrorsL( aError ); |
|
1618 } |
|
1619 else |
|
1620 { |
|
1621 // Needs to increment iVtStillImage value so CenRep will send |
|
1622 // notificatios to VT (only changing value will fire notification). |
|
1623 iModel->SetVTStillImageL( ++iVtStillImage ); |
|
1624 UpdateListBoxL( EGSStillImageItemId, EGSVtStillImageInUse ); |
|
1625 } |
|
1626 |
|
1627 HideImageLoadWaitNoteL(); |
|
1628 |
|
1629 delete iImageHandler; |
|
1630 iImageHandler = NULL; |
|
1631 } |
|
1632 |
|
1633 |
|
1634 // --------------------------------------------------------------------------- |
|
1635 // CGSCallPlugin::ShowImageLoadWaitNoteL() |
|
1636 // |
|
1637 // Display image load wait note dialog. |
|
1638 // --------------------------------------------------------------------------- |
|
1639 // |
|
1640 void CGSCallPlugin::ShowImageLoadWaitNoteL() |
|
1641 { |
|
1642 if ( !iWaitDialog ) |
|
1643 { |
|
1644 iWaitDialog = new( ELeave ) CAknWaitDialog( |
|
1645 ( REINTERPRET_CAST(CEikDialog**, |
|
1646 &iWaitDialog ) ), ETrue ); |
|
1647 |
|
1648 iWaitDialog->ExecuteDlgLD( CAknNoteDialog::ENoTone, |
|
1649 R_IMAGE_LOAD_WAIT_NOTE ); |
|
1650 } |
|
1651 } |
|
1652 |
|
1653 // --------------------------------------------------------------------------- |
|
1654 // CGSCallPlugin::HideImageLoadWaitNoteL() |
|
1655 // |
|
1656 // Hide image load wait note dialog. |
|
1657 // --------------------------------------------------------------------------- |
|
1658 // |
|
1659 void CGSCallPlugin::HideImageLoadWaitNoteL() |
|
1660 { |
|
1661 if ( iWaitDialog ) |
|
1662 { |
|
1663 iWaitDialog->ProcessFinishedL(); // deletes the dialog |
|
1664 iWaitDialog = NULL; |
|
1665 } |
|
1666 } |
|
1667 |
|
1668 |
|
1669 // --------------------------------------------------------------------------- |
|
1670 // CGSCallPlugin::HandleImageErrorsL |
|
1671 // |
|
1672 // Prompt image related errors to the user |
|
1673 // --------------------------------------------------------------------------- |
|
1674 // |
|
1675 void CGSCallPlugin::HandleImageErrorsL( TInt aError ) |
|
1676 { |
|
1677 TInt resourceId; |
|
1678 switch( aError ) |
|
1679 { |
|
1680 case KErrNotSupported: |
|
1681 case KErrUnderflow: |
|
1682 // Image is corrupted or in wrong format |
|
1683 resourceId = R_GS_IMAGE_CORRUPTED; |
|
1684 break; |
|
1685 case KErrDiskFull: |
|
1686 case KErrNoMemory: |
|
1687 // Image is too large |
|
1688 resourceId = R_GS_IMAGE_TOO_LARGE; |
|
1689 break; |
|
1690 default: |
|
1691 // Better to give some error message than result in CONE5 panic: |
|
1692 resourceId = R_GS_IMAGE_CORRUPTED; |
|
1693 break; |
|
1694 } |
|
1695 // Show information note |
|
1696 HBufC* prompt = iCoeEnv->AllocReadResourceLC( resourceId ); |
|
1697 CAknInformationNote* note = new( ELeave ) CAknInformationNote( ETrue ); |
|
1698 note->ExecuteLD( *prompt ); |
|
1699 |
|
1700 // Setting previous VT still image value (rollback) |
|
1701 iModel->SetVTStillImageL( iPreviousVtStillImage ); |
|
1702 UpdateListBoxL( EGSStillImageItemId, iPreviousVtStillImage ); |
|
1703 CleanupStack::PopAndDestroy( prompt ); |
|
1704 } |
|
1705 |
|
1706 |
|
1707 // --------------------------------------------------------------------------- |
|
1708 // CGSCallPlugin::VerifySelectionL() |
|
1709 // |
|
1710 // An overloaded method from MMGFetchVerifier interface class |
|
1711 // --------------------------------------------------------------------------- |
|
1712 // |
|
1713 TBool CGSCallPlugin::VerifySelectionL( const MDesCArray* aSelectedFiles ) |
|
1714 { |
|
1715 const TBool KGSDrmProtectedContent = ETrue; |
|
1716 |
|
1717 TBool ret = ETrue; |
|
1718 // |
|
1719 if ( aSelectedFiles->MdcaCount() == 1 ) |
|
1720 { |
|
1721 const TPtrC fileName( aSelectedFiles->MdcaPoint( 0 ) ); |
|
1722 |
|
1723 // First, check if the selected file is DRM protected |
|
1724 if ( ret && CheckDRMProtectionL( fileName ) == |
|
1725 KGSDrmProtectedContent ) |
|
1726 { |
|
1727 // display the note to user |
|
1728 // Show information note |
|
1729 HBufC* prompt = iCoeEnv->AllocReadResourceLC( |
|
1730 R_GS_DRM_NOT_ALLOWED ); |
|
1731 |
|
1732 CAknInformationNote* note = |
|
1733 new( ELeave ) CAknInformationNote( ETrue ); |
|
1734 note->ExecuteLD( *prompt ); |
|
1735 |
|
1736 CleanupStack::PopAndDestroy( prompt ); |
|
1737 ret = EFalse; |
|
1738 } |
|
1739 |
|
1740 // Next, check whether the image header is valid |
|
1741 if ( ret ) |
|
1742 { |
|
1743 CImageDecoder* imageDecoder = NULL; |
|
1744 TRAPD( err, imageDecoder = CImageDecoder::FileNewL( |
|
1745 iCoeEnv->FsSession(), fileName, ContentAccess::EPeek ) ); |
|
1746 |
|
1747 if ( err != KErrNone ) |
|
1748 { |
|
1749 // Show information note |
|
1750 HBufC* prompt = iCoeEnv->AllocReadResourceLC( |
|
1751 R_GS_IMAGE_CORRUPTED ); |
|
1752 CAknInformationNote* note = |
|
1753 new( ELeave ) CAknInformationNote( ETrue ); |
|
1754 note->ExecuteLD(*prompt); |
|
1755 CleanupStack::PopAndDestroy( prompt ); |
|
1756 |
|
1757 ret = EFalse; |
|
1758 } |
|
1759 delete imageDecoder; |
|
1760 } |
|
1761 } |
|
1762 |
|
1763 return ret; |
|
1764 } |
|
1765 |
|
1766 |
|
1767 // --------------------------------------------------------------------------- |
|
1768 // CGSCallPlugin::CheckDRMProtectionL |
|
1769 // |
|
1770 // Check if the selected image file is DRM protected. |
|
1771 // --------------------------------------------------------------------------- |
|
1772 // |
|
1773 TBool CGSCallPlugin::CheckDRMProtectionL( const TDesC& aOriginalFileName ) |
|
1774 { |
|
1775 TBool isProtected( EFalse ); |
|
1776 DRMCommon* drmClient = DRMCommon::NewL(); |
|
1777 CleanupStack::PushL( drmClient ); |
|
1778 TInt error = drmClient->Connect(); |
|
1779 if ( error != DRMCommon::EOk ) |
|
1780 { |
|
1781 User::Leave( KErrCorrupt ); |
|
1782 } |
|
1783 |
|
1784 if ( aOriginalFileName != KNullDesC ) |
|
1785 { |
|
1786 error = drmClient->IsProtectedFile( aOriginalFileName, isProtected ); |
|
1787 if ( error != DRMCommon::EOk ) |
|
1788 { |
|
1789 User::Leave( KErrCorrupt ); |
|
1790 } |
|
1791 } |
|
1792 |
|
1793 CleanupStack::PopAndDestroy( drmClient ); |
|
1794 return isProtected; |
|
1795 } |
|
1796 |
|
1797 // --------------------------------------------------------------------------- |
|
1798 // |
|
1799 // Show Call Duration setting page |
|
1800 // |
|
1801 // --------------------------------------------------------------------------- |
|
1802 // |
|
1803 TBool CGSCallPlugin::ShowCallDurationSettingPageL( TInt& aCurrentValue ) |
|
1804 { |
|
1805 __GSLOGSTRING("[GSCallPlugin]--> ShowCallDurationSettingPageL"); |
|
1806 CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL( |
|
1807 R_GS_SHOW_CALL_DURATION_SETTING_PAGE_LBX ); |
|
1808 CleanupStack::PushL( items ); |
|
1809 |
|
1810 CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage( |
|
1811 R_GS_SHOW_CALL_DURATION_SETTING_PAGE, |
|
1812 aCurrentValue, items ); |
|
1813 |
|
1814 TBool ret = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ); |
|
1815 CleanupStack::PopAndDestroy( items ); |
|
1816 |
|
1817 __GSLOGSTRING("[GSCallPlugin] <--ShowCallDurationSettingPageL"); |
|
1818 return ret; |
|
1819 } |
|
1820 |
|
1821 // --------------------------------------------------------------------------- |
|
1822 // CGSCallPlugin::ChangeCallDurationSettingL |
|
1823 // |
|
1824 // Change Call Duration setting. |
|
1825 // --------------------------------------------------------------------------- |
|
1826 // |
|
1827 void CGSCallPlugin::ChangeCallDurationSettingL( TBool aSettingPage ) |
|
1828 { |
|
1829 __GSLOGSTRING("[GSCallPlugin]--> ChangeCallDurationSettingL"); |
|
1830 |
|
1831 TInt callState = CheckCallStateL(); |
|
1832 |
|
1833 // Get information of whether there are open connections or not |
|
1834 if ( callState != EPSCTsyCallStateUninitialized && |
|
1835 callState != EPSCTsyCallStateNone ) |
|
1836 { |
|
1837 HBufC* prompt = iCoeEnv->AllocReadResourceLC( R_TEXT_ACTIVE_CALL ); |
|
1838 |
|
1839 CAknInformationNote* note = |
|
1840 new( ELeave ) CAknInformationNote( ETrue ); |
|
1841 |
|
1842 note->ExecuteLD( *prompt ); |
|
1843 |
|
1844 CleanupStack::PopAndDestroy( prompt ); |
|
1845 |
|
1846 return; |
|
1847 } |
|
1848 |
|
1849 TInt duration = iModel->CallDurationL(); |
|
1850 TBool updateValue = ETrue; |
|
1851 |
|
1852 if ( aSettingPage ) |
|
1853 { |
|
1854 updateValue = ShowCallDurationSettingPageL( duration ); |
|
1855 } |
|
1856 else |
|
1857 { |
|
1858 if( duration == KGSSettingItemOff ) |
|
1859 { |
|
1860 duration = KGSSettingItemOn; |
|
1861 } |
|
1862 else |
|
1863 { |
|
1864 duration = KGSSettingItemOff; |
|
1865 } |
|
1866 } |
|
1867 |
|
1868 if ( updateValue ) |
|
1869 { |
|
1870 iModel->SetCallDurationL( duration ); |
|
1871 UpdateListBoxL( EGSShowCallDurationItemId, KGSNotUsed ); |
|
1872 } |
|
1873 |
|
1874 __GSLOGSTRING("[GSCallPlugin] <--ChangePrefixSettingL"); |
|
1875 } |
|
1876 |
|
1877 |
|
1878 // --------------------------------------------------------------------------- |
|
1879 // CGSCallPlugin::CheckCallStateL |
|
1880 // |
|
1881 // Check call state using PubSub or SA |
|
1882 // --------------------------------------------------------------------------- |
|
1883 // |
|
1884 TInt CGSCallPlugin::CheckCallStateL() |
|
1885 { |
|
1886 TInt callState = KErrNone; |
|
1887 //here are open connections or not |
|
1888 RProperty::Get( KPSUidCtsyCallInformation, |
|
1889 KCTsyCallState, |
|
1890 callState ); |
|
1891 return callState; |
|
1892 } |
|
1893 |
|
1894 |
|
1895 // --------------------------------------------------------------------------- |
|
1896 // CGSCallPlugin::ShowPreferredTelephonyNoteL |
|
1897 // |
|
1898 // Shows note if preferred call setting was changed to the Int. Telephone. |
|
1899 // --------------------------------------------------------------------------- |
|
1900 // |
|
1901 void CGSCallPlugin::ShowPreferredTelephonyNoteL() |
|
1902 { |
|
1903 // Create message query dialog. |
|
1904 HBufC* text = StringLoader::LoadLC( R_IC_PREFERRED_TELEPHONE_QUERY_TEXT ); |
|
1905 CAknMessageQueryDialog* query = CAknMessageQueryDialog::NewL( *text ); |
|
1906 query->SetMessageTextL( text->Des() ); |
|
1907 |
|
1908 // Show message query dialog. |
|
1909 query->ExecuteLD( R_IC_PREFERRED_TELEPHONE_QUERY ); |
|
1910 |
|
1911 CleanupStack::PopAndDestroy( text ); |
|
1912 } |
|
1913 |
|
1914 |
|
1915 // ----------------------------------------------------------------------------- |
|
1916 // When this method is called, view checks based on highlight focus, if the MSK |
|
1917 // label is correct. |
|
1918 // ----------------------------------------------------------------------------- |
|
1919 // |
|
1920 void CGSCallPlugin::CheckMiddleSoftkeyLabelL() |
|
1921 { |
|
1922 const TInt currentFeatureId = Container()->CurrentFeatureId(); |
|
1923 RemoveCommandFromMSK( iMskCommandFlag ); |
|
1924 if ( currentFeatureId == EGSCallWaitingItemId ) |
|
1925 { |
|
1926 // First remove any prevous commands. |
|
1927 SetMiddleSoftKeyLabelL( R_CALL_SOFTKEY_OPTION, |
|
1928 EAknSoftkeyContextOptions ); |
|
1929 // This way we set which command is set for MSK |
|
1930 iMskCommandFlag = EFalse; |
|
1931 } |
|
1932 else |
|
1933 { |
|
1934 //Set middle softkey as Change. |
|
1935 SetMiddleSoftKeyLabelL( R_CALL_MSK_CHANGE, |
|
1936 EGSMSKCmdAppChange ); |
|
1937 // This way we set which command is set for MSK |
|
1938 iMskCommandFlag = ETrue; |
|
1939 } |
|
1940 } |
|
1941 |
|
1942 // ----------------------------------------------------------------------------- |
|
1943 // Remove unnecessary commands from Middle softkey. |
|
1944 // @flag = ETrue means presently MSK value is "Change" so we remove that |
|
1945 // @flag = EFalse means presently MSK value is "Context Options" so we remove that |
|
1946 // ----------------------------------------------------------------------------- |
|
1947 // |
|
1948 void CGSCallPlugin::RemoveCommandFromMSK(const TBool flag ) |
|
1949 { |
|
1950 CEikButtonGroupContainer* cbaGroup = Cba(); |
|
1951 if ( cbaGroup ) |
|
1952 { |
|
1953 if ( flag ) |
|
1954 { |
|
1955 cbaGroup->RemoveCommandFromStack( |
|
1956 KGSMSKControlID, EGSMSKCmdAppChange ); |
|
1957 } |
|
1958 else |
|
1959 { |
|
1960 cbaGroup->RemoveCommandFromStack( |
|
1961 KGSMSKControlID, EAknSoftkeyContextOptions ); |
|
1962 } |
|
1963 } |
|
1964 } |
|
1965 // --------------------------------------------------------------------------- |
|
1966 // Sets middle softkey label. |
|
1967 // --------------------------------------------------------------------------- |
|
1968 // |
|
1969 void CGSCallPlugin::SetMiddleSoftKeyLabelL( |
|
1970 const TInt aResourceId, const TInt aCommandId ) |
|
1971 { |
|
1972 CEikButtonGroupContainer* cbaGroup = Cba(); |
|
1973 if ( cbaGroup ) |
|
1974 { |
|
1975 HBufC* middleSKText = StringLoader::LoadLC( aResourceId ); |
|
1976 TPtr mskPtr = middleSKText->Des(); |
|
1977 cbaGroup->AddCommandToStackL( |
|
1978 KGSMSKControlID, |
|
1979 aCommandId, |
|
1980 mskPtr ); |
|
1981 CleanupStack::PopAndDestroy( middleSKText ); |
|
1982 } |
|
1983 } |
|
1984 |
|
1985 // ----------------------------------------------------------------------------- |
|
1986 // CGSCallPlugin::HandleClientRectChange |
|
1987 // |
|
1988 // |
|
1989 // ----------------------------------------------------------------------------- |
|
1990 // |
|
1991 void CGSCallPlugin::HandleClientRectChange() |
|
1992 { |
|
1993 if ( iContainer ) |
|
1994 { |
|
1995 iContainer->SetRect( ClientRect() ); |
|
1996 } |
|
1997 } |
|
1998 |
|
1999 // ========================= From CGSPluginInterface ================== |
|
2000 |
|
2001 // ----------------------------------------------------------------------------- |
|
2002 // CGSCallPlugin::GetCaptionL |
|
2003 // |
|
2004 // |
|
2005 // ----------------------------------------------------------------------------- |
|
2006 // |
|
2007 void CGSCallPlugin::GetCaptionL( TDes& aCaption ) const |
|
2008 { |
|
2009 HBufC* result = StringLoader::LoadL( R_GS_CALL_PLUGIN_CAPTION ); |
|
2010 aCaption.Copy( *result ); |
|
2011 delete result; |
|
2012 } |
|
2013 |
|
2014 |
|
2015 // ----------------------------------------------------------------------------- |
|
2016 // CGSCallPlugin::PluginProviderCategory |
|
2017 // |
|
2018 // |
|
2019 // ----------------------------------------------------------------------------- |
|
2020 // |
|
2021 TInt CGSCallPlugin::PluginProviderCategory() const |
|
2022 { |
|
2023 //This plugin is created by 3rd party. |
|
2024 return KGSPluginProviderInternal; |
|
2025 } |
|
2026 |
|
2027 |
|
2028 // ----------------------------------------------------------------------------- |
|
2029 // CGSCallPlugin::CreateIconL() |
|
2030 // |
|
2031 // |
|
2032 // ----------------------------------------------------------------------------- |
|
2033 // |
|
2034 CGulIcon* CGSCallPlugin::CreateIconL( const TUid aIconType ) |
|
2035 { |
|
2036 //EMbm<Mbm_file_name><Bitmap_name> |
|
2037 CGulIcon* icon; |
|
2038 TParse* fp = new( ELeave ) TParse(); |
|
2039 CleanupStack::PushL( fp ); |
|
2040 fp->Set( KGSCallPluginIconDirAndName, &KDC_BITMAP_DIR, NULL ); |
|
2041 |
|
2042 if( aIconType == KGSIconTypeLbxItem ) |
|
2043 { |
|
2044 icon = AknsUtils::CreateGulIconL( |
|
2045 AknsUtils::SkinInstance(), |
|
2046 KAknsIIDQgnPropSetCallSub, |
|
2047 fp->FullName(), |
|
2048 EMbmGscallpluginQgn_prop_set_call_sub, |
|
2049 EMbmGscallpluginQgn_prop_set_call_sub_mask ); |
|
2050 } |
|
2051 else |
|
2052 { |
|
2053 icon = CGSPluginInterface::CreateIconL( aIconType ); |
|
2054 } |
|
2055 |
|
2056 CleanupStack::PopAndDestroy( fp ); |
|
2057 |
|
2058 return icon; |
|
2059 } |
|
2060 |
|
2061 |
|
2062 // --------------------------------------------------------------------------- |
|
2063 // CGSCallPlugin::ChangeLongPressCallKeySettingL |
|
2064 // |
|
2065 // Change Long Press Call Key setting. |
|
2066 // values: 0,1 --> Inactive (Default Value is 1 and when RFS default value is 0) |
|
2067 // 2 --> Video call |
|
2068 // --------------------------------------------------------------------------- |
|
2069 // |
|
2070 void CGSCallPlugin::ChangeLongPressCallKeySettingL( const TBool aShowSettingPage ) |
|
2071 { |
|
2072 __GSLOGSTRING("[GSCallPlugin]--> ChangeLongPressCallKeySettingL"); |
|
2073 TInt statusLongPressCallKey = iModel->LongPressCallKeyL(); |
|
2074 TBool updateValue = ETrue; |
|
2075 |
|
2076 if ( aShowSettingPage ) |
|
2077 { |
|
2078 // If the status of Long Key is not active then we decrement to |
|
2079 // the value of statusLongPressCallKey so that the values are |
|
2080 // then tuned to launch the setting page normally with two setting |
|
2081 // items InActive and Video Call |
|
2082 // Refer to GSCallPlugin.hrh file for more info for the description |
|
2083 iModel->MapLongPressKeyCallKeyValue( statusLongPressCallKey ); |
|
2084 updateValue = ShowLongPressCallKeySettingPageL( |
|
2085 statusLongPressCallKey ); |
|
2086 |
|
2087 // Here if the selected index is 1 it means Video Call from the setting page |
|
2088 // we then again map this value back to 2 which is EGSLongPressCallKeyVideoCall |
|
2089 // Refer to GSCallPlugin.hrh for more details |
|
2090 if ( statusLongPressCallKey == EGSLongPressCallKeyVoiceCall ) |
|
2091 { |
|
2092 statusLongPressCallKey = EGSLongPressCallKeyVideoCall; |
|
2093 } |
|
2094 else // If selected index in setting page is InActive ( 0) we map |
|
2095 // this to EGSLongPressCallKeyVoiceCall which is 1 |
|
2096 { |
|
2097 statusLongPressCallKey = EGSLongPressCallKeyVoiceCall; |
|
2098 } |
|
2099 } |
|
2100 else // switch the value |
|
2101 { |
|
2102 if ( statusLongPressCallKey == EGSLongPressCallKeyNotSet || |
|
2103 statusLongPressCallKey == EGSLongPressCallKeyVoiceCall ) |
|
2104 { |
|
2105 statusLongPressCallKey = EGSLongPressCallKeyVideoCall; |
|
2106 } |
|
2107 else |
|
2108 { |
|
2109 statusLongPressCallKey = EGSLongPressCallKeyVoiceCall; |
|
2110 } |
|
2111 } |
|
2112 if ( updateValue ) |
|
2113 { |
|
2114 iModel->SetLongPressCallKeyL( statusLongPressCallKey ); |
|
2115 UpdateListBoxL( EGSLongPressCallKeyItemId, KGSNotUsed ); |
|
2116 } |
|
2117 |
|
2118 __GSLOGSTRING("[GSCallPlugin] <--ChangeLongPressCallKeySettingL"); |
|
2119 } |
|
2120 |
|
2121 // --------------------------------------------------------------------------- |
|
2122 // |
|
2123 // Launching Long Press Key setting page |
|
2124 // |
|
2125 // --------------------------------------------------------------------------- |
|
2126 // |
|
2127 TBool CGSCallPlugin::ShowLongPressCallKeySettingPageL( TInt& aCurrentValue ) |
|
2128 { |
|
2129 __GSLOGSTRING("[GSCallPlugin]--> ShowLongPressCallKeySettingPageL"); |
|
2130 CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL( |
|
2131 R_GS_LONG_PRESS_CALL_SETTING_PAGE_LBX ); |
|
2132 CleanupStack::PushL( items ); |
|
2133 |
|
2134 CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage( |
|
2135 R_GS_LONG_PRESS_CALL_SETTING_PAGE, |
|
2136 aCurrentValue, items ); |
|
2137 |
|
2138 TBool ret = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ); |
|
2139 CleanupStack::PopAndDestroy( items ); |
|
2140 |
|
2141 __GSLOGSTRING("[GSCallPlugin] <--ShowLongPressCallKeySettingPageL"); |
|
2142 return ret; |
|
2143 } |
|
2144 |
|
2145 |
|
2146 // ---------------------------------------------------------------------------- |
|
2147 // CGSCallPlugin::ShowOwnImageVtCallSettingPageL |
|
2148 // |
|
2149 // Displaying settings page for Own Image during video call setting |
|
2150 // ---------------------------------------------------------------------------- |
|
2151 // |
|
2152 void CGSCallPlugin::ShowOwnImageVtCallSettingPageL() |
|
2153 { |
|
2154 __GSLOGSTRING("[GSCallPlugin]--> ShowOwnImageVtCallSettingPageL"); |
|
2155 TInt currentValue = iModel->OwnImageVtCallStatusL(); |
|
2156 CDesCArrayFlat* items = iCoeEnv->ReadDesC16ArrayResourceL( |
|
2157 R_GS_OWN_IMAGE_VT_CALL_SETTING_PAGE_LBX ); |
|
2158 CleanupStack::PushL( items ); |
|
2159 |
|
2160 CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage( |
|
2161 R_GS_OWN_IMAGE_VT_CALL_SETTING_PAGE, |
|
2162 currentValue, items ); |
|
2163 |
|
2164 TBool ret = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ); |
|
2165 |
|
2166 if( ret ) |
|
2167 { |
|
2168 iModel->SetOwnImageVtCallStatusL( currentValue ); |
|
2169 UpdateListBoxL( EGSOwnImageVtCallItemId, currentValue ); |
|
2170 } |
|
2171 |
|
2172 CleanupStack::PopAndDestroy( items ); |
|
2173 |
|
2174 __GSLOGSTRING("[GSCallPlugin] <--ShowOwnImageVtCallSettingPageL"); |
|
2175 } |
|
2176 |
|
2177 //End of File |