FreeCalypso > hg > fc-tourmaline
diff 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 |
line wrap: on
line diff
--- a/src/ui/bmi/AUIPinEditor.c Sun Nov 08 05:12:05 2020 +0000 +++ b/src/ui/bmi/AUIPinEditor.c Sun Nov 08 06:39:16 2020 +0000 @@ -31,12 +31,12 @@ Resolved issues reported in PIN and PUK input through BPM. xrashmic 1 Jul, 2006 OMAPS00075784 - The password mode to be turned on while entering the gsm string to + The password mode to be turned on while entering the gsm string to unblock PUK during bootup July 09, 2005 REF : MMI - 22565 - a0876501 Description: Proper display of IMEI with CD byte. - Solution: Increased the IMEI length from 16 to 18. + Solution: Increased the IMEI length from 16 to 18. June 16, 2005 REF: CRR 31267 x0021334 Description: Handset ignore the initializtion of the PIN1/PIN2 @@ -47,8 +47,8 @@ Description: IMEI retreival by posting a call to ACI sAT_xx API Solution: The direct call to cl_get_imeisv() is replaced with the call to the mmi_imei_retrieve() which inturn calls sAT_Dn() and - retrieves the IMEI info and stores it onto the global - variable "imei" + retrieves the IMEI info and stores it onto the global + variable "imei" 14/11/02 Original Condat(UK) BMI version. $End @@ -142,7 +142,7 @@ T_ED_DATA *editor; /* The ATB editor */ T_AUI_EDITOR_DATA editor_data; /* The MMI editor data, provided by caller */ T_AUI_ENTRY_DATA *entry_data; /* The MMI text entry data */ - + BOOL haveTitle; /* TRUE if a title is supplied */ T_ATB_TEXT title; /* Title of editor */ @@ -212,7 +212,7 @@ $Function: AUI_pin_Create $Description: Create the PIN editor. - + $Returns: Pointer to the editor's window. $Arguments: parent - The parent window. @@ -241,7 +241,7 @@ } /* Connect the dialog data to the MFW-window */ - + data->mmi_control.dialog = (T_DIALOG_FUNC)AUI_pin_ExecCb; /* Setup the destination for events */ data->mmi_control.data = data; data->parent = parent; @@ -249,14 +249,14 @@ win_data->user = (void *)data; data->kbd = kbd_create(data->win, KEY_ALL,(T_MFW_CB)AUI_pin_KbdCb); - data->kbd_long = kbd_create(data->win, KEY_ALL|KEY_LONG,(T_MFW_CB)AUI_pin_KbdLongCb); + data->kbd_long = kbd_create(data->win, KEY_ALL|KEY_LONG,(T_MFW_CB)AUI_pin_KbdLongCb); data->editor = ATB_edit_Create(&data->editor_data.editor_attr,0); TRACE_EVENT_P1("Memory left (editor): %d", mfwCheckMemoryLeft()); data->editor_data = *editor_data; data->entry_data = AUI_entry_Create(data->win, data->editor, E_PIN_UPDATE); TRACE_EVENT_P1("Memory left (entry): %d", mfwCheckMemoryLeft()); SEND_EVENT(data->win, E_PIN_INIT, 0, 0); - + /* Return window handle */ return data->win; @@ -294,23 +294,23 @@ } /* Free text entry memory */ - + AUI_entry_Destroy(data->entry_data); TRACE_EVENT_P1("Memory left (entry dest): %d", mfwCheckMemoryLeft()); /* Delete window */ - + win_delete (data->win); TRACE_EVENT_P1("Memory left (win dest): %d", mfwCheckMemoryLeft()); /* Free editor memory */ ATB_edit_Destroy(data->editor); - TRACE_EVENT_P1("Memory left (editor dest): %d", mfwCheckMemoryLeft()); + TRACE_EVENT_P1("Memory left (editor dest): %d", mfwCheckMemoryLeft()); /* Free Memory */ FREE_MEMORY ((void *)data, sizeof (T_AUI_PIN_DATA)); TRACE_EVENT_P1("Memory left (data dest): %d", mfwCheckMemoryLeft()); } - + return; } @@ -320,11 +320,11 @@ $Function: AUI_pin_ExecCb $Description: Dialog function for PIN editor. - + $Returns: None. $Arguments: None. - + *******************************************************************************/ static void AUI_pin_ExecCb(T_MFW_HND win, USHORT event, SHORT value, void *parameter) @@ -338,13 +338,13 @@ T_AUI_EDIT_CB Callback = data->editor_data.Callback; UBYTE destroyEditor = data->editor_data.destroyEditor; T_AUI_PINS *pin_unblock_data; - + TRACE_FUNCTION ("AUI_pin_ExecCb()"); switch (event) { /* Initialise */ - + case E_PIN_INIT: TRACE_EVENT("E_PIN_INIT"); ATB_edit_Init(data->editor); @@ -369,7 +369,7 @@ } /* If title exists, get its dcs and length */ - + if (data->haveTitle) { if (text.data[0]==0x80) @@ -387,7 +387,7 @@ { text.dcs = ATB_DCS_ASCII; } - + text.len = ATB_string_Length(&text); /* Allocate memory for the title and copy the text there */ data->title.data = (UBYTE *)ALLOC_MEMORY((text.len+1)*ATB_string_Size(&text)); @@ -401,7 +401,7 @@ data->enteredMinChars = TRUE; else data->enteredMinChars = FALSE; - + /* Set flag if some characters are in the buffer */ if (data->editor_data.editor_attr.text.len > 0 ) data->enteredSomeChars = TRUE; @@ -422,24 +422,24 @@ if (Callback) (Callback) (parent_win, Identifier, value); - + if (destroyEditor) AUI_pin_Destroy(data->win); - + break; case E_PUK1_COMPLETE: TRACE_EVENT("E_PIN_COMPLETE"); pin_unblock_data = (T_AUI_PINS *)parameter; - + sim_unblock_pin(pin_unblock_data->pin_id, pin_unblock_data->puk_code, pin_unblock_data->new_pin); /* unblock pin1 */ if (destroyEditor) AUI_pin_Destroy(data->win); - + break; } @@ -471,7 +471,7 @@ if (!data) return MFW_EVENT_CONSUMED; - + switch(event) { case E_WIN_VISIBLE: /* window is visible */ @@ -497,11 +497,11 @@ if (editor->update!=ED_UPDATE_PARTIAL) { dspl_Clear(0,0, SCREEN_SIZE_X-1, win_size->py-1); - + if (data->haveTitle) { ATB_display_SetFormatAttr(&format, 0, FALSE); - + /* Display "Emergency?" prompt in title if emergency call */ if (data->emergency_call) { @@ -517,9 +517,9 @@ } } } - + /* Display Soft Keys */ - + if (data->emergency_call) { displaySoftKeys(TxtSoftCall, data->editor_data.RightSoftKey); @@ -537,7 +537,7 @@ else { /* entered sufficient number of chars: Normal Softkey appears */ - + if (data->editor_data.editor_attr.text.len > 0) displaySoftKeys(data->editor_data.LeftSoftKey,data->editor_data.RightSoftKey); else @@ -565,7 +565,7 @@ $Returns: None. $Arguments: event - the keyboard event - keyboard + keyboard *******************************************************************************/ @@ -579,7 +579,7 @@ BOOL bRetVal; T_AUI_PINS pin_unblock_data; T_DISPLAY_DATA display_info; - + TRACE_FUNCTION("AUI_pin_KbdCb()"); /* Suppress unwanted long keypresses */ @@ -610,7 +610,7 @@ win_show(data->win); } //xrashmic 1 Jul, 2006 OMAPS00075784 - //The password mode to be turned on while entering the gsm string to + //The password mode to be turned on while entering the gsm string to //unblock PUK during bootup if(data->editor_data.editor_attr.text.len >=4 ) { @@ -630,7 +630,7 @@ { AUI_entry_EventKey(data->entry_data, event, keyboard); //xrashmic 1 Jul, 2006 OMAPS00075784 - //The password mode to be turned on while entering the gsm string to + //The password mode to be turned on while entering the gsm string to //unblock PUK during bootup if(ATB_edit_Mode(data->editor, ED_MODE_HIDDEN)) @@ -646,7 +646,7 @@ strncpy((char*)&data->editor_data.editor_attr.text.data[6], (char*)&data->editor->hiddenText->data[6], data->editor_data.editor_attr.text.len - 6); } - } + } edit_data_buf = ALLOC_MEMORY(data->editor_data.editor_attr.size); @@ -656,13 +656,13 @@ { case MFW_SS_MMI: // May 02, 2005 REF : LOCOSTO-ENH-30818 - xpradipg -// replace the call to get_imei() with callNumber -#ifdef FF_MMI_ATC_MIGRATION +// replace the call to get_imei() with callNumber +#ifdef FF_MMI_ATC_MIGRATION mmi_imei_retrieve(); #else get_imei((char*)data->imei); showIMEI(win,(char*)data->imei); -#endif +#endif ATB_edit_ClearAll(data->editor); /* Set back to the default */ @@ -709,12 +709,12 @@ { SEND_EVENT (win, E_PUK1_COMPLETE, INFO_KCD_LEFT, &pin_unblock_data); } - + return MFW_EVENT_CONSUMED; // break; // RAVI default: - /* xreddymn OMAPS00083495 Jul-04-2006 + /* xreddymn OMAPS00083495 Jul-04-2006 * Display error dialog for BPM strings that are not handled. */ ATB_edit_ClearAll(data->editor); @@ -795,19 +795,19 @@ } SEND_EVENT (win, E_PIN_DEINIT, INFO_EMERGENCY, NULL); } - break; + break; case KCD_RIGHT: if(data->editor_data.editor_attr.text.len!=0) { //xrashmic 1 Jul, 2006 OMAPS00075784 - //The password mode to be turned on while entering the gsm string to + //The password mode to be turned on while entering the gsm string to //unblock PUK during bootup if(ATB_edit_Mode(data->editor, ED_MODE_HIDDEN) && - (((data->editor_data.editor_attr.text.len == 5) && + (((data->editor_data.editor_attr.text.len == 5) && ((strncmp((char*)data->editor_data.editor_attr.text.data, "**05*", 5) == 0) || (strncmp((char*)data->editor_data.editor_attr.text.data, "**04*", 5) == 0))) || - ((data->editor_data.editor_attr.text.len == 6) && + ((data->editor_data.editor_attr.text.len == 6) && ((strncmp((char*)data->editor_data.editor_attr.text.data, "**052*", 6) == 0) || (strncmp((char*)data->editor_data.editor_attr.text.data, "**042*", 6) == 0))))) { @@ -815,7 +815,7 @@ } ATB_edit_DeleteLeft(data->editor, TRUE); /* SPR#2342 - SH */ - + /* For a SS string */ if ( !ATB_edit_Mode(data->editor,ED_MODE_HIDDEN) ) { @@ -846,12 +846,12 @@ case KCD_7: case KCD_8: case KCD_9: - /* xreddymn OMAPS00083495 Jul-04-2006 + /* xreddymn OMAPS00083495 Jul-04-2006 * Limit PIN1, PIN2 entries to 8 digits. */ - if(((data->editor_data.Identifier==PIN1_REQ) || - (data->editor_data.Identifier==PIN2_REQ)) && - (data->editor_data.editor_attr.text.len>=8) && + if(((data->editor_data.Identifier==PIN1_REQ) || + (data->editor_data.Identifier==PIN2_REQ)) && + (data->editor_data.editor_attr.text.len>=8) && (!data->ss_string)) return MFW_EVENT_CONSUMED; else @@ -877,7 +877,7 @@ $Returns: None. $Arguments: event - the keyboard event - keyboard + keyboard *******************************************************************************/ @@ -887,7 +887,7 @@ T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; T_AUI_PIN_DATA *data = (T_AUI_PIN_DATA *)win_data->user; ED_RES result; - + /* Suppress unwanted long keypresses */ if ( data->doNextLongPress ) @@ -896,11 +896,11 @@ return MFW_EVENT_CONSUMED; /* don't do current long press */ switch (keyboard->code) - { + { case KCD_RIGHT: /* Long press of RSK deletes buffer */ result = ATB_edit_ClearAll(data->editor); - + /* If we've deleted on an empty buffer, exit editor */ if (result==ED_DONE) { @@ -926,7 +926,7 @@ $Returns: None. - $Arguments: data - The editor data + $Arguments: data - The editor data *******************************************************************************/ @@ -968,7 +968,7 @@ data->enteredSomeChars = TRUE; else data->enteredSomeChars = FALSE; - + /* Check if the softkeys have changed */ if (data->emergency_call!=previous_emergency) @@ -997,7 +997,7 @@ $Returns: None. $Arguments: event - the keyboard event - keyboard + keyboard *******************************************************************************/ @@ -1014,7 +1014,7 @@ T_KSD_SEQPARAM ss_params; TRACE_EVENT_P2("AUI_pin_StripSSUnblock : &cmd_string = 0x%08lx, &pin_data = 0x%08lx", cmd_string, pin_data); - + /* ** The incoming parameters chould not be NULL */