FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/AUIPinEditor.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | 70ea7526b59e |
comparison
equal
deleted
inserted
replaced
91:c3d28a37caad | 92:c0052fe355d3 |
---|---|
29 | 29 |
30 xreddymn 4, Jul, 2006 OMAPS00083495 | 30 xreddymn 4, Jul, 2006 OMAPS00083495 |
31 Resolved issues reported in PIN and PUK input through BPM. | 31 Resolved issues reported in PIN and PUK input through BPM. |
32 | 32 |
33 xrashmic 1 Jul, 2006 OMAPS00075784 | 33 xrashmic 1 Jul, 2006 OMAPS00075784 |
34 The password mode to be turned on while entering the gsm string to | 34 The password mode to be turned on while entering the gsm string to |
35 unblock PUK during bootup | 35 unblock PUK during bootup |
36 | 36 |
37 July 09, 2005 REF : MMI - 22565 - a0876501 | 37 July 09, 2005 REF : MMI - 22565 - a0876501 |
38 Description: Proper display of IMEI with CD byte. | 38 Description: Proper display of IMEI with CD byte. |
39 Solution: Increased the IMEI length from 16 to 18. | 39 Solution: Increased the IMEI length from 16 to 18. |
40 | 40 |
41 June 16, 2005 REF: CRR 31267 x0021334 | 41 June 16, 2005 REF: CRR 31267 x0021334 |
42 Description: Handset ignore the initializtion of the PIN1/PIN2 | 42 Description: Handset ignore the initializtion of the PIN1/PIN2 |
43 Fix: Cheking is done to ascertain if PIN1/PIN2 are initialised. If not, appropriate | 43 Fix: Cheking is done to ascertain if PIN1/PIN2 are initialised. If not, appropriate |
44 message is displayed to the user. | 44 message is displayed to the user. |
45 | 45 |
46 May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | 46 May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg |
47 Description: IMEI retreival by posting a call to ACI sAT_xx API | 47 Description: IMEI retreival by posting a call to ACI sAT_xx API |
48 Solution: The direct call to cl_get_imeisv() is replaced with the | 48 Solution: The direct call to cl_get_imeisv() is replaced with the |
49 call to the mmi_imei_retrieve() which inturn calls sAT_Dn() and | 49 call to the mmi_imei_retrieve() which inturn calls sAT_Dn() and |
50 retrieves the IMEI info and stores it onto the global | 50 retrieves the IMEI info and stores it onto the global |
51 variable "imei" | 51 variable "imei" |
52 14/11/02 Original Condat(UK) BMI version. | 52 14/11/02 Original Condat(UK) BMI version. |
53 $End | 53 $End |
54 | 54 |
55 *******************************************************************************/ | 55 *******************************************************************************/ |
56 | 56 |
140 T_MFW_HND timer; // The timer for timeouts | 140 T_MFW_HND timer; // The timer for timeouts |
141 | 141 |
142 T_ED_DATA *editor; /* The ATB editor */ | 142 T_ED_DATA *editor; /* The ATB editor */ |
143 T_AUI_EDITOR_DATA editor_data; /* The MMI editor data, provided by caller */ | 143 T_AUI_EDITOR_DATA editor_data; /* The MMI editor data, provided by caller */ |
144 T_AUI_ENTRY_DATA *entry_data; /* The MMI text entry data */ | 144 T_AUI_ENTRY_DATA *entry_data; /* The MMI text entry data */ |
145 | 145 |
146 BOOL haveTitle; /* TRUE if a title is supplied */ | 146 BOOL haveTitle; /* TRUE if a title is supplied */ |
147 T_ATB_TEXT title; /* Title of editor */ | 147 T_ATB_TEXT title; /* Title of editor */ |
148 | 148 |
149 BOOL hidden; | 149 BOOL hidden; |
150 | 150 |
210 /******************************************************************************* | 210 /******************************************************************************* |
211 | 211 |
212 $Function: AUI_pin_Create | 212 $Function: AUI_pin_Create |
213 | 213 |
214 $Description: Create the PIN editor. | 214 $Description: Create the PIN editor. |
215 | 215 |
216 $Returns: Pointer to the editor's window. | 216 $Returns: Pointer to the editor's window. |
217 | 217 |
218 $Arguments: parent - The parent window. | 218 $Arguments: parent - The parent window. |
219 | 219 |
220 *******************************************************************************/ | 220 *******************************************************************************/ |
239 { | 239 { |
240 return NULL; | 240 return NULL; |
241 } | 241 } |
242 | 242 |
243 /* Connect the dialog data to the MFW-window */ | 243 /* Connect the dialog data to the MFW-window */ |
244 | 244 |
245 data->mmi_control.dialog = (T_DIALOG_FUNC)AUI_pin_ExecCb; /* Setup the destination for events */ | 245 data->mmi_control.dialog = (T_DIALOG_FUNC)AUI_pin_ExecCb; /* Setup the destination for events */ |
246 data->mmi_control.data = data; | 246 data->mmi_control.data = data; |
247 data->parent = parent; | 247 data->parent = parent; |
248 win_data = ((T_MFW_HDR *)data->win)->data; | 248 win_data = ((T_MFW_HDR *)data->win)->data; |
249 win_data->user = (void *)data; | 249 win_data->user = (void *)data; |
250 | 250 |
251 data->kbd = kbd_create(data->win, KEY_ALL,(T_MFW_CB)AUI_pin_KbdCb); | 251 data->kbd = kbd_create(data->win, KEY_ALL,(T_MFW_CB)AUI_pin_KbdCb); |
252 data->kbd_long = kbd_create(data->win, KEY_ALL|KEY_LONG,(T_MFW_CB)AUI_pin_KbdLongCb); | 252 data->kbd_long = kbd_create(data->win, KEY_ALL|KEY_LONG,(T_MFW_CB)AUI_pin_KbdLongCb); |
253 data->editor = ATB_edit_Create(&data->editor_data.editor_attr,0); | 253 data->editor = ATB_edit_Create(&data->editor_data.editor_attr,0); |
254 TRACE_EVENT_P1("Memory left (editor): %d", mfwCheckMemoryLeft()); | 254 TRACE_EVENT_P1("Memory left (editor): %d", mfwCheckMemoryLeft()); |
255 data->editor_data = *editor_data; | 255 data->editor_data = *editor_data; |
256 data->entry_data = AUI_entry_Create(data->win, data->editor, E_PIN_UPDATE); | 256 data->entry_data = AUI_entry_Create(data->win, data->editor, E_PIN_UPDATE); |
257 TRACE_EVENT_P1("Memory left (entry): %d", mfwCheckMemoryLeft()); | 257 TRACE_EVENT_P1("Memory left (entry): %d", mfwCheckMemoryLeft()); |
258 SEND_EVENT(data->win, E_PIN_INIT, 0, 0); | 258 SEND_EVENT(data->win, E_PIN_INIT, 0, 0); |
259 | 259 |
260 /* Return window handle */ | 260 /* Return window handle */ |
261 | 261 |
262 return data->win; | 262 return data->win; |
263 } | 263 } |
264 | 264 |
292 FREE_MEMORY(data->title.data, (data->title.len+1)*ATB_string_Size(&data->title)); | 292 FREE_MEMORY(data->title.data, (data->title.len+1)*ATB_string_Size(&data->title)); |
293 TRACE_EVENT_P1("Memory left (title dest): %d", mfwCheckMemoryLeft()); | 293 TRACE_EVENT_P1("Memory left (title dest): %d", mfwCheckMemoryLeft()); |
294 } | 294 } |
295 | 295 |
296 /* Free text entry memory */ | 296 /* Free text entry memory */ |
297 | 297 |
298 AUI_entry_Destroy(data->entry_data); | 298 AUI_entry_Destroy(data->entry_data); |
299 TRACE_EVENT_P1("Memory left (entry dest): %d", mfwCheckMemoryLeft()); | 299 TRACE_EVENT_P1("Memory left (entry dest): %d", mfwCheckMemoryLeft()); |
300 /* Delete window */ | 300 /* Delete window */ |
301 | 301 |
302 win_delete (data->win); | 302 win_delete (data->win); |
303 TRACE_EVENT_P1("Memory left (win dest): %d", mfwCheckMemoryLeft()); | 303 TRACE_EVENT_P1("Memory left (win dest): %d", mfwCheckMemoryLeft()); |
304 /* Free editor memory */ | 304 /* Free editor memory */ |
305 | 305 |
306 ATB_edit_Destroy(data->editor); | 306 ATB_edit_Destroy(data->editor); |
307 TRACE_EVENT_P1("Memory left (editor dest): %d", mfwCheckMemoryLeft()); | 307 TRACE_EVENT_P1("Memory left (editor dest): %d", mfwCheckMemoryLeft()); |
308 /* Free Memory */ | 308 /* Free Memory */ |
309 | 309 |
310 FREE_MEMORY ((void *)data, sizeof (T_AUI_PIN_DATA)); | 310 FREE_MEMORY ((void *)data, sizeof (T_AUI_PIN_DATA)); |
311 TRACE_EVENT_P1("Memory left (data dest): %d", mfwCheckMemoryLeft()); | 311 TRACE_EVENT_P1("Memory left (data dest): %d", mfwCheckMemoryLeft()); |
312 } | 312 } |
313 | 313 |
314 return; | 314 return; |
315 } | 315 } |
316 | 316 |
317 | 317 |
318 /******************************************************************************* | 318 /******************************************************************************* |
319 | 319 |
320 $Function: AUI_pin_ExecCb | 320 $Function: AUI_pin_ExecCb |
321 | 321 |
322 $Description: Dialog function for PIN editor. | 322 $Description: Dialog function for PIN editor. |
323 | 323 |
324 $Returns: None. | 324 $Returns: None. |
325 | 325 |
326 $Arguments: None. | 326 $Arguments: None. |
327 | 327 |
328 *******************************************************************************/ | 328 *******************************************************************************/ |
329 | 329 |
330 static void AUI_pin_ExecCb(T_MFW_HND win, USHORT event, SHORT value, void *parameter) | 330 static void AUI_pin_ExecCb(T_MFW_HND win, USHORT event, SHORT value, void *parameter) |
331 { | 331 { |
332 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; | 332 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
336 /* Store these in case editor is destroyed on callback */ | 336 /* Store these in case editor is destroyed on callback */ |
337 USHORT Identifier = data->editor_data.Identifier; | 337 USHORT Identifier = data->editor_data.Identifier; |
338 T_AUI_EDIT_CB Callback = data->editor_data.Callback; | 338 T_AUI_EDIT_CB Callback = data->editor_data.Callback; |
339 UBYTE destroyEditor = data->editor_data.destroyEditor; | 339 UBYTE destroyEditor = data->editor_data.destroyEditor; |
340 T_AUI_PINS *pin_unblock_data; | 340 T_AUI_PINS *pin_unblock_data; |
341 | 341 |
342 TRACE_FUNCTION ("AUI_pin_ExecCb()"); | 342 TRACE_FUNCTION ("AUI_pin_ExecCb()"); |
343 | 343 |
344 switch (event) | 344 switch (event) |
345 { | 345 { |
346 /* Initialise */ | 346 /* Initialise */ |
347 | 347 |
348 case E_PIN_INIT: | 348 case E_PIN_INIT: |
349 TRACE_EVENT("E_PIN_INIT"); | 349 TRACE_EVENT("E_PIN_INIT"); |
350 ATB_edit_Init(data->editor); | 350 ATB_edit_Init(data->editor); |
351 | 351 |
352 data->haveTitle = FALSE; | 352 data->haveTitle = FALSE; |
367 data->haveTitle = TRUE; | 367 data->haveTitle = TRUE; |
368 text.data = (UBYTE *)MmiRsrcGetText(data->editor_data.TitleId); | 368 text.data = (UBYTE *)MmiRsrcGetText(data->editor_data.TitleId); |
369 } | 369 } |
370 | 370 |
371 /* If title exists, get its dcs and length */ | 371 /* If title exists, get its dcs and length */ |
372 | 372 |
373 if (data->haveTitle) | 373 if (data->haveTitle) |
374 { | 374 { |
375 if (text.data[0]==0x80) | 375 if (text.data[0]==0x80) |
376 { | 376 { |
377 text.data += 2; /* Skip over two unicode indicator bytes */ | 377 text.data += 2; /* Skip over two unicode indicator bytes */ |
385 #endif | 385 #endif |
386 else | 386 else |
387 { | 387 { |
388 text.dcs = ATB_DCS_ASCII; | 388 text.dcs = ATB_DCS_ASCII; |
389 } | 389 } |
390 | 390 |
391 text.len = ATB_string_Length(&text); | 391 text.len = ATB_string_Length(&text); |
392 /* Allocate memory for the title and copy the text there */ | 392 /* Allocate memory for the title and copy the text there */ |
393 data->title.data = (UBYTE *)ALLOC_MEMORY((text.len+1)*ATB_string_Size(&text)); | 393 data->title.data = (UBYTE *)ALLOC_MEMORY((text.len+1)*ATB_string_Size(&text)); |
394 TRACE_EVENT_P1("Memory left (title): %d", mfwCheckMemoryLeft()); | 394 TRACE_EVENT_P1("Memory left (title): %d", mfwCheckMemoryLeft()); |
395 ATB_string_Copy(&data->title, &text); | 395 ATB_string_Copy(&data->title, &text); |
399 | 399 |
400 if (data->editor_data.editor_attr.text.len >= data->editor_data.min_enter) | 400 if (data->editor_data.editor_attr.text.len >= data->editor_data.min_enter) |
401 data->enteredMinChars = TRUE; | 401 data->enteredMinChars = TRUE; |
402 else | 402 else |
403 data->enteredMinChars = FALSE; | 403 data->enteredMinChars = FALSE; |
404 | 404 |
405 /* Set flag if some characters are in the buffer */ | 405 /* Set flag if some characters are in the buffer */ |
406 if (data->editor_data.editor_attr.text.len > 0 ) | 406 if (data->editor_data.editor_attr.text.len > 0 ) |
407 data->enteredSomeChars = TRUE; | 407 data->enteredSomeChars = TRUE; |
408 else | 408 else |
409 data->enteredSomeChars = FALSE; | 409 data->enteredSomeChars = FALSE; |
420 case E_PIN_DEINIT: | 420 case E_PIN_DEINIT: |
421 TRACE_EVENT("E_PIN_DEINIT"); | 421 TRACE_EVENT("E_PIN_DEINIT"); |
422 | 422 |
423 if (Callback) | 423 if (Callback) |
424 (Callback) (parent_win, Identifier, value); | 424 (Callback) (parent_win, Identifier, value); |
425 | 425 |
426 if (destroyEditor) | 426 if (destroyEditor) |
427 AUI_pin_Destroy(data->win); | 427 AUI_pin_Destroy(data->win); |
428 | 428 |
429 break; | 429 break; |
430 | 430 |
431 case E_PUK1_COMPLETE: | 431 case E_PUK1_COMPLETE: |
432 TRACE_EVENT("E_PIN_COMPLETE"); | 432 TRACE_EVENT("E_PIN_COMPLETE"); |
433 | 433 |
434 pin_unblock_data = (T_AUI_PINS *)parameter; | 434 pin_unblock_data = (T_AUI_PINS *)parameter; |
435 | 435 |
436 sim_unblock_pin(pin_unblock_data->pin_id, | 436 sim_unblock_pin(pin_unblock_data->pin_id, |
437 pin_unblock_data->puk_code, | 437 pin_unblock_data->puk_code, |
438 pin_unblock_data->new_pin); /* unblock pin1 */ | 438 pin_unblock_data->new_pin); /* unblock pin1 */ |
439 | 439 |
440 if (destroyEditor) | 440 if (destroyEditor) |
441 AUI_pin_Destroy(data->win); | 441 AUI_pin_Destroy(data->win); |
442 | 442 |
443 break; | 443 break; |
444 | 444 |
445 } | 445 } |
446 | 446 |
447 return; | 447 return; |
469 T_DS_TEXTFORMAT format; | 469 T_DS_TEXTFORMAT format; |
470 // USHORT titleLen; // RAVI | 470 // USHORT titleLen; // RAVI |
471 | 471 |
472 if (!data) | 472 if (!data) |
473 return MFW_EVENT_CONSUMED; | 473 return MFW_EVENT_CONSUMED; |
474 | 474 |
475 switch(event) | 475 switch(event) |
476 { | 476 { |
477 case E_WIN_VISIBLE: /* window is visible */ | 477 case E_WIN_VISIBLE: /* window is visible */ |
478 if (win_data->flags & E_WIN_VISIBLE) | 478 if (win_data->flags & E_WIN_VISIBLE) |
479 { | 479 { |
495 /* TITLE - only display if update type is FULL or DEFAULT*/ | 495 /* TITLE - only display if update type is FULL or DEFAULT*/ |
496 | 496 |
497 if (editor->update!=ED_UPDATE_PARTIAL) | 497 if (editor->update!=ED_UPDATE_PARTIAL) |
498 { | 498 { |
499 dspl_Clear(0,0, SCREEN_SIZE_X-1, win_size->py-1); | 499 dspl_Clear(0,0, SCREEN_SIZE_X-1, win_size->py-1); |
500 | 500 |
501 if (data->haveTitle) | 501 if (data->haveTitle) |
502 { | 502 { |
503 ATB_display_SetFormatAttr(&format, 0, FALSE); | 503 ATB_display_SetFormatAttr(&format, 0, FALSE); |
504 | 504 |
505 /* Display "Emergency?" prompt in title if emergency call */ | 505 /* Display "Emergency?" prompt in title if emergency call */ |
506 if (data->emergency_call) | 506 if (data->emergency_call) |
507 { | 507 { |
508 text.dcs = data->title.dcs; | 508 text.dcs = data->title.dcs; |
509 text.data = (UBYTE *)MmiRsrcGetText(TxtEmergency); | 509 text.data = (UBYTE *)MmiRsrcGetText(TxtEmergency); |
515 { | 515 { |
516 ATB_display_Text(0,0,&format, &data->title); | 516 ATB_display_Text(0,0,&format, &data->title); |
517 } | 517 } |
518 } | 518 } |
519 } | 519 } |
520 | 520 |
521 /* Display Soft Keys */ | 521 /* Display Soft Keys */ |
522 | 522 |
523 if (data->emergency_call) | 523 if (data->emergency_call) |
524 { | 524 { |
525 displaySoftKeys(TxtSoftCall, data->editor_data.RightSoftKey); | 525 displaySoftKeys(TxtSoftCall, data->editor_data.RightSoftKey); |
526 } | 526 } |
527 else | 527 else |
535 displaySoftKeys(data->editor_data.AltLeftSoftKey,TxtNull); | 535 displaySoftKeys(data->editor_data.AltLeftSoftKey,TxtNull); |
536 } | 536 } |
537 else | 537 else |
538 { | 538 { |
539 /* entered sufficient number of chars: Normal Softkey appears */ | 539 /* entered sufficient number of chars: Normal Softkey appears */ |
540 | 540 |
541 if (data->editor_data.editor_attr.text.len > 0) | 541 if (data->editor_data.editor_attr.text.len > 0) |
542 displaySoftKeys(data->editor_data.LeftSoftKey,data->editor_data.RightSoftKey); | 542 displaySoftKeys(data->editor_data.LeftSoftKey,data->editor_data.RightSoftKey); |
543 else | 543 else |
544 displaySoftKeys(data->editor_data.LeftSoftKey, TxtNull); | 544 displaySoftKeys(data->editor_data.LeftSoftKey, TxtNull); |
545 } | 545 } |
563 $Description: PIN editor keyboard event handler | 563 $Description: PIN editor keyboard event handler |
564 | 564 |
565 $Returns: None. | 565 $Returns: None. |
566 | 566 |
567 $Arguments: event - the keyboard event | 567 $Arguments: event - the keyboard event |
568 keyboard | 568 keyboard |
569 | 569 |
570 *******************************************************************************/ | 570 *******************************************************************************/ |
571 | 571 |
572 static int AUI_pin_KbdCb(T_MFW_EVENT event, T_MFW_KBD *keyboard) | 572 static int AUI_pin_KbdCb(T_MFW_EVENT event, T_MFW_KBD *keyboard) |
573 { | 573 { |
577 // ED_RES result; // RAVI | 577 // ED_RES result; // RAVI |
578 UBYTE *edit_data_buf; | 578 UBYTE *edit_data_buf; |
579 BOOL bRetVal; | 579 BOOL bRetVal; |
580 T_AUI_PINS pin_unblock_data; | 580 T_AUI_PINS pin_unblock_data; |
581 T_DISPLAY_DATA display_info; | 581 T_DISPLAY_DATA display_info; |
582 | 582 |
583 TRACE_FUNCTION("AUI_pin_KbdCb()"); | 583 TRACE_FUNCTION("AUI_pin_KbdCb()"); |
584 | 584 |
585 /* Suppress unwanted long keypresses */ | 585 /* Suppress unwanted long keypresses */ |
586 | 586 |
587 data->doNextLongPress = TRUE; /* next Key_long event is correct */ | 587 data->doNextLongPress = TRUE; /* next Key_long event is correct */ |
608 | 608 |
609 AUI_entry_EventKey(data->entry_data, event, keyboard); | 609 AUI_entry_EventKey(data->entry_data, event, keyboard); |
610 win_show(data->win); | 610 win_show(data->win); |
611 } | 611 } |
612 //xrashmic 1 Jul, 2006 OMAPS00075784 | 612 //xrashmic 1 Jul, 2006 OMAPS00075784 |
613 //The password mode to be turned on while entering the gsm string to | 613 //The password mode to be turned on while entering the gsm string to |
614 //unblock PUK during bootup | 614 //unblock PUK during bootup |
615 if(data->editor_data.editor_attr.text.len >=4 ) | 615 if(data->editor_data.editor_attr.text.len >=4 ) |
616 { | 616 { |
617 if((strncmp((char*)data->editor_data.editor_attr.text.data, "**05*", 5) == 0) || | 617 if((strncmp((char*)data->editor_data.editor_attr.text.data, "**05*", 5) == 0) || |
618 (strncmp((char*)data->editor_data.editor_attr.text.data, "**052*", 6) == 0) || | 618 (strncmp((char*)data->editor_data.editor_attr.text.data, "**052*", 6) == 0) || |
628 /* Send SS string if we're entering one */ | 628 /* Send SS string if we're entering one */ |
629 if(data->ss_string) | 629 if(data->ss_string) |
630 { | 630 { |
631 AUI_entry_EventKey(data->entry_data, event, keyboard); | 631 AUI_entry_EventKey(data->entry_data, event, keyboard); |
632 //xrashmic 1 Jul, 2006 OMAPS00075784 | 632 //xrashmic 1 Jul, 2006 OMAPS00075784 |
633 //The password mode to be turned on while entering the gsm string to | 633 //The password mode to be turned on while entering the gsm string to |
634 //unblock PUK during bootup | 634 //unblock PUK during bootup |
635 | 635 |
636 if(ATB_edit_Mode(data->editor, ED_MODE_HIDDEN)) | 636 if(ATB_edit_Mode(data->editor, ED_MODE_HIDDEN)) |
637 { | 637 { |
638 if((strncmp((char*)data->editor_data.editor_attr.text.data, "**05*", 5) == 0) || | 638 if((strncmp((char*)data->editor_data.editor_attr.text.data, "**05*", 5) == 0) || |
644 (strncmp((char*)data->editor_data.editor_attr.text.data, "**042*", 6) == 0)) | 644 (strncmp((char*)data->editor_data.editor_attr.text.data, "**042*", 6) == 0)) |
645 { | 645 { |
646 strncpy((char*)&data->editor_data.editor_attr.text.data[6], | 646 strncpy((char*)&data->editor_data.editor_attr.text.data[6], |
647 (char*)&data->editor->hiddenText->data[6], data->editor_data.editor_attr.text.len - 6); | 647 (char*)&data->editor->hiddenText->data[6], data->editor_data.editor_attr.text.len - 6); |
648 } | 648 } |
649 } | 649 } |
650 | 650 |
651 edit_data_buf = ALLOC_MEMORY(data->editor_data.editor_attr.size); | 651 edit_data_buf = ALLOC_MEMORY(data->editor_data.editor_attr.size); |
652 | 652 |
653 strcpy((char *)edit_data_buf, (char *)data->editor_data.editor_attr.text.data); | 653 strcpy((char *)edit_data_buf, (char *)data->editor_data.editor_attr.text.data); |
654 | 654 |
655 switch (AUI_pin_CheckSSString(data)) | 655 switch (AUI_pin_CheckSSString(data)) |
656 { | 656 { |
657 case MFW_SS_MMI: | 657 case MFW_SS_MMI: |
658 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg | 658 // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg |
659 // replace the call to get_imei() with callNumber | 659 // replace the call to get_imei() with callNumber |
660 #ifdef FF_MMI_ATC_MIGRATION | 660 #ifdef FF_MMI_ATC_MIGRATION |
661 mmi_imei_retrieve(); | 661 mmi_imei_retrieve(); |
662 #else | 662 #else |
663 get_imei((char*)data->imei); | 663 get_imei((char*)data->imei); |
664 showIMEI(win,(char*)data->imei); | 664 showIMEI(win,(char*)data->imei); |
665 #endif | 665 #endif |
666 ATB_edit_ClearAll(data->editor); | 666 ATB_edit_ClearAll(data->editor); |
667 | 667 |
668 /* Set back to the default */ | 668 /* Set back to the default */ |
669 data->ss_string = FALSE; | 669 data->ss_string = FALSE; |
670 | 670 |
707 } | 707 } |
708 else | 708 else |
709 { | 709 { |
710 SEND_EVENT (win, E_PUK1_COMPLETE, INFO_KCD_LEFT, &pin_unblock_data); | 710 SEND_EVENT (win, E_PUK1_COMPLETE, INFO_KCD_LEFT, &pin_unblock_data); |
711 } | 711 } |
712 | 712 |
713 return MFW_EVENT_CONSUMED; | 713 return MFW_EVENT_CONSUMED; |
714 // break; // RAVI | 714 // break; // RAVI |
715 | 715 |
716 default: | 716 default: |
717 /* xreddymn OMAPS00083495 Jul-04-2006 | 717 /* xreddymn OMAPS00083495 Jul-04-2006 |
718 * Display error dialog for BPM strings that are not handled. | 718 * Display error dialog for BPM strings that are not handled. |
719 */ | 719 */ |
720 ATB_edit_ClearAll(data->editor); | 720 ATB_edit_ClearAll(data->editor); |
721 data->ss_string = FALSE; | 721 data->ss_string = FALSE; |
722 if (data->hidden == TRUE) | 722 if (data->hidden == TRUE) |
793 { | 793 { |
794 ATB_edit_HiddenExit(data->editor); | 794 ATB_edit_HiddenExit(data->editor); |
795 } | 795 } |
796 SEND_EVENT (win, E_PIN_DEINIT, INFO_EMERGENCY, NULL); | 796 SEND_EVENT (win, E_PIN_DEINIT, INFO_EMERGENCY, NULL); |
797 } | 797 } |
798 break; | 798 break; |
799 | 799 |
800 case KCD_RIGHT: | 800 case KCD_RIGHT: |
801 if(data->editor_data.editor_attr.text.len!=0) | 801 if(data->editor_data.editor_attr.text.len!=0) |
802 { | 802 { |
803 //xrashmic 1 Jul, 2006 OMAPS00075784 | 803 //xrashmic 1 Jul, 2006 OMAPS00075784 |
804 //The password mode to be turned on while entering the gsm string to | 804 //The password mode to be turned on while entering the gsm string to |
805 //unblock PUK during bootup | 805 //unblock PUK during bootup |
806 if(ATB_edit_Mode(data->editor, ED_MODE_HIDDEN) && | 806 if(ATB_edit_Mode(data->editor, ED_MODE_HIDDEN) && |
807 (((data->editor_data.editor_attr.text.len == 5) && | 807 (((data->editor_data.editor_attr.text.len == 5) && |
808 ((strncmp((char*)data->editor_data.editor_attr.text.data, "**05*", 5) == 0) || | 808 ((strncmp((char*)data->editor_data.editor_attr.text.data, "**05*", 5) == 0) || |
809 (strncmp((char*)data->editor_data.editor_attr.text.data, "**04*", 5) == 0))) || | 809 (strncmp((char*)data->editor_data.editor_attr.text.data, "**04*", 5) == 0))) || |
810 ((data->editor_data.editor_attr.text.len == 6) && | 810 ((data->editor_data.editor_attr.text.len == 6) && |
811 ((strncmp((char*)data->editor_data.editor_attr.text.data, "**052*", 6) == 0) || | 811 ((strncmp((char*)data->editor_data.editor_attr.text.data, "**052*", 6) == 0) || |
812 (strncmp((char*)data->editor_data.editor_attr.text.data, "**042*", 6) == 0))))) | 812 (strncmp((char*)data->editor_data.editor_attr.text.data, "**042*", 6) == 0))))) |
813 { | 813 { |
814 ATB_edit_ResetMode(data->editor, ED_MODE_HIDDEN); | 814 ATB_edit_ResetMode(data->editor, ED_MODE_HIDDEN); |
815 } | 815 } |
816 | 816 |
817 ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 - SH */ | 817 ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 - SH */ |
818 | 818 |
819 /* For a SS string */ | 819 /* For a SS string */ |
820 if ( !ATB_edit_Mode(data->editor,ED_MODE_HIDDEN) ) | 820 if ( !ATB_edit_Mode(data->editor,ED_MODE_HIDDEN) ) |
821 { | 821 { |
822 if (data->editor_data.editor_attr.text.len==0 && data->ss_string) | 822 if (data->editor_data.editor_attr.text.len==0 && data->ss_string) |
823 { | 823 { |
844 case KCD_5: | 844 case KCD_5: |
845 case KCD_6: | 845 case KCD_6: |
846 case KCD_7: | 846 case KCD_7: |
847 case KCD_8: | 847 case KCD_8: |
848 case KCD_9: | 848 case KCD_9: |
849 /* xreddymn OMAPS00083495 Jul-04-2006 | 849 /* xreddymn OMAPS00083495 Jul-04-2006 |
850 * Limit PIN1, PIN2 entries to 8 digits. | 850 * Limit PIN1, PIN2 entries to 8 digits. |
851 */ | 851 */ |
852 if(((data->editor_data.Identifier==PIN1_REQ) || | 852 if(((data->editor_data.Identifier==PIN1_REQ) || |
853 (data->editor_data.Identifier==PIN2_REQ)) && | 853 (data->editor_data.Identifier==PIN2_REQ)) && |
854 (data->editor_data.editor_attr.text.len>=8) && | 854 (data->editor_data.editor_attr.text.len>=8) && |
855 (!data->ss_string)) | 855 (!data->ss_string)) |
856 return MFW_EVENT_CONSUMED; | 856 return MFW_EVENT_CONSUMED; |
857 else | 857 else |
858 { | 858 { |
859 AUI_entry_EventKey(data->entry_data, event, keyboard); | 859 AUI_entry_EventKey(data->entry_data, event, keyboard); |
875 $Description: PIN editor long keypress keyboard event handler | 875 $Description: PIN editor long keypress keyboard event handler |
876 | 876 |
877 $Returns: None. | 877 $Returns: None. |
878 | 878 |
879 $Arguments: event - the keyboard event | 879 $Arguments: event - the keyboard event |
880 keyboard | 880 keyboard |
881 | 881 |
882 *******************************************************************************/ | 882 *******************************************************************************/ |
883 | 883 |
884 static int AUI_pin_KbdLongCb(T_MFW_EVENT event, T_MFW_KBD *keyboard) | 884 static int AUI_pin_KbdLongCb(T_MFW_EVENT event, T_MFW_KBD *keyboard) |
885 { | 885 { |
886 T_MFW_HND win = mfw_parent (mfw_header()); | 886 T_MFW_HND win = mfw_parent (mfw_header()); |
887 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; | 887 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; |
888 T_AUI_PIN_DATA *data = (T_AUI_PIN_DATA *)win_data->user; | 888 T_AUI_PIN_DATA *data = (T_AUI_PIN_DATA *)win_data->user; |
889 ED_RES result; | 889 ED_RES result; |
890 | 890 |
891 /* Suppress unwanted long keypresses */ | 891 /* Suppress unwanted long keypresses */ |
892 | 892 |
893 if ( data->doNextLongPress ) | 893 if ( data->doNextLongPress ) |
894 data->doNextLongPress = FALSE; /* mark Key_long event as consumed but do current long press */ | 894 data->doNextLongPress = FALSE; /* mark Key_long event as consumed but do current long press */ |
895 else | 895 else |
896 return MFW_EVENT_CONSUMED; /* don't do current long press */ | 896 return MFW_EVENT_CONSUMED; /* don't do current long press */ |
897 | 897 |
898 switch (keyboard->code) | 898 switch (keyboard->code) |
899 { | 899 { |
900 case KCD_RIGHT: | 900 case KCD_RIGHT: |
901 /* Long press of RSK deletes buffer */ | 901 /* Long press of RSK deletes buffer */ |
902 result = ATB_edit_ClearAll(data->editor); | 902 result = ATB_edit_ClearAll(data->editor); |
903 | 903 |
904 /* If we've deleted on an empty buffer, exit editor */ | 904 /* If we've deleted on an empty buffer, exit editor */ |
905 if (result==ED_DONE) | 905 if (result==ED_DONE) |
906 { | 906 { |
907 SEND_EVENT(data->win, E_PIN_DEINIT, INFO_KCD_RIGHT, 0); | 907 SEND_EVENT(data->win, E_PIN_DEINIT, INFO_KCD_RIGHT, 0); |
908 } | 908 } |
924 | 924 |
925 $Description: Check number to see if it's an emergency number | 925 $Description: Check number to see if it's an emergency number |
926 | 926 |
927 $Returns: None. | 927 $Returns: None. |
928 | 928 |
929 $Arguments: data - The editor data | 929 $Arguments: data - The editor data |
930 | 930 |
931 *******************************************************************************/ | 931 *******************************************************************************/ |
932 | 932 |
933 static UBYTE AUI_pin_CheckEmergency(T_AUI_PIN_DATA *data) | 933 static UBYTE AUI_pin_CheckEmergency(T_AUI_PIN_DATA *data) |
934 { | 934 { |
966 | 966 |
967 if (data->editor_data.editor_attr.text.len > 0) | 967 if (data->editor_data.editor_attr.text.len > 0) |
968 data->enteredSomeChars = TRUE; | 968 data->enteredSomeChars = TRUE; |
969 else | 969 else |
970 data->enteredSomeChars = FALSE; | 970 data->enteredSomeChars = FALSE; |
971 | 971 |
972 /* Check if the softkeys have changed */ | 972 /* Check if the softkeys have changed */ |
973 | 973 |
974 if (data->emergency_call!=previous_emergency) | 974 if (data->emergency_call!=previous_emergency) |
975 { | 975 { |
976 data->editor->update = ED_UPDATE_FULL; /* Update softkeys, title and editor */ | 976 data->editor->update = ED_UPDATE_FULL; /* Update softkeys, title and editor */ |
995 $Description: Check number to see if it's an ss string | 995 $Description: Check number to see if it's an ss string |
996 | 996 |
997 $Returns: None. | 997 $Returns: None. |
998 | 998 |
999 $Arguments: event - the keyboard event | 999 $Arguments: event - the keyboard event |
1000 keyboard | 1000 keyboard |
1001 | 1001 |
1002 *******************************************************************************/ | 1002 *******************************************************************************/ |
1003 | 1003 |
1004 T_MFW_SS_RETURN AUI_pin_CheckSSString(T_AUI_PIN_DATA *data) | 1004 T_MFW_SS_RETURN AUI_pin_CheckSSString(T_AUI_PIN_DATA *data) |
1005 { | 1005 { |
1012 T_MFW_SS_RETURN retVal; | 1012 T_MFW_SS_RETURN retVal; |
1013 char *rest; | 1013 char *rest; |
1014 T_KSD_SEQPARAM ss_params; | 1014 T_KSD_SEQPARAM ss_params; |
1015 | 1015 |
1016 TRACE_EVENT_P2("AUI_pin_StripSSUnblock : &cmd_string = 0x%08lx, &pin_data = 0x%08lx", cmd_string, pin_data); | 1016 TRACE_EVENT_P2("AUI_pin_StripSSUnblock : &cmd_string = 0x%08lx, &pin_data = 0x%08lx", cmd_string, pin_data); |
1017 | 1017 |
1018 /* | 1018 /* |
1019 ** The incoming parameters chould not be NULL | 1019 ** The incoming parameters chould not be NULL |
1020 */ | 1020 */ |
1021 if ((cmd_string == NULL) || | 1021 if ((cmd_string == NULL) || |
1022 (pin_data == NULL)) | 1022 (pin_data == NULL)) |