diff src/ui/bmi/mmiPins.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 368f10ebcc64
line wrap: on
line diff
--- a/src/ui/bmi/mmiPins.c	Sun Nov 08 05:12:05 2020 +0000
+++ b/src/ui/bmi/mmiPins.c	Sun Nov 08 06:39:16 2020 +0000
@@ -1,30 +1,30 @@
 
 /*******************************************************************************
 
-					CONDAT (UK) 
-
-********************************************************************************									      
+					CONDAT (UK)
+
+********************************************************************************
 
  This software product is the property of Condat (UK) Ltd and may not be
- disclosed to any third party without the express permission of the owner.				   
-									      
+ disclosed to any third party without the express permission of the owner.
+
 ********************************************************************************
 
- $Project name: Basic MMI						       
- $Project code: BMI (6349)							     
+ $Project name: Basic MMI
+ $Project code: BMI (6349)
  $Module:		MMI
  $File: 	    MmiPins.c
- $Revision:		1.0							  
-									      
- $Author:		Condat(UK)							   
- $Date: 	    25/10/00							  
-									       
+ $Revision:		1.0
+
+ $Author:		Condat(UK)
+ $Date: 	    25/10/00
+
 ********************************************************************************
-									      
+
  Description:
- 
+
   MMI PIN / PUK entry handling
-			
+
 ********************************************************************************
 
  $History: MmiPins.c
@@ -33,28 +33,28 @@
 	Description: MM: While playing an AAC, unplug USB freezes the audio
 	Solution: If any Audio file is playing, then stopping them before enabling/disabling phone lock,
 				auto phone lock and changing unlock password.
-			Changed the name of fucntions for setting and restting the headset/usb bit in 
+			Changed the name of fucntions for setting and restting the headset/usb bit in
 				ph_lock status variable
-	
+
  	May 23, 2007    DR: OMAPS00127483  x0pleela
 	Description:   Phonelock - Unable to unlock the phone during incoming call with ringer...
-	Solution: 	When ringer for either incoming call or alarm is playing in phone locked state, Audio 
-			usues the DMA channels which will be active. The DMA channels will be available only 
-			after the audio file is fully played. This will cause that process to be blocked until the 
-			DMA channel becomes in-active and in turn if we try to query or access secure driver 
-			we are blocked until the audio file is completely played. Since this is a hardware 
-			constraint, we found a workaround for this issue and are stopping the ringer  
-			either for incoming call or alarm before accessing secure driver for enabling or 
+	Solution: 	When ringer for either incoming call or alarm is playing in phone locked state, Audio
+			usues the DMA channels which will be active. The DMA channels will be available only
+			after the audio file is fully played. This will cause that process to be blocked until the
+			DMA channel becomes in-active and in turn if we try to query or access secure driver
+			we are blocked until the audio file is completely played. Since this is a hardware
+			constraint, we found a workaround for this issue and are stopping the ringer
+			either for incoming call or alarm before accessing secure driver for enabling or
 			disbaling the phone lock.
 
 	May 09, 2007  DR: OMAPS00129014
 	Description: COMBO: unable to send SMS during midi playing
-	Solution: Setting the auto phone lock flag to TRUE / FALSE when automatic phonelock is 
-				on / off respectively	
-	
+	Solution: Setting the auto phone lock flag to TRUE / FALSE when automatic phonelock is
+				on / off respectively
+
 	Apr 03, 2007    ER: OMAPS00122561  x0pleela
 	Description:   [ACI] Phone lock feature has to be supported by ACI
-	Solution: Phone Lock ER implementation 
+	Solution: Phone Lock ER implementation
 
       Feb 19, 2006 ER:OMAPS00115179 a0393213
       Description : support SIM insertion without powering down
@@ -62,33 +62,33 @@
 
  	Nov 13, 2006 DR: OMAPS00103356  x0pleela
  	Description: SIMP:Master unlock failed through MMI
- 	Solution: 1) In function pins_editor_cb() for INPUT_MASTER_KEY_REQ, 
+ 	Solution: 1) In function pins_editor_cb() for INPUT_MASTER_KEY_REQ,
 			- An event SMLK_SHOW_WRONG_PWD is sent for wrong Master unlock password
-			- An event SMLK_SHOW_DEP_CATS_UNLOCKED is sent which says all the dependent 
+			- An event SMLK_SHOW_DEP_CATS_UNLOCKED is sent which says all the dependent
 				categories are unlocked
-			2) In function pin_messages(): 
- 			- An event SMLK_SHOW_WRONG_PWD is handled to display a dialog saying Master 
+			2) In function pin_messages():
+ 			- An event SMLK_SHOW_WRONG_PWD is handled to display a dialog saying Master
  				Unblock Password is wrong
-			- An event SMLK_SHOW_DEP_CATS_UNLOCKED to display a dialog saying Master 
+			- An event SMLK_SHOW_DEP_CATS_UNLOCKED to display a dialog saying Master
 				unlocking operation is successful
 
     	Sep 26, 2006 DR: OMAPS00095524 x0pleela
  	Description:Implement 2 missing SIM Lock types
  	Solution: Made the following changes
 			1) sim_event_cb_main()
-				- Handling the event MFW_SIM_PBLOCK_REQ for requesting unlocking password 
+				- Handling the event MFW_SIM_PBLOCK_REQ for requesting unlocking password
 					of "Blocked Network" category
 			2) simp_busy_cb()
-				- Added a check for CME class and Ext class and handled all CME errors 
+				- Added a check for CME class and Ext class and handled all CME errors
 					and EXT errors separately
 			3) pin_main()
-				- Handling the event INPUT_PBLOCK_PIN_REQ to prompt the user to enter the 
+				- Handling the event INPUT_PBLOCK_PIN_REQ to prompt the user to enter the
 					Blocked Network Password (PIN or PUK)
 			4) pin_info_cb()
-				- Added a check for CME class and Ext class and handled all CME errors and EXT 
+				- Added a check for CME class and Ext class and handled all CME errors and EXT
 					errors separately for event SMLK_MASTERKEY and SMLK_PUK
 			5) simlock_check_PBCatLock()
-				- Added new function which gets the lock status of Blocked Network category 
+				- Added new function which gets the lock status of Blocked Network category
 					and accordingly display the menu item
 			6) simp_unlock_Category()
 				- Handling "Blocked Network" category and send INPUT_PBLOCK_PIN_REQ event
@@ -98,22 +98,22 @@
 				- Updating the variable which prompts the user to enter Blocked Network password
 			9) pins_editor_cb()
 				- Handling the event INPUT_PBLOCK_PIN_REQ fr Blocked Network category
-				- Added a check for CME class and Ext class and handled all CME errors and EXT 
+				- Added a check for CME class and Ext class and handled all CME errors and EXT
 					errors separately
- 	
+
  	Sep 26, 2006 DR: OMAPS00096565  x0pleela
- 	Description: After blocking PIN, when ISAMPLE is reset, instead of prompting for PUK, master 
+ 	Description: After blocking PIN, when ISAMPLE is reset, instead of prompting for PUK, master
  				unlock key is asked
  	Solution: Added a check for C_KEY_REQ in functions sim_event_cb_main(), pin_info_cb() .
- 			If this variable is set the SIMP menu will be isplayed 
+ 			If this variable is set the SIMP menu will be isplayed
  			else user wil be prompted to enter PUK
- 
+
 
  	xashmic 21 Sep 2006, OMAPS00095831
  	Description: USB enumeration does not happen in PIN/PUK/Insert SIM scenarios
- 	Solution: When booting up without SIM card, or prompting for PIN/PUK/SIMP entry, 
- 	enumerate all the USB ports automatically 
- 	
+ 	Solution: When booting up without SIM card, or prompting for PIN/PUK/SIMP entry,
+ 	enumerate all the USB ports automatically
+
  	Sep 11, 2006 DR: OMAPS00094215  x0pleela
  	Description: MMI compilation failed as CME_ErrBusy undefined
  	Solution: Handling new Ext_ERR_Busy sent by ACI
@@ -121,7 +121,7 @@
  	Sep 08, 2006 DR: OMAPS00091250 x0pleela
  	Description:The phone resets if no MEPD data is presented
  	Solution:  - Handling MFW_MEPD_INVALID event in function sim_event_cb_main()
-			- Handling NO_MEPD event in functions pin_main(), pin_edt_kbd_cb(), check_pins(), 
+			- Handling NO_MEPD event in functions pin_main(), pin_edt_kbd_cb(), check_pins(),
 				pin_editor(), pin_messages(), check_set_pins(), pins_editor_cb(), show_confirmation_cb()
 
 	July 31, 2006 ER: OMAPS00087586, OMAPS00087587 x0pleela
@@ -129,103 +129,103 @@
 				OMAPS00087587: Time Penaly feature extend handset security
 	Solution:Made the following changes
 	1) Added new element mk_pin to store Master Unlock key to T_Pin structure
-	2) pin_main(), pin_messages(), setting_pin_main(),set_pin_messages(): Added new event SIM_LOCK_BUSY_UNBLOCK 
+	2) pin_main(), pin_messages(), setting_pin_main(),set_pin_messages(): Added new event SIM_LOCK_BUSY_UNBLOCK
 		to display a dialog "Busy" when wrong unlock password is entered after 1st attempt if timer is running
-	3) pin_info_cb(): Handling CME_ERR_Busy 
-	4) mmi_simlock_reset_fc_value(), pins_editor_cb(): Handling CME_ERR_Busy error and sending new event 
-		SIM_LOCK_BUSY_UNBLOCK 	to display a dialog "Busy" when wrong unlock password 
+	3) pin_info_cb(): Handling CME_ERR_Busy
+	4) mmi_simlock_reset_fc_value(), pins_editor_cb(): Handling CME_ERR_Busy error and sending new event
+		SIM_LOCK_BUSY_UNBLOCK 	to display a dialog "Busy" when wrong unlock password
 		is entered after 1st attempt if timer is running
-	
+
 	July 21, 2006 ER: OMAPS00087586, OMAPS00087587 x0pleela
 	Description: 	OMAPS00087586: MasterKey funtion in TCS3.2 SW
 				OMAPS00087587: Time Penaly feature extend handset security
-				
+
 	Solution:Made the following changes
-	1) sim_event_cb_main(): check for Master Unlock option enabled. If so, then display the menu 
+	1) sim_event_cb_main(): check for Master Unlock option enabled. If so, then display the menu
 				  with options Unblock ME and Master Unlock. Similar for all the categories also.
-	2) pin_main(): 	
-		a) Handling SIM_LOCK_BUSY_BOOTUP event which displays a dialog "Busy" for the user 
-			if timer is enabled and ACI returns Busy error when user had entered wrong unlocking 
+	2) pin_main():
+		a) Handling SIM_LOCK_BUSY_BOOTUP event which displays a dialog "Busy" for the user
+			if timer is enabled and ACI returns Busy error when user had entered wrong unlocking
 			password
-		b) Handling events SMLK_SHOW_MK_FAIL for wrong master unlock key, 
+		b) Handling events SMLK_SHOW_MK_FAIL for wrong master unlock key,
 			SMLK_SHOW_MK_SUCC for correct master unlock key
 
-	3) pin_messages(): 
+	3) pin_messages():
 		a) Handling event SMLK_SHOW_MK_FAIL to show a dialog saying "Master Unlock Failed"
 		b) Handling event SMLK_SHOW_MK_SUCC to show a dialog saying "Master Unlock Success"
-		c) For event SMLK_SHOW_FC_SUCC, changed the event from PIN_OK to SMLK_PUK bcoz 
-			after unblocking ME, for event PIN_OK it would go to idle screen without displaying 
+		c) For event SMLK_SHOW_FC_SUCC, changed the event from PIN_OK to SMLK_PUK bcoz
+			after unblocking ME, for event PIN_OK it would go to idle screen without displaying
 			menu for unlocking any categories if any
-		d) Delete the simp_list window handler after displaying the dialog immaterial of whether 
+		d) Delete the simp_list window handler after displaying the dialog immaterial of whether
 			the unlock/unblock passwords are correct or not
 
-	4) pin_info_cb():	
-		a) Handling PUK1_REQ separately as a menu should be displayed for Unblocking ME and 
+	4) pin_info_cb():
+		a) Handling PUK1_REQ separately as a menu should be displayed for Unblocking ME and
 			Master Unlock
-		b) Handling SMLK_MASTERKEYto display menu for Unblocking ME or unlocking categories 
+		b) Handling SMLK_MASTERKEYto display menu for Unblocking ME or unlocking categories
 			if any and Master Unlock
-		c) Made changes in the code for event SMLK_PUK to display menu Unblocking ME or 
+		c) Made changes in the code for event SMLK_PUK to display menu Unblocking ME or
 			unlocking categories if any and Master Unlock
 
 	5) setting_pin_main():
 		a) Handling event SIM_LOCK_REQ_MKPWD for Master unlock ket request
 		b) Handling event SIM_LOCK_MKPWD_FAIL for Master unlocking failed
 		c) Handling event SIM_LOCK_MKPWDSUCC for Master unlocking success
-		d) Handling new event SIM_LOCK_BUSY to display a dialog Busy for wrong entry of 
+		d) Handling new event SIM_LOCK_BUSY to display a dialog Busy for wrong entry of
 			unlocking pwd and timer been enable
 
-	6) mmi_display_result(): Handling CME error busy while unlocking a locked category and send 
+	6) mmi_display_result(): Handling CME error busy while unlocking a locked category and send
 		SIM_LOCK_BUSY event
 
-	7) mmi_simlock_en_dis_verify(): Handling CME error busy while unlocking a locked category 
+	7) mmi_simlock_en_dis_verify(): Handling CME error busy while unlocking a locked category
 		and send SIM_LOCK_BUSY event
 
 	8) set_pin_editor(): Handling event INPUT_SIM_MKPWD
 
 	9) set_pin_kbd_cb(): Handling event INPUT_SIM_MKPWD
 
-	10) set_pin_messages(): Handling events SIM_LOCK_MKPWD_FAIL for Master unlock failed, 
-		SIM_LOCK_MKPWDSUCC for Master unlock success, SIM_LOCK_BUSY for category unlock 
+	10) set_pin_messages(): Handling events SIM_LOCK_MKPWD_FAIL for Master unlock failed,
+		SIM_LOCK_MKPWDSUCC for Master unlock success, SIM_LOCK_BUSY for category unlock
 		return with Busy error from ACI
 
-	11) pins_editor_cb(): 
+	11) pins_editor_cb():
 		a) Update mmi_simlock_aciErrDesc with the latest CME error
-		b) Event INPUT_MASTER_KEY_REQ performs master unlock and sends corresponding 
+		b) Event INPUT_MASTER_KEY_REQ performs master unlock and sends corresponding
 			events during bootup
 		c) Delete the simp list window handler immaterial of whether the unlock/unblock
 			passwords are correct or not
-		d) Get the busy state "Simp_Busy_State" and send event to display a dialog Busy 
+		d) Get the busy state "Simp_Busy_State" and send event to display a dialog Busy
 			for the user
-		e) Check for Master Unlock option enabled. If so, then display the menu with options 
+		e) Check for Master Unlock option enabled. If so, then display the menu with options
 			<Category> unlock and Master Unlock
 
 	12) Added following new functions:
-		a) simp_busy_cb: This function checks for the ACI CME error and display menu for 
+		a) simp_busy_cb: This function checks for the ACI CME error and display menu for
 			unlocking  categories or unblocking ME
 		b) mmi_simlock_category_menus: Starts the simlock category list menu
-		c) SIMLock_unblock_ME: This function sends an event to display an editor for the user to 
+		c) SIMLock_unblock_ME: This function sends an event to display an editor for the user to
 			enter unblocking code
-		d) SIMLock_MasterKeyUnlock_bootup: This functioh gets called to unlock category /unblock 
+		d) SIMLock_MasterKeyUnlock_bootup: This functioh gets called to unlock category /unblock
 			ME during bootup sequence
-		e) SIMLock_MasterKeyUnlock: This functioh gets called to unlock category /unblock ME 
+		e) SIMLock_MasterKeyUnlock: This functioh gets called to unlock category /unblock ME
 			through SIMP menu
 		f) simlock_check_masterkey: If there is no support for Master Unlocking the item "Master unlock"
 			will not appear on the menulist
 		g) simlock_get_masterkey_status: This function gets the master key status
-		h) simlock_check_NWCatLock: This function gets the lock status of Network category and 
+		h) simlock_check_NWCatLock: This function gets the lock status of Network category and
 			accordingly display the menu item
-		i) simlock_check_NSCatLock: This function gets the lock status of Network subset category and 
+		i) simlock_check_NSCatLock: This function gets the lock status of Network subset category and
 			accordingly display the menu item
-		j) simlock_check_SPCatLock: This function gets the lock status of Service Provider category and 
+		j) simlock_check_SPCatLock: This function gets the lock status of Service Provider category and
 			accordingly display the menu item
-		k) simlock_check_CPCatLock: This function gets the lock status of Corporate category and 
+		k) simlock_check_CPCatLock: This function gets the lock status of Corporate category and
 			accordingly display the menu item
-		l) simlock_check_SIMCatLock: This function gets the lock status of SIM category and accordingly 
+		l) simlock_check_SIMCatLock: This function gets the lock status of SIM category and accordingly
 			display the menu item
 		m) simlock_check_CatBlock: This function gets  the ME status and accordingly display the menu item
-		n) mmi_simlock_master_unlock: This function unlocks category/unblocks ME and sends event 
+		n) mmi_simlock_master_unlock: This function unlocks category/unblocks ME and sends event
 			accordingly through SIMP menu
-		o) simp_unlock_Category: This function sends corresponding event to unlock a locked category 
+		o) simp_unlock_Category: This function sends corresponding event to unlock a locked category
 			through dynamic menu
 
        July 11, 2006    DR: OMAPS00084081   x0039928
@@ -235,14 +235,14 @@
 	July 05, 2006    DR: OMAPS00084642   x0pleela
        Descripton: SIMP: we can unlock category with invalid password (more than 16 digit)
        Solution: Changed the size of simlock password enty from MAX_DIG to MAX_PIN+1
-       
+
     xreddymn 4, Jul, 2006 OMAPS00083495
     Resolved issues reported in PIN and PUK input through BPM.
 
        June 07, 2006    DR: OMAPS00080701   x0021334
        Descripton: Phone hangs while unblocking SIMP during bootup.
        Solution: The assignment of  'SIMP_BOOTUP' to 'sim_unlock_in_prog' to indicate that
-       the operation is happeneing during boot-up sequence was not taking place since the 
+       the operation is happeneing during boot-up sequence was not taking place since the
        respective function was not being called when SIMP was blocked and re-boot was done.
        This has now been corrected.
 
@@ -251,9 +251,9 @@
 
 	xrashmic 1 Jul, 2006 OMAPS00075784
        Fixed the blue screen issue in pin, pin2 and simp scenarios
-	
+
 	May 15, 2006 DR:OMAPS00067919 x0pleela
-	Description: SIMP:On repeat Depersonalisation with invalid password MEPD unblock key should 
+	Description: SIMP:On repeat Depersonalisation with invalid password MEPD unblock key should
 				be asked not Puk1.
 	Solution: Made the following changes
 			Function: pin_main()
@@ -263,9 +263,9 @@
 					1. Modified the code to check SIMP during bootup sequence
 
  	Apr 19, 2006 DR:OMAPS00067912 x0pleela
-	Description: SIMP:On repeat Depersonalisation with invalid password MEPD unblock key should 
+	Description: SIMP:On repeat Depersonalisation with invalid password MEPD unblock key should
 				be asked not Puk1.
-	Solution: Made changes in the functions sim_event_cb_main(), pin_main(), pin_messages(), 
+	Solution: Made changes in the functions sim_event_cb_main(), pin_main(), pin_messages(),
 				pin_info_cb(), setting_pin_main(), pins_editor_cb()to handle SIMP unblocking code
 
 	Nov 24, 2005 DR: OMAPS00045909 - Shashi Shekar B.S.
@@ -273,7 +273,7 @@
 	Solution : When MMI calls sAT_PLUSCFUN, if an IMEI invalid error is returned,
 		we will block on that screen & will not allow the user to browse menus further,
 		since the PS will not be booted at all!!!
- 
+
 	Nov 17, 2005 DR: OMAPS00050447 - nekkareb
 	Description: Even after removing the SIM , Hutch or Airtel network is seen
 	Solution : Sim removal event is now being handled and appropriate display shown.
@@ -283,27 +283,27 @@
 
 
 	Nov 03, 2005 DR: OMAPS00050595 - xpradipg
-	Description: SIMP: If the SIM is blocked (by entering invalid PIN1), the user is 
+	Description: SIMP: If the SIM is blocked (by entering invalid PIN1), the user is
 			    not able to unblock it even after entering the valid PUK1
 	Solution : The global flag for SIM Personlaization PUK request was set even
 			for the SIM PUK request. This setting is removed. Also the condition
 			check has been done first for the global flag and then the rest of the
 			checks.
- 
+
 	Nov 03, 2005 DR: OMAPS00052032 - xpradipg
-	Description : Locosto: SIMP - integration of issues submitted by solDel on 
+	Description : Locosto: SIMP - integration of issues submitted by solDel on
 			     ME Personalization - changes as per the new interfaces
-	Solution	:   The return value of sAT_PlusCLCK of AT_EXCT is handled and 
-			    a please wait screen is displayed until the response is recieved 
-			    
+	Solution	:   The return value of sAT_PlusCLCK of AT_EXCT is handled and
+			    a please wait screen is displayed until the response is recieved
+
 	Sept 24, 2005 REF:  LOCOSTO-ENH-34438, xpradipg
   	Description: Integration changes required with new aci labe
-  	Solution: changes to adopt to the new ACI label   
+  	Solution: changes to adopt to the new ACI label
 
 	July 19, 2005 REF: CRR LOCOSTO-ENH-28173 xpradipg
-  	Description: To provide MMI Support to enable/disable/change password and 
+  	Description: To provide MMI Support to enable/disable/change password and
   				query all the Personalization locks
-  	Solution: Integration of the changes for the same provided by the soldel 
+  	Solution: Integration of the changes for the same provided by the soldel
   			  team
 
  	June 16, 2005  REF: CRR 31267  x0021334
@@ -312,25 +312,25 @@
 	       message is displayed to the user.
 
 //  May 31, 2004        REF: CRR 17291  xvilliva
-//	Bug:	After power cycle the setting of the used line which have been made 
+//	Bug:	After power cycle the setting of the used line which have been made
 //			from the BMI is lost.
-//	Fix:	The Pin2 which is entered in the editor and sent for verification is 
+//	Fix:	The Pin2 which is entered in the editor and sent for verification is
 //			stored in a global variable for re-use in sAT_PlusCLCK().
 
 //  May 13, 2004        REF: CRR 13632  xvilliva
 //			The PUK1 screen is not brought up even if user enters wrong Pin1 thrice
 //			from Idle screen -"**04*OLD_CHV1*NEW_CHV1*NEW_CHV1#".
 //			If the Pin1 fails for 2 times - "Not accepted" screen is displayed.
-//			but if the Pin1 fails 3rd consecutive time - "Pin Blocked" screen is displayed 
+//			but if the Pin1 fails 3rd consecutive time - "Pin Blocked" screen is displayed
 //			and the user is taken to PUK1 screen.
-//  May 13, 2004        REF: CRR 13623  xvilliva  
+//  May 13, 2004        REF: CRR 13623  xvilliva
 //			The PUK1 screen can be exited by pressing HangUP or Back key.
 //			The PUK1 screen if contains less than 1 character then back key is disabled.
 //			Hangup key is disabled permenantly to avoid exiting the screen.
 
 
-	25/10/00			Original Condat(UK) BMI version.	
-	   
+	25/10/00			Original Condat(UK) BMI version.
+
  $End
 
   // Issue Number : SPR#15692 on 25/03/04 by Rashmi.C.N.
@@ -340,9 +340,9 @@
 
 
 /*******************************************************************************
-									      
+
 				Include Files
-									      
+
 *******************************************************************************/
 #define ENTITY_MFW
 
@@ -395,9 +395,9 @@
 
 //x0pleela 15 May, 2007 DR: OMAPS00127483
 #ifdef FF_PHONE_LOCK
-#ifdef FF_MIDI_RINGER  
+#ifdef FF_MIDI_RINGER
 #include "mfw_midi.h"
-#endif //FF_MIDI_RINGER 
+#endif //FF_MIDI_RINGER
 #endif /* FF_PHONE_LOCK */
 
 #include "dspl.h"
@@ -463,7 +463,7 @@
 #ifdef SIM_PERS
 //x0pleela 25 Apr, 2006  DR: OMAPS00067919
 //Global variable to store the code result of qAT_PlusCPIN() result
-extern T_ACI_CPIN_RSLT simp_cpin_code; 
+extern T_ACI_CPIN_RSLT simp_cpin_code;
 extern UBYTE simp_cpin_flag;
 #endif
 
@@ -552,7 +552,7 @@
 extern T_MFW_SS_RETURN mfw_simlock_disable_lock(U8 *pin, S16 lcktyp);
 
 #define NUM_OF_PLOCK	 6
-// the coordinate of the TxtId 
+// the coordinate of the TxtId
 //moved info text defines to MmiResources.h
 #define PIN_ENTRY_MAX	3
 #define STAR		0x2a
@@ -586,7 +586,7 @@
   UBYTE 	   new_pin[MAX_PIN+1];	/* store new pin	    */
   UBYTE 	   old_pin[MAX_PIN+1];	/* store old pin	    */
   PIN_CASE	   pin_case;		/* editor state 	    */
-  char				edtbuf[MAX_DIG];  
+  char				edtbuf[MAX_DIG];
 } T_pin;
 typedef struct
 {
@@ -658,7 +658,7 @@
 EXTERN T_MFW_SIMP_CLCK_FLAG sim_unlock_in_prog; // June 07, 2006    DR: OMAPS00080701   x0021334
 #endif
 //June 16, 2005  REF: CRR 31267  x0021334
-BOOL pin1Flag = FALSE; 
+BOOL pin1Flag = FALSE;
 
 // June 16, 2005  REF: CRR 31267  x0021334
 extern BOOL pin2Flag; // This variable will be needed here
@@ -673,20 +673,20 @@
 
 //x0pleela 06 Mar, 2007 ER: OMAPS00122561
 #ifdef FF_PHONE_LOCK
-EXTERN T_call call_data; 
+EXTERN T_call call_data;
 static int autoPhLock_menu;
 T_MFW_HND	phlock_win_handle;			/* to hold the win handle of phone unlock editor window 	*/
 T_MFW_HND	phlock_kbd_handle;			/* to hold the kbd handle of phone unlock editor window 	*/
 T_MFW_HND	phlock_alarm_win_handle; 	/* to hold the win handle of alarm window 				*/
 T_MFW_HND	phlock_mtc_win_handle;		/* to hold the win handle of MT call window 			*/
 T_MFW_HND   phlock_dialog_mtc_win_handle;/* to hold the win handle of MT call dialog window 		*/
-int 			phlock_alarm;				/* flag to check whether alarm event has occured or not 	*/ 
+int 			phlock_alarm;				/* flag to check whether alarm event has occured or not 	*/
 //x0pleela 09 Mar, 2007  DR: OMAPS00129014
 EXTERN UBYTE phlock_auto;				/* flag to check whether auo phone lock is enabled or not */
 
 //x0pleela 15 May, 2007 DR: OMAPS00127483
 #ifdef FF_MMI_AUDIO_PROFILE
-extern UBYTE mfwAudPlay;//flag for audio 
+extern UBYTE mfwAudPlay;//flag for audio
 #endif
 
 void mmi_phlock_change_pin(T_MFW_HND win,int type,char* oldpsw,char* newpsw);
@@ -728,15 +728,15 @@
 
 /*******************************************************************************
 
- $Function:	pin_init 
+ $Function:	pin_init
 
  $Description:	This is the start-up time initialisation routine.
 		call from init routine in the idle
- 
+
  $Returns:		None
 
  $Arguments:	parent window
- 
+
 *******************************************************************************/
 void pin_init (T_MFW_HND parent_window)
 {
@@ -747,13 +747,13 @@
 
 /*******************************************************************************
 
- $Function:	pin_exit 
+ $Function:	pin_exit
 
  $Description:	power down in security screen
  $Returns:		None
 
  $Arguments:	None
- 
+
 *******************************************************************************/
 void pin_exit (void)
 {
@@ -768,8 +768,8 @@
 	editor_destroy(pin_editor_window);
 #endif
 	pin_editor_window = NULL;
- } 
- 
+ }
+
  if (pin_edit_windows)
 	 pin_edt_destroy(pin_edit_windows);
 
@@ -792,7 +792,7 @@
  $Returns:		Window
 
  $Arguments:	Parent window
- 
+
 *******************************************************************************/
 T_MFW_HND pin_create (T_MFW_HND parent_window)
 {
@@ -848,7 +848,7 @@
  $Returns:		None
 
  $Arguments:	window
- 
+
 *******************************************************************************/
 void pin_destroy  (T_MFW_HND own_window)
 {
@@ -888,7 +888,7 @@
  $Description:	Callback function for windows
  $Returns:		Status int
  $Arguments:	window handler event, window
- 
+
 *******************************************************************************/
 static int pin_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
 {
@@ -913,7 +913,7 @@
  $Description:	PURPOSE : SIM event handler for Pins
  $Returns:		Status int
  $Arguments:	window handler event, sim status
- 
+
 *******************************************************************************/
 int sim_event_cb_main (T_MFW_EVENT event, T_MFW_HND para)
 {
@@ -944,7 +944,7 @@
 // June 16, 2005  REF: CRR 31267  x0021334
 // If PIN1 and PUK1 are uninitialised, post SIM_LOCKED event
     if ((sim_pin_count(MFW_SIM_PIN1) EQ 0) AND (sim_pin_count(MFW_SIM_PUK1) EQ 0))
-    {	
+    {
     	SEND_EVENT(pin_data->pin_win, SIM_LOCKED, 0, pin_data);
     }
     else // June 16, 2005  REF: CRR 31267  x0021334
@@ -954,7 +954,7 @@
 		case E_SIM_INSERTED:	/*  there not handled */
 
 		BootUpState = BOOTUP_STATE_COMPLETED;//xashmic 21 Sep 2006, OMAPS00095831
-		
+
 		/* 14-Mar-2006, Monika.B.J., x0045876, START (Bug OMAPS00071413) */
 #ifdef FF_MMI_SAT_ICON
 				    addSatMessage(NULL, 0, 0, NULL, FALSE, SAT_ICON_IDLEMODE_TEXT);
@@ -966,9 +966,9 @@
 // Fix: Registers to network on sim reset
 		 nm_registration (NM_AUTOMATIC, 0, FALSE);
        		/*OMAPS00115179 - support SIM insertion without powering down - a0393213(R.Prabakar)
-       		   If pin_editor_window for the removed SIM("Insert SIM" window or "PIN" entry window) is present 
-       		   destroy it when a new SIM is inserted. 
-       		   If "PIN" entry window is necessary even for the newly inserted SIM, it 
+       		   If pin_editor_window for the removed SIM("Insert SIM" window or "PIN" entry window) is present
+       		   destroy it when a new SIM is inserted.
+       		   If "PIN" entry window is necessary even for the newly inserted SIM, it
        		   would be created once again at a different point. */
            		if(pin_editor_window)
       			{
@@ -976,30 +976,30 @@
             			pin_editor_window=NULL;
       			}
          		smsidle_unset_ready_state ();
-			
+
 		/* 14-Mar-2006, Monika.B.J., x0045876, END */
 					return 0;		/* (handled in sim_rem dialog, commented out currently */
 
 
 		//GW-SPR#1035-Added STK Changes
-		case E_SIM_RESET:	
+		case E_SIM_RESET:
 	    	TRACE_FUNCTION("E_SIM_RESET");
 		/*NM, 110702
-			the MM-entity initated the de-registration already (MMI dont have to do it); 
+			the MM-entity initated the de-registration already (MMI dont have to do it);
 			after this event we should avoid any cases to access the SIM
 			(e.g. reading phonebook, reading sms....)
-			
+
 			- how to do it ???
 			->  unset the "sms_initialised" flag to FALSE
 
 			- when does it set back to TRUE ???
 			-> the flag will be set after the event "E_SMS_READY"
-		*/	
+		*/
 			smsidle_unset_ready_state ();
-			info_screen(0, TxtSimNot, TxtReady, NULL); 
+			info_screen(0, TxtSimNot, TxtReady, NULL);
 		/*NM, 110702 END*/
-	    return 0;		
-	    
+	    return 0;
+
 
 		case E_SIM_STATUS:
 	  	/*
@@ -1013,7 +1013,7 @@
  TRACE_FUNCTION_P1("sim_status: %d", status->sim_status);
 
 /********************************/
-#ifdef SIM_PERS		
+#ifdef SIM_PERS
 
 			  //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 			  //Added the following code (MFW_MEPD_INVALID)inside the SIM_PERS flag
@@ -1026,16 +1026,16 @@
 				if(status->sim_status == MFW_SIM_NO_SIM_CARD)
 					mfw_flash_write("No SIM");
 			  }
-					
+
 
 				//x0pleela 29 Aug, 2006 DR: OMAPS00091250
-				//Added this check so that MMI doesn't hang at boot up as 
+				//Added this check so that MMI doesn't hang at boot up as
 				//MEPD data is not present
-				if( ( status->sim_procedure == MFW_SIM_ACTIVATION )AND 
+				if( ( status->sim_procedure == MFW_SIM_ACTIVATION )AND
 					( ( status->sim_status !=  MFW_MEPD_INVALID) OR
 					(status->sim_status != MFW_SIM_NO_SIM_CARD) ) )
 				{
-				
+
 						status1 =mfw_simlock_check_status(0,&max1, &curr1);
 						if(status1== MFW_SIM_PERM_BLOCKED)
 						{
@@ -1043,7 +1043,7 @@
 						 	status->sim_status=MFW_SIM_PUK_REQ;
 						}
 				}
-				
+
 #endif
 			BootUpState = BOOTUP_STATE_INPROGRESS;//xashmic 21 Sep 2006, OMAPS00095831
 
@@ -1060,7 +1060,7 @@
 			  {
 				  //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 				  //Added the following code (MFW_MEPD_INVALID)inside the SIM_PERS flag
-#ifdef SIM_PERS			  
+#ifdef SIM_PERS
 			  //x0pleela 29 aug, 2006  DR: OMAPS00091250
 			  	//Send event No MEPD data
 			  	case MFW_MEPD_INVALID:
@@ -1068,7 +1068,7 @@
 					TRACE_FUNCTION("sim_event_cb_main:no MEPD data");
 					SEND_EVENT(pin_data->pin_win,NO_MEPD, 0, pin_data);
 					break;
-#endif					
+#endif
 			/*
 			 * PIN 1 must be entered
 			 */
@@ -1099,7 +1099,7 @@
 #endif
 							TRACE_FUNCTION("sim_event_cb_main:PUK1 req");
 #ifdef SIM_PERS
-						//x0pleela 19 Apr, 2006 DR:OMAPS00067912   
+						//x0pleela 19 Apr, 2006 DR:OMAPS00067912
 						//changed the name from stastus to smlk_status
 						smlk_status =mfw_simlock_check_status(0,&max, &curr);
 						if( (smlk_status== MFW_SIM_BLOCKED) OR (smlk_status == MFW_SIM_NOT_BLOCKED) )
@@ -1113,7 +1113,7 @@
 							if( C_KEY_REQ )
 							{
 								//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-								//check for Master Unlock option enabled. 
+								//check for Master Unlock option enabled.
 								//If so, then display the menu with options Unblock ME and Master Unlock
 								if( simlock_get_masterkey_status())
 						  		{
@@ -1126,7 +1126,7 @@
 
 #ifdef SIM_PERS
 						}
-						//x0pleela 19 Apr, 2006 DR:OMAPS00067912   
+						//x0pleela 19 Apr, 2006 DR:OMAPS00067912
 						//changed the name from stastus to smlk_status
 						else if (smlk_status == MFW_SIM_PERM_BLOCKED)
 						{
@@ -1141,7 +1141,7 @@
 			 * no PIN is needed
 			 */
 					case MFW_SIM_NO_PIN:
-						
+
 						BootUpState = BOOTUP_STATE_COMPLETED;//xashmic 21 Sep 2006, OMAPS00095831
 
 						limited = FALSE;
@@ -1162,7 +1162,7 @@
 			 * No SIM card is inserted
 			 */
 					case MFW_SIM_NO_SIM_CARD:
-						
+
 						TRACE_FUNCTION("sim_event_cb_main: no SIM Card");
 						SEND_EVENT(pin_data->pin_win,NO_SIM_CARD, 0, pin_data);
 						break;
@@ -1174,12 +1174,12 @@
 						SEND_EVENT(pin_data->pin_win,INVALID_IMEI, 0, pin_data);
 						break;
 
-#ifdef SIM_PERS 
+#ifdef SIM_PERS
 
 					case MFW_SIM_PLOCK_REQ:
 						TRACE_FUNCTION("sim_event_cb_main: MFW_SIM_PLOCK_REQ");
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-						//check for Master Unlock option enabled. 
+						//check for Master Unlock option enabled.
 						//If so, then display the menu with options SIM unlock and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
@@ -1189,12 +1189,12 @@
 						  else
 						    SEND_EVENT(pin_data->pin_win,INPUT_SIM_PIN_REQ, 0, pin_data);
 						break;
-						
+
 					case MFW_SIM_NLOCK_REQ:
 						TRACE_FUNCTION("sim_event_cb_main: MFW_SIM_NLOCK_REQ");
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-						//check for Master Unlock option enabled. 
-						//If so, then display the menu with options Network unlock and Master Unlock					  
+						//check for Master Unlock option enabled.
+						//If so, then display the menu with options Network unlock and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
 						  	mmi_simlock_locktype = MFW_SIM_NLOCK;
@@ -1203,11 +1203,11 @@
 						  else
 						    SEND_EVENT(pin_data->pin_win,INPUT_NLOCK_PIN_REQ, 0, pin_data);
 						break;
-						
+
 					case MFW_SIM_NSLOCK_REQ:
 						TRACE_FUNCTION("sim_event_cb_main: MFW_SIM_NSLOCK_REQ");
   						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-						//check for Master Unlock option enabled. 
+						//check for Master Unlock option enabled.
 						//If so, then display the menu with options Network subset unlock and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
@@ -1217,12 +1217,12 @@
 						  else
 						    SEND_EVENT(pin_data->pin_win,INPUT_NSLOCK_PIN_REQ, 0, pin_data);
 						break;
-						
+
 					case MFW_SIM_SPLOCK_REQ:
 						TRACE_FUNCTION("sim_event_cb_main: MFW_SIM_SPLOCK_REQ");
   						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-						//check for Master Unlock option enabled. 
-						//If so, then display the menu with options Service Provider unlock and Master Unlock					  
+						//check for Master Unlock option enabled.
+						//If so, then display the menu with options Service Provider unlock and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
 						  	mmi_simlock_locktype = MFW_SIM_SPLOCK;
@@ -1231,12 +1231,12 @@
 						  else
 							SEND_EVENT(pin_data->pin_win,INPUT_SPLOCK_PIN_REQ, 0, pin_data);
 						break;
-						
+
 					case MFW_SIM_CLOCK_REQ:
 						TRACE_FUNCTION("sim_event_cb_main: MFW_SIM_CLOCK_REQ");
   						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-						//check for Master Unlock option enabled. 
-						//If so, then display the menu with options Corporate unlock and Master Unlock					  
+						//check for Master Unlock option enabled.
+						//If so, then display the menu with options Corporate unlock and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
 						  	mmi_simlock_locktype = MFW_SIM_CLOCK;
@@ -1250,8 +1250,8 @@
 					//Request unlocking password of "Blocked Network" category
 					case MFW_SIM_PBLOCK_REQ:
 						TRACE_FUNCTION("sim_event_cb_main: MFW_SIM_PBLOCK_REQ");
-						//check for Master Unlock option enabled. 
-						//If so, then display the menu with options Network unlock and Master Unlock					  
+						//check for Master Unlock option enabled.
+						//If so, then display the menu with options Network unlock and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
 						  	mmi_simlock_locktype = MFW_SIM_PBLOCK;
@@ -1364,7 +1364,7 @@
 				case MFW_SIM_FAILURE:
 					TRACE_FUNCTION("sim_event_cb_main:unblock fatal error");
 					SEND_EVENT(pin_data->pin_win,PUK1_UNBL_FATAL_ERROR,0,pin_data);
-					break;				
+					break;
 				case MFW_SIM_INVALID_CARD:
 					TRACE_FUNCTION("sim_event_cb_main:unblock failed, no more retries");
 					SEND_EVENT(pin_data->pin_win,INVALID_CARD,0,pin_data);
@@ -1378,21 +1378,21 @@
                             /* OMAPS00050447: a0393130, handle removal of sim card */
                             switch (status->sim_status)
                             {
-                                 case MFW_SIM_NO_SIM_CARD: 
+                                 case MFW_SIM_NO_SIM_CARD:
                                       TRACE_FUNCTION("sim_event_cb_main: SIM Card removed");
 						/*OMAPS00115179 - support SIM insertion without powering down - a0393213
 						    SMS state should be unset immediately after removing the SIM card. This ensures
-						    icons/display related to messages are NOT shown in the idle screen after the removal of SIM card*/						
-					       smsidle_unset_ready_state ();									  
+						    icons/display related to messages are NOT shown in the idle screen after the removal of SIM card*/
+					       smsidle_unset_ready_state ();
                                        SEND_EVENT(idle_get_window(),NETWORK_NO_SERVICE, 0, 0);
                                        break;
-					
+
                                  default:
                                        return 0;
                             }
 			 break;
 			      /* OMAPS00050447: a0393130, handle removal of sim card */
-			  
+
 			default:
 				return 0;
 		 }
@@ -1413,7 +1413,7 @@
 	#endif
   	}
     } // June 16, 2005  REF: CRR 31267  x0021334
-    
+
     /* x0045876, 14-Aug-2006 (WR - missing return statement at end of non-void function ) */
     return 0;
 }
@@ -1436,10 +1436,10 @@
   T_MFW_WIN   * win_data = ((T_MFW_HDR *) win)->data;
 
   T_pin * pin_data = (T_pin *)win_data->user;//pin main data
-  
-    //x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+
+    //x0pleela 25 Sep, 2006 ER: OMAPS00095524
     //check for CME class and handle all CME errors
-  if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Cme) 
+  if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Cme)
   {
   switch(aciErrDesc & 0x0000FFFF)
   {
@@ -1453,7 +1453,7 @@
       else
         SEND_EVENT(pin_data->pin_win,INPUT_NLOCK_PIN_REQ,0,pin_data);
   break;
-  
+
     case CME_ERR_NetworkSubsetPersPinReq:
       TRACE_EVENT("CME_ERR_NetworkSubsetPersPinReq");
       if( simlock_get_masterkey_status())
@@ -1464,7 +1464,7 @@
       else
         SEND_EVENT(pin_data->pin_win,INPUT_NSLOCK_PIN_REQ,0,pin_data);
     break;
-    
+
     case CME_ERR_ProviderPersPinReq:
       TRACE_EVENT("CME_ERR_ProviderPersPinReq");
       if( simlock_get_masterkey_status())
@@ -1475,7 +1475,7 @@
       else
         SEND_EVENT(pin_data->pin_win,INPUT_SPLOCK_PIN_REQ,0,pin_data);
     break;
-    
+
     case CME_ERR_CorporatePersPinReq:
       TRACE_EVENT("CME_ERR_CorporatePersPinReq");
       if( simlock_get_masterkey_status())
@@ -1486,7 +1486,7 @@
       else
         SEND_EVENT(pin_data->pin_win,INPUT_CLOCK_PIN_REQ,0,pin_data);
     break;
-    
+
     case CME_ERR_PhSimPinReq:
       TRACE_EVENT("CME_ERR_PhSimPinReq");
       if( simlock_get_masterkey_status())
@@ -1497,7 +1497,7 @@
       else
         SEND_EVENT(pin_data->pin_win,INPUT_SIM_PIN_REQ,0,pin_data);
     break;
-    
+
     case CME_ERR_PhoneFail:
     case CME_ERR_NetworkPersPukReq:
     case CME_ERR_NetworkSubsetPersPukReq:
@@ -1507,7 +1507,7 @@
       int status,curr_fail_reset, curr_succ_reset;
       TRACE_EVENT("PUK Req");
       status = mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
-      
+
 		if( status == MFW_SIM_BLOCKED)
       {
         C_KEY_REQ = 1;
@@ -1522,28 +1522,28 @@
       {
         perm_blocked =1;
         SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
-      }	
+      }
     }
-    break;	
-    
+    break;
+
     case CME_ERR_WrongPasswd:
       TRACE_EVENT("CME_ERR_WrongPasswd");
       SEND_EVENT(pin_data->pin_win,identifier,0,pin_data);
     break;
-    
+
     default:
       TRACE_EVENT("Undefined error");
   }
 }
 
-    //x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+    //x0pleela 25 Sep, 2006 ER: OMAPS00095524
     //check for Ext class and handle all Extension errors
-	else if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext) 
+	else if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext)
 	{
 		switch(aciErrDesc & 0x0000FFFF)
 		{
 			//x0pleela 25 Sep, 2006 ER: OMAPS00095524
-			//Request for Blocked Network Password 
+			//Request for Blocked Network Password
 			case EXT_ERR_BlockedNetworkPersPinReq:
 				TRACE_EVENT("CME_ERR_NetworkPersPinReq");
 				if( simlock_get_masterkey_status())
@@ -1556,7 +1556,7 @@
 			break;
 
 			//x0pleela 25 Sep, 2006 ER: OMAPS00095524
-			//Request for Blocked Network Unblock code 
+			//Request for Blocked Network Unblock code
 			case EXT_ERR_BlockedNetworkPersPukReq:
 			{
 				int status,curr_fail_reset, curr_succ_reset;
@@ -1578,15 +1578,15 @@
 				{
 					perm_blocked =1;
 					SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
-				}	
+				}
 			}
-			break;	
+			break;
 
 			default:
 				break;
 		}
 	}
-  
+
 }
 
 #endif
@@ -1598,7 +1598,7 @@
  $Description:	PIN MAIN Dialog Handling function
  $Returns:		void
  $Arguments:	window, window handler event, value, parameters
- 
+
 *******************************************************************************/
 static void pin_main(T_MFW_HND win, USHORT event, SHORT value, void * parameter)
 {
@@ -1609,9 +1609,9 @@
 
 	// June 16, 2005  REF: CRR 31267  x0021334
 	// Added the following two variables
-	static int pin1_info_count = 0; 
-	T_DISPLAY_DATA display_info; 
-	
+	static int pin1_info_count = 0;
+	T_DISPLAY_DATA display_info;
+
 #ifdef NEW_EDITOR
 	T_AUI_EDITOR_DATA editor_data;	/* SPR#1428 - SH - New Editor data */
 #else
@@ -1624,7 +1624,7 @@
 	 {
 #ifdef SIM_PERS
 		//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-		//This event displays a dialog "Busy" for the user if timer is enabled and 
+		//This event displays a dialog "Busy" for the user if timer is enabled and
 		//ACI returns Busy error when user had entered wrong unlocking password
 		case SIM_LOCK_BUSY_BOOTUP:
 			mfw_simlock_set_busy_state(FALSE);
@@ -1633,7 +1633,7 @@
 			info_dialog (pin_data->pin_win, &display_info);
 			break;
 #endif
-	 
+
 		// June 16, 2005  REF: CRR 31267  x0021334
 		// This case is added to handle PIN1 and PUK1 EQ 0 condition
 	 	 case SIM_LOCKED:
@@ -1664,27 +1664,27 @@
 		  case PIN1_STATUS:		    //Text "Pin disabled" or "enabled"
 		  case PIN1_REQ_ATT:		    //info screen "xx attempts "
 		  case PUK1_REQ_ACT_INFO:	    //info screen "SIM blocked "
-		  
+
 		  case GSM_FAIL:		    // gsm not allowed
 		  case NEW_PIN_FAIL:		    // new pin failed
 		  case PUK1_REQ_VER_INFO:	    // Text "Pin blocked "
 		  case PUK1_UNBL_FAIL_INFO:	    // unblock error - new puk requ
 		  case PUK1_UNBL_FATAL_ERROR:
-		  
-		 
+
+
 		  case SIM_UNLOCK_OK:		    //Text "Unlock ok "
 		  case SIM_LOCK_ERR:
 #ifdef SIM_PERS
         case SIM_LOCK_PERS_CHK_OK:
 		    case SMLK_SHOW_FC_FAIL:
-		    case SMLK_SHOW_FC_SUCC:			
+		    case SMLK_SHOW_FC_SUCC:
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 		    case SMLK_SHOW_MK_FAIL:		//wrong master unlock key
 		    case SMLK_SHOW_MK_SUCC:		//correct master unlock key
 		    case SIM_LOCK_BUSY_UNBLOCK: //wrong unblock code
 #endif
 				   main_call_mess(win,event);
-				   break; 
+				   break;
 
 			case PUK1_REQ:			  //Text "Enter Puk "
 #ifdef SIM_PERS
@@ -1710,25 +1710,25 @@
 					pins_loadEditDefault (&editor_data, TxtPhoneBlocked, PERM_BLK);
 					break;
 
-				case PUK1_REQ:	
+				case PUK1_REQ:
 				if( C_KEY_REQ )
 					pins_loadEditDefault (&editor_data, TxtUnblockCode, PUK1_REQ);
-				else					
+				else
 					pins_loadEditDefault (&editor_data, TxtEnterPuk1, PUK1_REQ);
 					break;
-				
+
 				case INPUT_NLOCK_PIN_REQ:
 					pins_loadEditDefault (&editor_data, TxtEnterNLock, INPUT_NLOCK_PIN_REQ);
 					break;
-					
+
 				case INPUT_NSLOCK_PIN_REQ:
 					pins_loadEditDefault (&editor_data, TxtEnterNsLock, INPUT_NSLOCK_PIN_REQ);
 					break;
-					
+
 				case INPUT_SPLOCK_PIN_REQ:
 					pins_loadEditDefault (&editor_data, TxtEnterSpLock, INPUT_SPLOCK_PIN_REQ);
 					break;
-					
+
 				case INPUT_CLOCK_PIN_REQ:
 					pins_loadEditDefault (&editor_data, TxtEnterCLock, INPUT_CLOCK_PIN_REQ);
 					break;
@@ -1740,13 +1740,13 @@
 				//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 				case INPUT_MASTER_KEY_REQ:
 					pins_loadEditDefault (&editor_data, TxtMasterUnlock, INPUT_MASTER_KEY_REQ);
-					break;					
-					
-				//x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+					break;
+
+				//x0pleela 25 Sep, 2006 ER: OMAPS00095524
 				case INPUT_PBLOCK_PIN_REQ:
 					pins_loadEditDefault (&editor_data, TxtEnterPbLock, INPUT_PBLOCK_PIN_REQ);
-					break;					
-					
+					break;
+
 				}
 				TRACE_FUNCTION_P1("sim_status: %d", gsim_status);
 #else
@@ -1761,10 +1761,10 @@
 
 				editor_data.editor_attr.text	= pin_data->edtbuf;  /* buffer to be edited */
 				editor_data.editor_attr.size	= MAX_PIN + 1;	 /* limit to 8 digits */
-				editor_data.LeftSoftKey 		= TxtSoftOK;	    
+				editor_data.LeftSoftKey 		= TxtSoftOK;
 				editor_data.RightSoftKey	= TxtDelete;
 				editor_data.TextId			= TxtEnterPuk1;
-				editor_data.Identifier		= PUK1_REQ;  
+				editor_data.Identifier		= PUK1_REQ;
 				editor_data.min_enter		= 4;
 				editor_data.hide			= TRUE;
 #ifdef SIM_PERS
@@ -1772,7 +1772,7 @@
 				{
 				case PERM_BLK:
 					editor_data.TextId	= TxtPhoneBlocked;
-					editor_data.Identifier			= PERM_BLK;  
+					editor_data.Identifier			= PERM_BLK;
 					break;
 
 				case PUK1_REQ:
@@ -1780,51 +1780,51 @@
 					editor_data.TextId	= TxtUnblockCode;
 				else
 					editor_data.TextId	= TxtEnterPuk1;
-					editor_data.Identifier = PUK1_REQ;  
+					editor_data.Identifier = PUK1_REQ;
 					break;
 
 				case INPUT_NLOCK_PIN_REQ:
 					editor_data.TextId	=TxtEnterNLock;
-					editor_data.Identifier			= INPUT_NLOCK_PIN_REQ;  
+					editor_data.Identifier			= INPUT_NLOCK_PIN_REQ;
 					break;
-					
+
 				case INPUT_NSLOCK_PIN_REQ:
 					editor_data.TextId	=TxtEnterNsLock;
-					editor_data.Identifier			= INPUT_NSLOCK_PIN_REQ;  
+					editor_data.Identifier			= INPUT_NSLOCK_PIN_REQ;
 					break;
-					
+
 				case INPUT_SPLOCK_PIN_REQ:
 					editor_data.TextId	=TxtEnterSpLock;
-					editor_data.Identifier			= INPUT_SPLOCK_PIN_REQ;  
+					editor_data.Identifier			= INPUT_SPLOCK_PIN_REQ;
 					break;
-					
+
 				case INPUT_CLOCK_PIN_REQ:
 					editor_data.TextId	=TxtEnterCLock;
-					editor_data.Identifier			= INPUT_CLOCK_PIN_REQ;  
+					editor_data.Identifier			= INPUT_CLOCK_PIN_REQ;
 					break;
 
 				case INPUT_SIM_PIN_REQ:
 					editor_data.TextId	=TxtEnterPsLock;
-					editor_data.Identifier			= INPUT_SIM_PIN_REQ;  
+					editor_data.Identifier			= INPUT_SIM_PIN_REQ;
 					break;
 
 				//x0pleela 20 july, 2006 ER: OMAPS00087586, OMAPS00087587
 				case INPUT_MASTER_KEY_REQ:
 					editor_data.TextId	=TxtMasterUnlock;
-					editor_data.Identifier			= INPUT_MASTER_KEY_REQ;  
+					editor_data.Identifier			= INPUT_MASTER_KEY_REQ;
 					break;
 
 				//x0pleela 25 Sep, 2006 ER: OMAPS00095524
 				case INPUT_PBLOCK_PIN_REQ:
 					editor_data.TextId	=TxtEnterPbLock;
-					editor_data.Identifier			= INPUT_PBLOCK_PIN_REQ;  
-					break;					
+					editor_data.Identifier			= INPUT_PBLOCK_PIN_REQ;
+					break;
 				}
-#endif		
+#endif
 				/* create the dialog handler */
 				pin_editor_window = editor_start(win, &editor_data);  /* start the editor */
 #endif	/*NEW_EDITOR */
-			break;	
+			break;
 
 			case INPUT_NEW_PIN:
 				//clear the editor-buffer
@@ -1840,17 +1840,17 @@
 
 				editor_data.editor_attr.text	= pin_data->edtbuf;  /* buffer to be edited */
 				editor_data.editor_attr.size	= MAX_PIN + 1;	 /* limit to 8 digits */
-				editor_data.LeftSoftKey 		= TxtSoftOK;	    
+				editor_data.LeftSoftKey 		= TxtSoftOK;
 				editor_data.RightSoftKey		= TxtDelete;
 				editor_data.TextId				= TxtEnterNewPin;
-				editor_data.Identifier			= INPUT_NEW_PIN;  
+				editor_data.Identifier			= INPUT_NEW_PIN;
 				editor_data.min_enter		    = 4;
 				editor_data.hide			    = TRUE;
 
 				/* create the dialog handler */
-				pin_editor_window = editor_start(win, &editor_data);  /* start the editor */ 
+				pin_editor_window = editor_start(win, &editor_data);  /* start the editor */
 #endif /*NEW_EDITOR */
-			break;			
+			break;
 
 			case INPUT_NEW_PIN_AGAIN:
 				//clear the editor-buffer
@@ -1863,21 +1863,21 @@
 				pin_editor_window = AUI_pin_Start(win, &editor_data);
 #else /*NEW_EDITOR */
 				pins_loadEditDefault (&editor_data);
-				
+
 				editor_data.editor_attr.text	= pin_data->edtbuf;  /* buffer to be edited */
 				editor_data.editor_attr.size	= MAX_PIN + 1;	 /* limit to 8 digits */
-				editor_data.LeftSoftKey 		= TxtSoftOK;	    
+				editor_data.LeftSoftKey 		= TxtSoftOK;
 				editor_data.RightSoftKey		= TxtDelete;
 				editor_data.TextId				= TxtConfPin;
-				editor_data.Identifier			= INPUT_NEW_PIN_AGAIN;	
+				editor_data.Identifier			= INPUT_NEW_PIN_AGAIN;
 				editor_data.min_enter		    = 4;
 				editor_data.hide			    = TRUE;
 
 				/* create the dialog handler */
-				pin_editor_window = editor_start(win, &editor_data);  /* start the editor */ 
+				pin_editor_window = editor_start(win, &editor_data);  /* start the editor */
 #endif /* NEW_EDITOR */
 				break;
-				
+
 		  case PIN1_REQ:		    //Text "Enter Pin "
 				TRACE_FUNCTION("PIN1_REQ");
 				//clear the editor-buffer
@@ -1890,18 +1890,18 @@
 				pin_editor_window = AUI_pin_Start(win, &editor_data);
 #else /*NEW_EDITOR */
 				pins_loadEditDefault (&editor_data);
-				
+
 				editor_data.editor_attr.text	= pin_data->edtbuf;  /* buffer to be edited */
 				editor_data.editor_attr.size	= MAX_PIN + 1;	 /* limit to 8 digits */
-				editor_data.LeftSoftKey 		= TxtSoftOK;	    
+				editor_data.LeftSoftKey 		= TxtSoftOK;
 				editor_data.RightSoftKey		= TxtDelete;
 				editor_data.TextId				= TxtEnterPin1;
-				editor_data.Identifier			= PIN1_REQ;  
+				editor_data.Identifier			= PIN1_REQ;
 				editor_data.min_enter		    = 4;
 				editor_data.hide			    = TRUE;
 
-				/* create the dialog handler */ 
-				pin_editor_window = editor_start(win, &editor_data);  /* start the editor */ 
+				/* create the dialog handler */
+				pin_editor_window = editor_start(win, &editor_data);  /* start the editor */
 #endif /* NEW_EDITOR */
 			break;
 
@@ -1911,7 +1911,7 @@
 		  case INVALID_IMEI:		    //Text "Invalid IMEI "
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS		  
+#ifdef SIM_PERS
   		  case NO_MEPD: //x0pleela 30 Aug, 2006 DR: OMAPS00091250
 #endif
 
@@ -1929,7 +1929,7 @@
 				/* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
 				pins_loadEditDefault (&editor_data, TxtNull, 0);
-				
+
 				if(event == NO_SIM_CARD)
 				{
 					AUI_edit_SetTextStr(&editor_data, TxtNull, TxtDelete, TxtNoCard, NULL);
@@ -1943,7 +1943,7 @@
 				}
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS					
+#ifdef SIM_PERS
 				//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 				else if ( event == NO_MEPD )
 				{
@@ -1951,7 +1951,7 @@
 					AUI_edit_SetEvents(&editor_data, NO_MEPD_DATA, FALSE, FOREVER, (T_AUI_EDIT_CB)pins_editor_cb);
 
 				}
-#endif				
+#endif
 				else
 				{
 					AUI_edit_SetTextStr(&editor_data, TxtNull, TxtDelete, TxtInvalidCard, NULL);
@@ -1963,7 +1963,7 @@
 
 				/*SPR#2235 - DS - Overwrite default 'hidden' PIN entry mode */
 				AUI_edit_SetMode(&editor_data, 0 /*Numeric Mode */, ED_CURSOR_UNDERLINE);
-				
+
 				pin_editor_window = AUI_pin_Start(win, &editor_data);
 #else /*NEW_EDITOR */
 				pins_loadEditDefault (&editor_data);
@@ -1971,32 +1971,32 @@
 				if(event == NO_SIM_CARD)
 				{
 					editor_data.TextId = TxtNoCard;
-					editor_data.Identifier = INSERT_CARD;	
+					editor_data.Identifier = INSERT_CARD;
 				}
 				else if(event == INVALID_IMEI) // Nov 24, 2005, a0876501, DR: OMAPS00045909
 				{
 					editor_data.TextId = TxtInvalidIMEI;
-					editor_data.Identifier = SHOW_IMEI_INVALID;	
+					editor_data.Identifier = SHOW_IMEI_INVALID;
 				}
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS					
+#ifdef SIM_PERS
 				//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 				else if (event == NO_MEPD )
 				{
 					editor_data.TextId = TxtNoMEPD;
-					editor_data.Identifier = NO_MEPD_DATA;	
+					editor_data.Identifier = NO_MEPD_DATA;
 				}
-#endif				
+#endif
 				else
 				{
 					editor_data.TextId = TxtInvalidCard;
-					editor_data.Identifier = CARD_REJECTED;	
+					editor_data.Identifier = CARD_REJECTED;
 				}
 
 				editor_data.editor_attr.text	= pin_data->edtbuf;  /* buffer to be edited */
 				editor_data.editor_attr.size	= MAX_DIG;   /* Don't limit to 3 digits (as that prevents "*#06#") */
-				editor_data.LeftSoftKey 		= TxtNull;	    
+				editor_data.LeftSoftKey 		= TxtNull;
 				editor_data.RightSoftKey		= TxtDelete;
 				editor_data.min_enter		    = 3;
 				editor_data.destroyEditor	    = FALSE;
@@ -2006,7 +2006,7 @@
 #endif /* NEW_EDITOR */
 
 		  break;
-		 
+
 		  case TXT_SIM_PLOCK:
 				   pin_data->pin_case = SIM_PLOCK;
 				   main_call_edit(win,SIM_PLOCK);		      // Start: enter P unlock
@@ -2052,14 +2052,14 @@
 			    network_start_full_service ();
 //GW-SPR#1035-Added STK Changes
 				TRACE_FUNCTION("pin_destroy 2");
-	  }			
+	  }
 		       break;
 //nm insert new one
 	  case PIN1_STATUS_END:
 			   pin_destroy(pin_data->pin_win);// finish main pin dialog
 			   TRACE_FUNCTION("pin_destroy 3");
 		       break;
-//nm		       
+//nm
 	  case TXT_SIM_LOCK_ALL:
 	  		ShowMessage(idle_get_window(), pin_data->display_id1, pin_data->display_id2);
 			   pin_destroy(pin_data->pin_win);// finish main pin dialog
@@ -2075,8 +2075,8 @@
 			else
 			{
 
-				main_call_mess(win,event);		   
-	 
+				main_call_mess(win,event);
+
 			}
 			break;
 	}
@@ -2121,18 +2121,18 @@
 
 /*******************************************************************************
 
- $Function:	check_plock_to_clock 
+ $Function:	check_plock_to_clock
 
  $Description:	sim lock check from PLOCK to CLOCK
  $Returns:		void
  $Arguments:	window, window handler event
- 
+
 *******************************************************************************/
 static void check_plock_to_clock(T_MFW_HND win,USHORT event)
 {
 	/* x0045876, 14-Aug-2006 (WR - "win_data" was declared but never referenced) */
 	/* T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; */
-	
+
 //	T_pin * pin_data = (T_pin *)win_data->user; // pin main data  /* Warning Correction */
 
 	TRACE_FUNCTION("MmiPins:check_plock_to_clock");
@@ -2177,9 +2177,9 @@
 				network_start_full_service();
 //GW-SPR#1035-Added STK Changes
 /* NM, 110702
-   this destroy the only ONE SIM-handler which we have 
+   this destroy the only ONE SIM-handler which we have
    after switching on !!
-   It should be at least one SIM-handler activ all the  time 
+   It should be at least one SIM-handler activ all the  time
 */
 				TRACE_FUNCTION("pin_destroy 5");
 				break;
@@ -2202,7 +2202,7 @@
  $Description:	sim lock check from NLOCK to CLOCK
  $Returns:		void
  $Arguments:	window, window handler event
- 
+
 *******************************************************************************/
 static void check_nlock_to_clock(T_MFW_HND win,USHORT event)
 {
@@ -2248,7 +2248,7 @@
  $Description:	sim lock check from SPLOCK to CLOCK
  $Returns:		void
  $Arguments:	window, window handler event
- 
+
 *******************************************************************************/
 static void check_splock_to_clock(T_MFW_HND win,USHORT event)
 {
@@ -2290,7 +2290,7 @@
  $Description:	sim lock check from NSLOCK to CLOCK
  $Returns:		void
  $Arguments:	window, window handler event
- 
+
 *******************************************************************************/
 static void check_nslock_to_clock(T_MFW_HND win,USHORT event)
 {
@@ -2328,7 +2328,7 @@
  $Description:	sim lock check	CLOCK
  $Returns:		void
  $Arguments:	window, window handler event
- 
+
 *******************************************************************************/
 static void check_sim_clock(T_MFW_HND win,USHORT event)
 {
@@ -2357,11 +2357,11 @@
 
 /*******************************************************************************
 
- $Function:	main_call_mess 
+ $Function:	main_call_mess
  $Description:	help function for message dialog
  $Returns:		void
  $Arguments:	window, window handler event
- 
+
 *******************************************************************************/
 static void main_call_mess(T_MFW_HND win, USHORT event)
 {
@@ -2373,7 +2373,7 @@
 	TRACE_FUNCTION("MmiPins: main_call_mess");
 
 	pin_mess_win = pin_mess_create(pin_data->pin_win);
-	
+
 	if(pin_mess_win)
 	{
 		SEND_EVENT(pin_mess_win,event,0,pin_data);
@@ -2383,11 +2383,11 @@
 
 /*******************************************************************************
 
- $Function:	main_call_edit 
+ $Function:	main_call_edit
  $Description:	help function for editor dialog
  $Returns:		void
  $Arguments:	window, window handler event
- 
+
 *******************************************************************************/
 static void main_call_edit(T_MFW_HND win,USHORT event)
 {
@@ -2411,12 +2411,12 @@
 
 /*******************************************************************************
 
- $Function:	pin_edt_create 
+ $Function:	pin_edt_create
  $Description:	Creation of an instance  for the PIN Editor dialog.
 		Type of dialog : SINGLE_DYNAMIC
  $Returns:		void
  $Arguments:	parent window
- 
+
 *******************************************************************************/
 T_MFW_HND pin_edt_create (T_MFW_HND parent_window)
 {
@@ -2464,11 +2464,11 @@
 
 /*******************************************************************************
 
- $Function:	pin_edt_destroy 
+ $Function:	pin_edt_destroy
  $Description:	Destroy the pin editor dialog.
  $Returns:		void
  $Arguments:	window
- 
+
 *******************************************************************************/
 void pin_edt_destroy  (T_MFW_HND own_window)
 {
@@ -2501,7 +2501,7 @@
  $Description:	Callback function for editor windows
  $Returns:		Status int
  $Arguments:	window handle event, window
- 
+
 *******************************************************************************/
 static int pin_edt_win_cb (T_MFW_EVENT event,T_MFW_WIN * win)
 {
@@ -2510,7 +2510,7 @@
   T_pin			*pin_data	= (T_pin *)win_pin->user; // pin main data
 
   TRACE_EVENT_P1("pin_edt_win_cb: %d", event);
-  
+
   if (event EQ MfwWinVisible)
   {
   /* SPR#1428 - SH - New Editor changes */
@@ -2529,7 +2529,7 @@
 	}
 
 	edt_data->editor->update = ED_UPDATE_DEFAULT;
-	
+
 #else /* NEW_EDITOR */
     pin_icons();
     PROMPT(INFO_TEXT_X,INFO_TEXT_Y,0,pin_data->display_id1);
@@ -2543,11 +2543,11 @@
 
 /*******************************************************************************
 
- $Function:	pin_edt_kbd_cb 
+ $Function:	pin_edt_kbd_cb
  $Description:	Callback function for keyboard
  $Returns:		Status int
  $Arguments:	window handle event, keyborad control block
- 
+
 *******************************************************************************/
 static int pin_edt_kbd_cb (T_MFW_EVENT event,T_MFW_KBD *  kc)
 {
@@ -2584,13 +2584,13 @@
 					else
 						edt_data->pin[edt_data->editor_index] = '0' + kc->code;
 // Nov 24, 2005, a0876501, DR: OMAPS00045909
-		   			if((edt_data->pin_case_edit NEQ CARD_REJECTED) AND (edt_data->pin_case_edit NEQ INSERT_CARD) 
+		   			if((edt_data->pin_case_edit NEQ CARD_REJECTED) AND (edt_data->pin_case_edit NEQ INSERT_CARD)
 						AND (edt_data->pin_case_edit NEQ SHOW_IMEI_INVALID)
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS							
+#ifdef SIM_PERS
 						//x0pleela 30 Aug, 2006 DR: OMAPS00091250
-						AND (edt_data->pin_case_edit NEQ NO_MEPD_DATA) 
+						AND (edt_data->pin_case_edit NEQ NO_MEPD_DATA)
 #endif
 						)
 					{
@@ -2610,7 +2610,7 @@
 						edtChar(edt_data->editor_handle,edt_data->pin[edt_data->editor_index]); /* not hide emergency call */
 #endif /* NEW_EDITOR */
 					}
-						
+
 					edt_data->editor_index++;
 					check_pins(win, edt_data);		    /*	digits check depends on status pin_case */
 					if(edt_data->gsm_state)
@@ -2628,10 +2628,10 @@
 						case SHOW_IMEI_INVALID: // Nov 24, 2005, a0876501, DR: OMAPS00045909
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS							
+#ifdef SIM_PERS
 						//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 						case NO_MEPD_DATA:
-#endif							
+#endif
 							if(edt_data->emergency_call)
 							{
 								emerg_pin(edt_data);				/* start emergency call  */
@@ -2715,11 +2715,11 @@
 
 /*******************************************************************************
 
- $Function:	check_pins  
+ $Function:	check_pins
  $Description:	check pins input string
  $Returns:		none
  $Arguments:	window, pin editor attributes
- 
+
 *******************************************************************************/
 static void check_pins (T_MFW_HND win, void * edt_pin)
 {
@@ -2729,7 +2729,7 @@
 
 	if(strlen((char*)edt_data->pin)NEQ 0)
     {
-		softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);	
+		softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);
 	    if (strlen((char*)edt_data->pin) > FIRST_DIGIT)	       /* for every character  */
 	    {
 			if(strlen((char*)edt_data->pin) >= 3)
@@ -2743,7 +2743,7 @@
 
 			gsm_test(win,edt_data); 	  /* test if GSM string or not*/
 		}
-		
+
 	    TRACE_FUNCTION("Check Length of PIN");
 		if (strlen((char*)edt_data->pin) EQ (MIN_PIN - 1) || strlen((char*)edt_data->pin) EQ (MIN_PIN -2))
 		{
@@ -2752,16 +2752,16 @@
 			{
 				TRACE_FUNCTION("MmiPins:check_pins:emercall");
 				edt_data->emergency_call = TRUE;
-				softKeys_displayId(TxtSoftCall,TxtNull,0, COLOUR_EDITOR_XX);	
+				softKeys_displayId(TxtSoftCall,TxtNull,0, COLOUR_EDITOR_XX);
 			}
 			else
 			{
 // Nov 24, 2005, a0876501, DR: OMAPS00045909
-				if((edt_data->pin_case_edit EQ CARD_REJECTED) OR (edt_data->pin_case_edit EQ INSERT_CARD) 
+				if((edt_data->pin_case_edit EQ CARD_REJECTED) OR (edt_data->pin_case_edit EQ INSERT_CARD)
 					OR (edt_data->pin_case_edit EQ SHOW_IMEI_INVALID)
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS	
+#ifdef SIM_PERS
 					//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 					OR (edt_data->pin_case_edit EQ NO_MEPD_DATA)
 #endif
@@ -2778,10 +2778,10 @@
 		{
 // Nov 24, 2005, a0876501, DR: OMAPS00045909
 			if(((edt_data->pin_case_edit EQ CARD_REJECTED) OR (edt_data->pin_case_edit EQ INSERT_CARD)
-				OR (edt_data->pin_case_edit EQ SHOW_IMEI_INVALID)				
+				OR (edt_data->pin_case_edit EQ SHOW_IMEI_INVALID)
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS					
+#ifdef SIM_PERS
 				//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 				OR (edt_data->pin_case_edit EQ NO_MEPD_DATA)
 #endif
@@ -2834,7 +2834,7 @@
 					if(!(edt_data->gsm_state))	  /* usual way for PIN 4 digits     */
 					{
 					  TRACE_FUNCTION("softkey 5");
-						
+
 					}
 					else
 					{
@@ -2867,11 +2867,11 @@
 
 /*******************************************************************************
 
- $Function:	gsm_test 
+ $Function:	gsm_test
  $Description:	test if gsm string
  $Returns:		Status int
  $Arguments:	window, pin editor attributes
- 
+
 *******************************************************************************/
 static int gsm_test(T_MFW_HND win,void * edt_pin)
 {
@@ -2907,7 +2907,7 @@
 						else
 						{
 							edt_data->gsm_state = FALSE;
-							TRACE_EVENT("dsplClearAll 2");								
+							TRACE_EVENT("dsplClearAll 2");
 							dspl_ClearAll();
 							clear_edit_array (edt_data);
 							pin_edt_destroy(edt_data->pin_edt_win);
@@ -2916,7 +2916,7 @@
 						break;
 					default:
 						edt_data->gsm_state = FALSE;
-						TRACE_EVENT("dsplClearAll 3");							
+						TRACE_EVENT("dsplClearAll 3");
 						dspl_ClearAll();
 						clear_edit_array (edt_data);
 						pin_edt_destroy(edt_data->pin_edt_win);
@@ -2926,15 +2926,15 @@
 			}
 			return status;
 		case MFW_SS_DIAL:	       /* string not yet detected  */
-        case MFW_SS_USSD:  /*JVJ SPR 1040- The short USSD strings should also be 
-                              considered in this case, since they can be confused with dialled numbers  
+        case MFW_SS_USSD:  /*JVJ SPR 1040- The short USSD strings should also be
+                              considered in this case, since they can be confused with dialled numbers
                              */
 				edt_data->gsm_state = FALSE;
 			return status;
 		default:
-			TRACE_FUNCTION("MmiPins:default in gsm_test");		
+			TRACE_FUNCTION("MmiPins:default in gsm_test");
 			edt_data->gsm_state = FALSE;
-			TRACE_FUNCTION("dsplClearAll 4");							
+			TRACE_FUNCTION("dsplClearAll 4");
 			dspl_ClearAll();
 			clear_edit_array (edt_data);
 			pin_edt_destroy(edt_data->pin_edt_win);
@@ -2951,7 +2951,7 @@
  $Description:	GSM-String will be executed
  $Returns:		None
  $Arguments:	window, string
- 
+
 *******************************************************************************/
 static void gsm_sec_execute(T_MFW_HND win,void *string)
 {
@@ -2968,7 +2968,7 @@
 
 	result = ss_execute_transaction((UBYTE*)edt_data->pin,0);/* ussd_man = 0 while SSD */
 
-	TRACE_FUNCTION("dsplClearAll 5"); 
+	TRACE_FUNCTION("dsplClearAll 5");
 	dspl_ClearAll();
 	clear_edit_array (edt_data);
 	pin_edt_destroy(edt_data->pin_edt_win);
@@ -2997,8 +2997,8 @@
  $Function:	pin_edt_kbd_long_cb
  $Description:	Callback function for keyboard long
  $Returns:		Status int
- $Arguments:	window handler event, keyboard control block 
- 
+ $Arguments:	window handler event, keyboard control block
+
 *******************************************************************************/
 static int pin_edt_kbd_long_cb (T_MFW_EVENT event,T_MFW_KBD *  kc)
 {
@@ -3030,8 +3030,8 @@
  $Function:	pin_edt_tim_out_cb
  $Description:	Callback function for timer (watchdog entering)
  $Returns:		void
- $Arguments:	window handler event, timer control block 
- 
+ $Arguments:	window handler event, timer control block
+
 *******************************************************************************/
 static void pin_edt_tim_out_cb (T_MFW_EVENT event,T_MFW_TIM * t)
 {
@@ -3052,7 +3052,7 @@
 	pin_skClear();
 	clear_edit_array(edt_data);
 	// clear the input
-	
+
 	/* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
 	ATB_edit_ClearAll(edt_data->editor);
@@ -3072,11 +3072,11 @@
 
 /*******************************************************************************
 
- $Function:	pin_editor 
+ $Function:	pin_editor
  $Description:	Pin editor Dialog Signal Handling function
  $Returns:		void
- $Arguments:	window, window handler event, value, parameter 
- 
+ $Arguments:	window, window handler event, value, parameter
+
 *******************************************************************************/
 static void pin_editor(T_MFW_HND win, USHORT event, SHORT value, void * parameter)
 {
@@ -3109,10 +3109,10 @@
 	case SIM_CLOCK:
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS			
+#ifdef SIM_PERS
 	case NO_MEPD_DATA: //x0pleela 30 Aug, 2006 DR: OMAPS00091250
 #endif
-		
+
 		//SPR#717 - GW - Wrong structures being cleared
 		memset(edt_data->pin, '\0', sizeof(edt_data->pin));/* initial string  */
 		memset(edt_data->puk, '\0', sizeof(edt_data->puk));
@@ -3141,12 +3141,12 @@
 
 /*******************************************************************************
 
- $Function:	pin_mess_create 
+ $Function:	pin_mess_create
  $Description:	Creation of an instance  for the PIN Message dialog.
 		Type of dialog : SINGLE_DYNAMIC
  $Returns:		window
  $Arguments:	parent win
- 
+
 *******************************************************************************/
 T_MFW_HND pin_mess_create (T_MFW_HND parent_window)
 {
@@ -3180,11 +3180,11 @@
 
 /*******************************************************************************
 
- $Function:	pin_mess_destroy 
+ $Function:	pin_mess_destroy
  $Description:	Destroy the pin message dialog.
  $Returns:		none
  $Arguments:	win
- 
+
 *******************************************************************************/
 void pin_mess_destroy  (T_MFW_HND own_window)
 {
@@ -3204,7 +3204,7 @@
       /*
        * Delete WIN Handler
        */
-      
+
 		  pin_mess_windows = 0;
 	  win_delete (data->pin_mess_win);
 	      FREE_MEMORY((void *)data,(sizeof(T_pin_mess)));
@@ -3214,11 +3214,11 @@
 
 /*******************************************************************************
 
- $Function:	pin_mess_win_cb 
+ $Function:	pin_mess_win_cb
  $Description:	Callback function for message windows
  $Returns:		Status int
  $Arguments:	event, window
- 
+
 *******************************************************************************/
 static int pin_mess_win_cb (T_MFW_EVENT event, T_MFW_WIN * win)
 {
@@ -3237,7 +3237,7 @@
  $Description:	Pin message Dialog Handling function
  $Returns:		none
  $Arguments:	window, event, value, parameter
- 
+
 *******************************************************************************/
 void pin_messages(T_MFW_HND win, USHORT event, SHORT value, void * parameter)
 {
@@ -3282,11 +3282,11 @@
 		    case SMLK_SHOW_MK_FAIL:		//Event to show a dialog saying "Master Unlock Failed"
 		    case SMLK_SHOW_MK_SUCC:		//Event to show a dialog saying "Master Unlock Success"
 		    case SIM_LOCK_BUSY_UNBLOCK: //wrong unblock code
-#endif		    
+#endif
   case PIN1_STATUS:
 
 
-	
+
 		switch(event)
 		{
 	       case PIN1_REQ_ATT:
@@ -3298,10 +3298,10 @@
 			  else
 				display_info.TextId2 = TxtTwoAttemptsLeft;
 			  break;
-  
-		case PUK1_REQ_ACT_INFO:		      
+
+		case PUK1_REQ_ACT_INFO:
 			pin_data->pin_case = PUK1_REQ;
-#ifdef SIM_PERS 
+#ifdef SIM_PERS
 			if( C_KEY_REQ )
 				display_info.TextId = TxtPhoneBlocked;
 			else
@@ -3384,12 +3384,12 @@
 					case CME_ERR_CorporatePersPinReq:
 					case CME_ERR_PhSimPinReq:
 						sprintf((char*)buf1,"%d attempts left",curr_succ_reset);
-						sprintf((char*)buf2,"%s", "FC Reset-Success");			
+						sprintf((char*)buf2,"%s", "FC Reset-Success");
 						break;
 
 					default:
 						sprintf((char*)buf1,"%d attempts left",curr_fail_reset);
-						sprintf((char*)buf2,"%s", "FC Reset-Failure");								
+						sprintf((char*)buf2,"%s", "FC Reset-Failure");
 						break;
 				}
 				display_info.TextString= buf1;
@@ -3405,14 +3405,14 @@
 				//if( curr_succ_reset )
 				  	// leela: for simp: pin_data->pin_case = PIN_OK;
 				//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-				//Changed the event from PIN_OK to SMLK_PUK bcoz after unblocking ME, 
-				//for event PIN_OK it would go to idle screen without displaying menu for 
+				//Changed the event from PIN_OK to SMLK_PUK bcoz after unblocking ME,
+				//for event PIN_OK it would go to idle screen without displaying menu for
 				//unlocking any categories if any
 				  pin_data->pin_case = SMLK_PUK;
 				//else
 					//pin_data->pin_case = PERM_BLK;
 				sprintf((char*)buf1,"%d attempts left",curr_succ_reset);
-				sprintf((char*)buf2,"%s", "FC Reset-Success");								
+				sprintf((char*)buf2,"%s", "FC Reset-Success");
 				display_info.TextString= buf1;
 				display_info.TextString2 = buf2;
 				  break;
@@ -3421,7 +3421,7 @@
 			//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 			//Event to display a dialog saying Master Unblock Failed
 		    case SMLK_SHOW_MK_FAIL:
-		    	{		    		
+		    	{
 		    	  char buf[25];
 		    	  pin_data->pin_case = SMLK_MASTERKEY;
 			  sprintf((char*)buf,"%s", "Master Unlock Failed");
@@ -3432,8 +3432,8 @@
 		    	break;
 
 			//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-			//Event to display a dialog saying Master Unblock Success		    	
-		    case SMLK_SHOW_MK_SUCC:		
+			//Event to display a dialog saying Master Unblock Success
+		    case SMLK_SHOW_MK_SUCC:
 		    	{
 		    	  char buf[25];
 		    	  pin_data->pin_case = PIN_OK;
@@ -3443,11 +3443,11 @@
 			  display_info.TextString2 = 0;
 		    	}
 		    	break;
- 
+
 			//x0pleela 13 Nov, 2006 DR: OMAPS00103356
 			//Event to display a dialog saying Master Unblock Password is wrong
 		    case SMLK_SHOW_WRONG_PWD:
-		    	{		    		
+		    	{
 		    	  char buf[25];
 		    	  pin_data->pin_case = SMLK_MASTERKEY;
 			  sprintf((char*)buf,"%s", "Incorrect Password");
@@ -3455,11 +3455,11 @@
 		  	  display_info.TextId2 = 0;
 			  display_info.TextString2 = 0;
 		    	}
-			
+
 			//x0pleela 13 Nov, 2006 DR: OMAPS00103356
 			//Event to display a dialog saying Master unlocking operation is successful
 		    case SMLK_SHOW_DEP_CATS_UNLOCKED:
-		    	{		    		
+		    	{
 		    	  char buf[25];
 		    	  pin_data->pin_case = SMLK_MASTERKEY;
 			  sprintf((char*)buf,"%s", "Master Unlock Success");
@@ -3468,16 +3468,16 @@
 			  display_info.TextString2 = 0;
 		    	}
 		    	break;
- 
+
 			//x0pleela 26 July, 2006 ER: OMAPS00087586, OMAPS00087587
-			//Event to display a dialog saying Busy for wrong entry of unblocking password		    	
-			case SIM_LOCK_BUSY_UNBLOCK: //wrong unblock code	
+			//Event to display a dialog saying Busy for wrong entry of unblocking password
+			case SIM_LOCK_BUSY_UNBLOCK: //wrong unblock code
 			{
 				pin_data->pin_case = SMLK_PUK;
 				display_info.TextId = TxtBusy;
 			}
 			break;
-#endif			  
+#endif
 //nm insert new one
 			case PIN1_STATUS:
 			  pin_data->pin_case = PIN1_STATUS;
@@ -3495,14 +3495,14 @@
 			  display_info.TextString2 = 0;
 			  break;
 //NM
-	  
+
 		}
 
 		dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)pin_info_cb, THREE_SECS, 0 );
 		display_info.Identifier = pin_data->pin_case;
 		info_dialog(pin_data->pin_win,&display_info); //information screen
 		pin_mess_destroy(mess_data->pin_mess_win);
-#ifdef SIM_PERS		
+#ifdef SIM_PERS
 		//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 		//Delete the simp_list window handler  after displaying the dialog
 		if(pin_data->simp_list_win)
@@ -3531,14 +3531,14 @@
 		break;
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS			
+#ifdef SIM_PERS
 //x0pleela 30 Aug, 2006 DR: OMAPS00091250
 	case NO_MEPD:
 		pin_data->display_id1 = TxtNoMEPD;
 		pin_mess_destroy(mess_data->pin_mess_win);
 		SEND_EVENT(pin_data->pin_win,TXT_NO_MEPD,0,pin_data);
-		break;		
-#endif		
+		break;
+#endif
 	case NO_SIM_CARD:
 		pin_data->display_id1 = TxtNoCard;
 		pin_mess_destroy(mess_data->pin_mess_win);
@@ -3590,11 +3590,11 @@
 #ifndef NEW_EDITOR
 /*******************************************************************************
 
- $Function:	pin_icons 
+ $Function:	pin_icons
  $Description:	display back from pins
  $Returns:		none
  $Arguments:	none
- 
+
 *******************************************************************************/
 static void pin_icons(void)
 {
@@ -3610,7 +3610,7 @@
 	dspl_ClearAll();
 
 	GlobalIconStatus = GlobalSignalIconFlag | GlobalBatteryIconFlag |
-		       GlobalVoiceMailIconFlag 
+		       GlobalVoiceMailIconFlag
 		      | GlobalCallForwardingIconFlag| GlobalKeyplockIconFlag
 					  | GlobalRingerIconFlag | GlobalRingVibrIconFlag
 					  | GlobalVibratorIconFlag | GlobalAlarmIconFlag
@@ -3621,7 +3621,7 @@
 
 /* x0045876, 14-Aug-2006 (WR - nested comment is not allowed) */
 /* SH 18/01/02. Flag for GPRS icon. */
-			
+
 /* SH 18/01/02. Flag for GPRS icon.
    Note: SPR877 - Homezone icon not displayed in PIN screen. */
 				#ifdef MMI_GPRS_ENABLED
@@ -3635,7 +3635,7 @@
 
 /*******************************************************************************
 
- $Function:	clearEditArray 
+ $Function:	clearEditArray
  $Description:	clear EditArray
  $Returns:		none
  $Arguments:	pin editor attributes
@@ -3719,7 +3719,7 @@
 	callNumber((UBYTE*)edt_data->pin);	   /* emergency call	*/
 	memset(edt_data->pin, '\0', sizeof(edt_data->pin));/*initial string*/
 	edt_data->editor_index = 0;
-TRACE_FUNCTION("clear softkey 9"); 
+TRACE_FUNCTION("clear softkey 9");
 	pin_skClear();
 }
 
@@ -3755,18 +3755,18 @@
 			{
 				perm_blocked =1;
 				SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
-			}		
+			}
 			else
 #endif
 				SEND_EVENT(pin_data->pin_win,PIN_OK_END,0,NULL);//PIN was needed
 		}
 			break;
-	
+
 		case PIN1_REQ:
 		//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 		//case PUK1_REQ:		//Handling PUK1_REQ separately as a menu should be displayed for Unblocking ME and Master Unlock
 		case INPUT_NEW_PIN:
-			
+
 			SEND_EVENT(pin_data->pin_win,identifier,0,NULL);//pin_main data !!
 			break;
 
@@ -3776,7 +3776,7 @@
 				//x0pleela 26 Sep, 2006 DR: OMAPS00096565
 				//Adding a check for C_KEY_REQ. If set, displaySIMP menu
 				//Else prompt the user for PUK entry
-				if( C_KEY_REQ ) 
+				if( C_KEY_REQ )
 				{
 				//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 				//Handling PUK1_REQ separately as a menu should be displayed for Unblocking ME and Master Unlock
@@ -3793,9 +3793,9 @@
 		//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 		//Handling SMLK_MASTERKEYto display menu for Unblocking ME or unlocking categories if any and Master Unlock
 		case SMLK_MASTERKEY:
-			//x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+			//x0pleela 25 Sep, 2006 ER: OMAPS00095524
 			//check for CME class and handle all CME errors
-			if( ((mmi_simlock_aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Cme) 	
+			if( ((mmi_simlock_aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Cme)
 			{
 			switch(mmi_simlock_aciErrDesc & 0x0000FFFF)
 			{
@@ -3809,7 +3809,7 @@
 						  else
 							SEND_EVENT(pin_data->pin_win,INPUT_NLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_NetworkSubsetPersPinReq:
 						TRACE_EVENT("CME_ERR_NetworkSubsetPersPinReq");
 						  if( simlock_get_masterkey_status())
@@ -3820,7 +3820,7 @@
 						  else
 							SEND_EVENT(pin_data->pin_win,INPUT_NSLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_ProviderPersPinReq:
 						TRACE_EVENT("CME_ERR_ProviderPersPinReq");
 						  if( simlock_get_masterkey_status())
@@ -3831,7 +3831,7 @@
 						  else
 							SEND_EVENT(pin_data->pin_win,INPUT_SPLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_CorporatePersPinReq:
 						TRACE_EVENT("CME_ERR_CorporatePersPinReq");
 						  if( simlock_get_masterkey_status())
@@ -3842,7 +3842,7 @@
 						  else
 							SEND_EVENT(pin_data->pin_win,INPUT_CLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_PhSimPinReq:
 						TRACE_EVENT("CME_ERR_PhSimPinReq");
 						  if( simlock_get_masterkey_status())
@@ -3860,7 +3860,7 @@
 					case CME_ERR_ProviderPersPukReq:
 					case CME_ERR_CorporatePersPukReq:
 					case CME_ERR_WrongPasswd:
-				
+
 						TRACE_FUNCTION("PUK Req");
 						C_KEY_REQ = 1;
 						  if( simlock_get_masterkey_status())
@@ -3868,17 +3868,17 @@
 						  	pin_data->simp_list_win = mmi_simlock_category_menus(win);
 						  }
 						  else
-						{							
+						{
 							SEND_EVENT(pin_data->pin_win,PUK1_REQ,0,pin_data);
 						}
-						break;	
-						
+						break;
+
 					default:
 						TRACE_EVENT("Undefined error");
 						break;
 		    			}
 				}
-				//x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+				//x0pleela 25 Sep, 2006 ER: OMAPS00095524
 				//check for Ext class and handle all Extension errors
 				else if( ((mmi_simlock_aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext)
 				{
@@ -3896,7 +3896,7 @@
 								SEND_EVENT(pin_data->pin_win,INPUT_PBLOCK_PIN_REQ,0,pin_data);
 						break;
 
-						//Request for Blocked Network Unblock code 
+						//Request for Blocked Network Unblock code
 						case EXT_ERR_BlockedNetworkPersPukReq:
 							TRACE_EVENT("PUK Req");
 							C_KEY_REQ = 1;
@@ -3905,10 +3905,10 @@
 							  	pin_data->simp_list_win = mmi_simlock_category_menus(win);
 							  }
 							  else
-							{							
+							{
 								SEND_EVENT(pin_data->pin_win,PUK1_REQ,0,pin_data);
 							}
-						break;	
+						break;
 
 						default:
 							break;
@@ -3940,11 +3940,11 @@
 						  	pin_data->simp_list_win = mmi_simlock_category_menus(win);
 						  }
 						  else
-						{							
+						{
 							SEND_EVENT(pin_data->pin_win,PUK1_REQ,0,pin_data);
 						}
 				}
-				//x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+				//x0pleela 25 Sep, 2006 ER: OMAPS00095524
     				//check for Cme class and handle all CME errors
 				else if( ((mmi_simlock_aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Cme)
 				{
@@ -3963,7 +3963,7 @@
 						  else
 						    SEND_EVENT(pin_data->pin_win,INPUT_NLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_NetworkSubsetPersPinReq:
 						TRACE_EVENT("CME_ERR_NetworkSubsetPersPinReq");
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
@@ -3976,7 +3976,7 @@
 						  else
 						    SEND_EVENT(pin_data->pin_win,INPUT_NSLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_ProviderPersPinReq:
 						TRACE_EVENT("CME_ERR_ProviderPersPinReq");
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
@@ -3989,11 +3989,11 @@
 						  else
 						    SEND_EVENT(pin_data->pin_win,INPUT_SPLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_CorporatePersPinReq:
 						TRACE_EVENT("CME_ERR_CorporatePersPinReq");
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-						//Displays menu for Unblocking ME or unlocking categories if any and Master Unlock				  
+						//Displays menu for Unblocking ME or unlocking categories if any and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
 						  	mmi_simlock_locktype = MFW_SIM_CLOCK;
@@ -4002,11 +4002,11 @@
 						  else
 						SEND_EVENT(pin_data->pin_win,INPUT_CLOCK_PIN_REQ,0,pin_data);
 						break;
-						
+
 					case CME_ERR_PhSimPinReq:
 						TRACE_EVENT("CME_ERR_PhSimPinReq");
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-						//Displays menu for Unblocking ME or unlocking categories if any and Master Unlock					  
+						//Displays menu for Unblocking ME or unlocking categories if any and Master Unlock
 						  if( simlock_get_masterkey_status())
 						  {
 						  	mmi_simlock_locktype = MFW_SIM_PLOCK;
@@ -4022,7 +4022,7 @@
 					case CME_ERR_ProviderPersPukReq:
 					case CME_ERR_CorporatePersPukReq:
 					case CME_ERR_WrongPasswd:
-									
+
 							TRACE_FUNCTION("PUK Req");
 						C_KEY_REQ = 1;
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
@@ -4033,8 +4033,8 @@
 						  }
 						  else
 								SEND_EVENT(pin_data->pin_win,PUK1_REQ,0,pin_data);
-						break;	
-						
+						break;
+
 					default:
 						TRACE_EVENT("Undefined error");
 						//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
@@ -4047,7 +4047,7 @@
 				}
 				//end of x0pleela 11 Sep, 2006  DR: OMASP00094215
 
-				    //x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+				    //x0pleela 25 Sep, 2006 ER: OMAPS00095524
 				    //check for Ext class and handle all Extension errors
 				else if( ((mmi_simlock_aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext)
 				{
@@ -4067,7 +4067,7 @@
 								SEND_EVENT(pin_data->pin_win,INPUT_PBLOCK_PIN_REQ,0,pin_data);
 							break;
 
-						//Request for Blocked Network Unblock code 
+						//Request for Blocked Network Unblock code
 						case EXT_ERR_BlockedNetworkPersPukReq:
 							TRACE_EVENT("PUK Req");
 							C_KEY_REQ = 1;
@@ -4078,10 +4078,10 @@
 								pin_data->simp_list_win = mmi_simlock_category_menus(win);
 							}
 							else
-							{							
+							{
 								SEND_EVENT(pin_data->pin_win,PUK1_REQ,0,pin_data);
 							}
-							break;	
+							break;
 
 						default:
 							break;
@@ -4182,7 +4182,7 @@
 
 /*******************************************************************************
 
- $Function:	sim_rem_create 
+ $Function:	sim_rem_create
  $Description:	Creation of an instance for the SIM remove dialog.
 				Type of dialog : SINGLE_STATIC
 				Top Window must be available at any time, only one instance.
@@ -4227,7 +4227,7 @@
 
 /*******************************************************************************
 
- $Function:	sim_rem_destroy 
+ $Function:	sim_rem_destroy
  $Description:	Destroy the sim remove dialog.
  $Returns:		none
  $Arguments:	window
@@ -4260,7 +4260,7 @@
 
 /*******************************************************************************
 
- $Function:	sim_rem_win_cb	
+ $Function:	sim_rem_win_cb
  $Description:	Callback function for windows
  $Returns:		Status int
  $Arguments:	event, window
@@ -4272,7 +4272,7 @@
     /*
      * Top Window has no output
      */
-	TRACE_FUNCTION("dsplClearAll 7");	   
+	TRACE_FUNCTION("dsplClearAll 7");
     dspl_ClearAll();
 	return 1;
   }
@@ -4283,7 +4283,7 @@
 
 /*******************************************************************************
 
- $Function:	sim_rem_cb_main 
+ $Function:	sim_rem_cb_main
  $Description:	SIM remove handler
  $Returns:		Status int
  $Arguments:	event, sim status
@@ -4338,7 +4338,7 @@
 			 }
 		 return 1;
 	}
-	
+
 	/* x0045876, 14-Aug-2006 (WR - missing return statement at end of non-void function ) */
 	return 0;
 }
@@ -4347,7 +4347,7 @@
 
 /*******************************************************************************
 
- $Function:	sim_rem_main 
+ $Function:	sim_rem_main
  $Description:	SIM remove main Dialog Handling function
  $Returns:		None
  $Arguments:	window, event, value, parameter
@@ -4391,7 +4391,7 @@
 
 /*******************************************************************************
 
- $Function:	setting_pin_init 
+ $Function:	setting_pin_init
  $Description:	This is the start-up time initialisation routine.
 		Start in the Menu
  $Returns:		None
@@ -4463,7 +4463,7 @@
 
 /*******************************************************************************
 
- $Function:	setting_pin_destroy 
+ $Function:	setting_pin_destroy
  $Description:	Destroy the settings pin main dialog.
  $Returns:		none
  $Arguments:	window
@@ -4502,7 +4502,7 @@
 
 /*******************************************************************************
 
- $Function:	setting_pin_win_cb 
+ $Function:	setting_pin_win_cb
  $Description:	Callback function for main windows in settings
  $Returns:		Status int
  $Arguments:	event, window
@@ -4525,7 +4525,7 @@
 
 /*******************************************************************************
 
- $Function:	sim_event_cb_setting 
+ $Function:	sim_event_cb_setting
  $Description:	SIM event handler for Setttings Pins
  $Returns:		Status int
  $Arguments:	event, sim status
@@ -4543,7 +4543,7 @@
 
 	status = (T_MFW_SIM_STATUS *)para;
 
-	TRACE_FUNCTION("Sim Event Handler of Settings Pin"); 
+	TRACE_FUNCTION("Sim Event Handler of Settings Pin");
  switch(event)
  {
 	case E_SIM_INSERTED://handle in sim_rem_cb_main
@@ -4563,7 +4563,7 @@
 		 */
 			case MFW_SIM_VERIFY:
 			//xrashmic 1 Jul, 2006 OMAPS00075784
-			//When pin is blocked, the user is immediatly prompted with puk 
+			//When pin is blocked, the user is immediatly prompted with puk
 			// entry screen or else the blue screen is displayed
 			case MFW_SIM_ACTIVATION:
 		  /*
@@ -4641,7 +4641,7 @@
                             return 0;
                         break;
                     /* Marcus: Issue 1609: 23/01/2003: End */
-                    
+
 					default:
 						return 0;
 			  }
@@ -4667,7 +4667,7 @@
 				case MFW_SIM_FAILURE:
 					TRACE_FUNCTION("sim_event_cb_setting:unblock fatal error");
 					SEND_EVENT(pin_data->pin_win,PUK1_UNBL_FATAL_ERROR,0,pin_data);
-					break;				
+					break;
 				case MFW_SIM_INVALID_CARD:
 					TRACE_FUNCTION("sim_event_cb_main:unblock failed, no more retries");
 					SEND_EVENT(pin_data->pin_win,INVALID_CARD,0,pin_data);
@@ -4819,7 +4819,7 @@
 
 /*******************************************************************************
 
- $Function:	set_pin_dis_item_flag 
+ $Function:	set_pin_dis_item_flag
  $Description:	decision about show entry "PIN enable"
  $Returns:		Status int; 0 if show, 1 if don't show
  $Arguments:	menu tag, menu attribute tag, menu item tag
@@ -4885,7 +4885,7 @@
 
 /*******************************************************************************
 
- $Function:	setting_pin_main 
+ $Function:	setting_pin_main
  $Description:	PIN Settings Dialog Handling function
  $Returns:		none
  $Arguments:	win, event, value, parameters
@@ -4925,17 +4925,17 @@
 		  case PIN1_ENAB_END:
 		  case PIN1_DISAB_END:
           case PIN2_SIM_FAILURE:    // Marcus: Issue 1609: 23/01/2003 - failure to verify PIN2
-		  
+
 		  case FDN_ACTIVATED:
 		  case ADN_ACTIVATED:
 		  case FDN_FAIL:
 		  case FDN_ACT_END:
 		  case FDN_DEACT_END:
-#ifdef SIM_PERS              
+#ifdef SIM_PERS
 //The different cases of enabling/disabling/quering and changing password
-//scenarios are handled		
+//scenarios are handled
 case SIM_LOCK_NEW_ENDSUCC_CKEY:
-    case INPUT_NEW_SIM_PLOCK_AGAIN:	
+    case INPUT_NEW_SIM_PLOCK_AGAIN:
           case SIM_LOCK_REQ_NEW:
           case TXT_SIM_LOCK_ALL:
           case SIM_LOCK_ENDSUCC:
@@ -4958,10 +4958,10 @@
 #endif
 		  sett_pin_mess(win,event);
 				  break;
-		  case PUK1_UNBL_SUCC: 
+		  case PUK1_UNBL_SUCC:
 					sett_pin_mess(win,event);
 				break;
-			
+
 	 }
 
 	 switch(event)
@@ -4990,18 +4990,18 @@
                    case TXT_ENTER_NEW_SIMLOCK:
                                pin_data->pin_case = INPUT_NEW_SIM_PLOCK;//enter PIN1 start
 				   sett_pin_edit(win,INPUT_NEW_SIM_PLOCK);
-                                break;  
+                                break;
 
                       case TXT_ENTER_NEW_SIMLOCK_AGAIN:
                                pin_data->pin_case = INPUT_NEW_SIM_PLOCK_AGAIN;//enter new PIN2 start
 				   sett_pin_edit(win,INPUT_NEW_SIM_PLOCK_AGAIN);
-				   break;           
+				   break;
                         case NEW_SIM_PLOCK_END:
                               if(!pin_data->puk_request)
                                 {
                                     mmi_simlock_change_pin(win,mmi_simlock_locktype,(char*)pin_data->old_pin,(char*)pin_data->new_pin);
                                 }
-                              break; 
+                              break;
 
 #endif
 		  case TXT_ENTER_PIN2:
@@ -5040,11 +5040,11 @@
 				   pin_data->pin_case = INPUT_NEW_PIN2_AGAIN;
 				   sett_pin_edit(win,INPUT_NEW_PIN2_AGAIN);// Start: enter New PIN2 again
 				   break;
-		  case PIN1_END:	
-				   pin1_en_dis_verify(win);	
+		  case PIN1_END:
+				   pin1_en_dis_verify(win);
 				   break;
-				   
-#ifdef SIM_PERS                   
+
+#ifdef SIM_PERS
 //Events that indicate the input of the lock code and new lock code
                 case SIM_PLOCK_END:
                                mmi_simlock_en_dis_verify(win);
@@ -5059,7 +5059,7 @@
              	   		//Master unlocking through SIMP menu
                  		mmi_simlock_master_unlock(win,  MFW_SIM_MKEYM);
                  		break;
-#endif                               
+#endif
 		  case PIN2_END:
 				   sim_verify_pin(MFW_SIM_PIN2,(char*)pin_data->old_pin);/* verification pin2 */
 				   break;
@@ -5081,7 +5081,7 @@
 					if((pin_data->set_state NEQ FDN_ACTIV) AND (pin_data->set_state NEQ FDN_DEACTIV))
 					{
 						sett_pin_mess(win,PIN_OK_INFO);// for pin2 change and pin2 check from serv/phoneb
-					
+
 					}
 					else
 					{
@@ -5100,13 +5100,13 @@
 		  case UNBL_OK:
 				pin_ch_end_or_abort(win);
 			   break;
-			
-		  case PIN1_STATUS_END: 		  
+
+		  case PIN1_STATUS_END:
 		  case IDLE_GSM_FAIL:
 				   pin_ch_end_or_abort(win);
 			   break;
 		  case SETT_ABORT:
-				TRACE_FUNCTION("clear softkey 10");		  
+				TRACE_FUNCTION("clear softkey 10");
 				// June 16, 2005  REF: CRR 31267  x0021334
 				if (pin2Flag NEQ TRUE)  // To ensure that the screen does not blank out
 				{
@@ -5134,7 +5134,7 @@
 					setting_pin_destroy(pin_data->pin_win);// destroy pin settings dialog
 				break;
 		  case FDN_UNBL_OK:
-				TRACE_FUNCTION("clear softkey 11");		  
+				TRACE_FUNCTION("clear softkey 11");
 				setting_pin_destroy(pin_data->pin_win);// destroy pin settings dialog
 				break;
 		  case PIN1_ENDIS_FAIL:
@@ -5152,9 +5152,9 @@
 			    pin_data->pin_case = FDN_WAIT;
 				winShow(pin_data->pin_win);
 				break;	// waiting for call back from phonebook handler
-#ifdef SIM_PERS				
-
-//event to handle lock/unlock failure			
+#ifdef SIM_PERS
+
+//event to handle lock/unlock failure
 		case SIM_LOCK_ENDIS_FAIL:
                             sett_pin_mess(win,SIM_LOCK_ENDIS_FAIL);
                             break;
@@ -5170,8 +5170,8 @@
 		case SIM_LOCK_BUSY_UNBLOCK:
 			       sett_pin_mess(win, SIM_LOCK_BUSY_UNBLOCK);
                             break;
-                 
-#endif                            
+
+#endif
 		  default:
 			  break;
 	 }
@@ -5181,7 +5181,7 @@
 
 /*******************************************************************************
 
- $Function:	pin_ch_end_or_abort 
+ $Function:	pin_ch_end_or_abort
  $Description:	PIN change finished or abort (settings)
  $Returns:		none
  $Arguments:	win
@@ -5205,10 +5205,10 @@
 			par_window = pin_data->parent_win;
 			setting_pin_destroy(pin_data->pin_win);// destroy pin settings dialog
 			SEND_EVENT(par_window,PIN1_OK,0,NULL);// pin1 check over PUK1
-		}	  
+		}
 		else
 		{
-			TRACE_FUNCTION("clear softkey 12");		
+			TRACE_FUNCTION("clear softkey 12");
 			pin_skClear();
 			setting_pin_destroy(pin_data->pin_win);// destroy pin settings dialog,also idle gsm
 		}										/* back to menu tree	  */
@@ -5241,7 +5241,7 @@
 	if( info_disp)
 		dialog_info_destroy(info_disp);
 	info_disp = NULL;
-	
+
 	if( state)
 	{
 			SEND_EVENT(parent,SIM_LOCK_ENDSUCC,0,pin_data);
@@ -5274,7 +5274,7 @@
 		mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
 
 		if (status == MFW_SS_FAIL)
-		{	
+		{
 			if((aciErrDesc & 0x0000FFFF) EQ CME_ERR_SimNotIns)
 		     	 SEND_EVENT(pin_data->pin_win,SIM_LOCK_SIM_REM,0,pin_data);
 
@@ -5306,8 +5306,8 @@
 	{
 		perm_blocked =1;
 		SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
-	}	     
-		
+	}
+
    }
 /*******************************************************************************
  $Function:		mmi_simlock_en_dis_verify
@@ -5326,27 +5326,27 @@
 
 	TRACE_FUNCTION("mmi_simlock_en_dis_verify()");
   if((pin_data->set_state != ENABLE) && (pin_data->set_state != DISABLE))
-	{	
-              
+	{
+
 	       TRACE_FUNCTION("We're verifying SIMLock");
-	     
+
               SEND_EVENT(pin_data->pin_win,SIM_LOCK_REQ_NEW,0,pin_data);
-              
+
        }
   else if(pin_data->set_state EQ ENABLE)
-   {	 
+   {
 		TRACE_FUNCTION("MmiPins:Enable Lock now");
-		//TRACE_FUNCTION_P1("Vidya: SimLock_MMI_Enable Password=%s",pin_data->old_pin);	
+		//TRACE_FUNCTION_P1("Vidya: SimLock_MMI_Enable Password=%s",pin_data->old_pin);
 		ret = mfw_simlock_enable_lock((U8*)pin_data->old_pin, mmi_simlock_locktype);
 		if ( ret == MFW_SS_FAIL)
-		{	
+		{
 		     if((aciErrDesc & 0x0000FFFF) EQ CME_ERR_SimNotIns)
 		     	 SEND_EVENT(pin_data->pin_win,SIM_LOCK_SIM_REM,0,pin_data);
 		     else
 		        SEND_EVENT(pin_data->pin_win,SIM_LOCK_ENDIS_FAIL,0,pin_data);
 		}
 //	Nov 03, 2005 DR: OMAPS00052032 - xpradip
-//	handle the execute state for enabling the lock		
+//	handle the execute state for enabling the lock
 		else if( ret == MFW_EXCT)
 		{
 			dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull,TxtPleaseWait,TxtNull, COLOUR_STATUS);
@@ -5357,10 +5357,10 @@
              		SEND_EVENT(pin_data->pin_win,SIM_LOCK_ENDSUCC,0,pin_data);
    }
    else  if(pin_data->set_state EQ DISABLE)
-   { 	
-   		ret = mfw_simlock_disable_lock((U8*)pin_data->old_pin,mmi_simlock_locktype); 
+   {
+   		ret = mfw_simlock_disable_lock((U8*)pin_data->old_pin,mmi_simlock_locktype);
 		if (ret == MFW_SS_FAIL)
-		{	
+		{
 		      if((aciErrDesc & 0x0000FFFF) EQ CME_ERR_SimNotIns)
 		     	 SEND_EVENT(pin_data->pin_win,SIM_LOCK_SIM_REM,0,pin_data);
 
@@ -5400,24 +5400,24 @@
     	win_data = ((T_MFW_HDR *)win)->data;
 
     pin_data = (T_pin *)win_data->user;
-	
-    /*a0393213 warnings removal-status variable set but not used*/	
-    /*T_MFW_SIM_PIN_STATUS status; 
+
+    /*a0393213 warnings removal-status variable set but not used*/
+    /*T_MFW_SIM_PIN_STATUS status;
 
     status.type = MFW_SIM_PLOCK;*/
     slock_status= mfw_simlock_get_lock_status(mmi_simlock_locktype);
     pin_data->set_state = ENABLE;
 
     if(slock_status EQ MFW_SIM_DISABLE) /*if PIN disabled*/
-    {	
-        SEND_EVENT(pin_data->pin_win,TXT_SIM_LOCK_ALL,0,pin_data);	
+    {
+        SEND_EVENT(pin_data->pin_win,TXT_SIM_LOCK_ALL,0,pin_data);
      }
     else if (slock_status EQ MFW_SIM_BLOCKED)
     {
     	pin_data->pin_case = SIM_LOCK_ALL;
     	SEND_EVENT(pin_data->pin_win, SIM_LOCK_ENDIS_FAIL,0,pin_data);
      }
-    else 
+    else
         SEND_EVENT(pin_data->pin_win,SIM_LOCK_ALREADY_ENDIS,0,pin_data);
     	}
 }
@@ -5426,8 +5426,8 @@
 
  $Function:		SIMLock_disable
  $Description:	Initiates the password input screen for the disabling of a lock
- $Returns:		
- $Arguments:	
+ $Returns:
+ $Arguments:
 *******************************************************************************/
 void SIMLock_disable ()
 {
@@ -5439,18 +5439,18 @@
 		T_pin * pin_data = NULL;
 		/*T_MFW_SIM_PIN_STATUS status;*//*a0393213 warnings removal-status variable set but not used*/
 
-            TRACE_FUNCTION("SIMLock_disable()");    
+            TRACE_FUNCTION("SIMLock_disable()");
 
 		if(win != NULL) /* x0039928 - Lint warning removal */
   		{	win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
-		
+
 		/*status.type = MFW_SIM_PLOCK;*/ /*a0393213 warnings removal-status variable set but not used*/
 		slock_status= mfw_simlock_get_lock_status(mmi_simlock_locktype);
 		pin_data->set_state = DISABLE;
 		if(slock_status EQ MFW_SIM_ENABLE) /*if PIN disabled*/
-		{	
-			SEND_EVENT(pin_data->pin_win,TXT_SIM_LOCK_ALL,0,pin_data);	
+		{
+			SEND_EVENT(pin_data->pin_win,TXT_SIM_LOCK_ALL,0,pin_data);
 		}
 		else if (slock_status EQ MFW_SIM_BLOCKED)
 	    {
@@ -5483,16 +5483,16 @@
     T_MFW_WIN * win_data = NULL;
     T_pin * pin_data = NULL;
     int status;
-   
+
 	if(win != NULL)	/* x0039928 - Lint warning removal */
 	{
 	win_data = ((T_MFW_HDR *)win)->data;
 	pin_data = (T_pin *)win_data->user;
 	pin_data->set_state = CHANGE_PIN;
 	status = mfw_simlock_get_lock_status(mmi_simlock_locktype);
-	
+
 	TRACE_FUNCTION("MmiPins:SIMLock_change");
-	
+
 	if(status == MFW_SIM_BLOCKED)
 	{
 		pin_data->pin_case = SIM_LOCK_ALL;
@@ -5512,9 +5512,9 @@
 
 /*******************************************************************************
 
- $Function:		SIMLock_status  
+ $Function:		SIMLock_status
  $Description:	Initiates the query for the lock status.
- $Returns:		
+ $Returns:
  $Arguments:none
 *******************************************************************************/
 void SIMLock_status ()
@@ -5542,12 +5542,12 @@
 
  $Function:    	simlock_doAction
 
- $Description:	
-            
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 void simlock_doAction()
@@ -5569,7 +5569,7 @@
 		case MFW_SIM_VERIFY:
 			SIMLock_status();
 			break;
-			
+
 		default:
 			break;
 		}
@@ -5581,14 +5581,14 @@
 		T_MFW_HND win = setting_pin_create(idle_win);
 		T_MFW_WIN * win_data = NULL;
 		T_pin * pin_data = NULL;
-		
+
 		if(win != NULL) /* x0039928 -Lint warning removal */
 		{
 		win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
 
-            	TRACE_FUNCTION("SIMLock_resetFC()");    
-            	
+            	TRACE_FUNCTION("SIMLock_resetFC()");
+
 	    	SEND_EVENT(pin_data->pin_win, SIM_LOCK_REQ_FCPWD,0,pin_data);
 		}
 		return 1;
@@ -5599,18 +5599,18 @@
  $Function:    	mmi_simlock_category_menus()
 
  $Description:	starts the simlock category list menu
- 
+
  $Returns:		None
 
  $Arguments:	parent window
- 
+
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 T_MFW_HND mmi_simlock_category_menus(T_MFW_HND parent)
-{	
+{
 	T_MFW_HND simp_cat_list_win;
 	TRACE_FUNCTION("mmi_simlock_category_menus");
-	
+
 	simp_cat_list_win = bookMenuStart(parent, SIMPCategoryListAttributes(), NULL);
 	return  simp_cat_list_win;
 
@@ -5631,7 +5631,7 @@
   T_pin * pin_data = (T_pin *)win_data->user; // pin main data
 
   TRACE_FUNCTION("SIMLock_unblock_ME()");
-  
+
   pin_data->puk_request = TRUE;
   C_KEY_REQ=1;
   FCUnlock_flag=1;
@@ -5651,11 +5651,11 @@
   T_MFW_HND 		pin_win = pin_windows;
   T_MFW_WIN * win_data = ((T_MFW_HDR *)pin_win)->data;
   T_pin * pin_data = (T_pin *)win_data->user; // pin main data
-  
-  TRACE_FUNCTION("SIMLock_MasterKeyUnlock_bootup()");    
-  
+
+  TRACE_FUNCTION("SIMLock_MasterKeyUnlock_bootup()");
+
   SEND_EVENT(pin_data->pin_win, INPUT_MASTER_KEY_REQ,0,pin_data);
-  
+
   return 1;
 }
 
@@ -5677,8 +5677,8 @@
   {
   win_data = ((T_MFW_HDR *)win)->data;
   pin_data = (T_pin *)win_data->user;
-  
-  TRACE_FUNCTION("SIMLock_MasterKeyUnlock()");    
+
+  TRACE_FUNCTION("SIMLock_MasterKeyUnlock()");
   SEND_EVENT(pin_data->pin_win, SIM_LOCK_REQ_MKPWD,0,pin_data);
   }
   return 1;
@@ -5688,7 +5688,7 @@
 
  $Function:    	simlock_check_masterkey
 
- $Description:   If there is no support for Master Unlocking the item "Master unlock" will not 
+ $Description:   If there is no support for Master Unlocking the item "Master unlock" will not
  				appear on the menulist
 
  $Returns:
@@ -5697,8 +5697,8 @@
 
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-USHORT	simlock_check_masterkey(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_masterkey(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 
 {
@@ -5731,7 +5731,7 @@
 	TRACE_FUNCTION("simlock_get_masterkey_status");
 
 	status = mfw_simlock_check_masterkey(MFW_SIM_MKEYM);
-	return status;	
+	return status;
 }
 
 /*******************************************************************************
@@ -5746,21 +5746,21 @@
 
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-USHORT	simlock_check_NWCatLock(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_NWCatLock(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 
 {
 	int status;
-	
+
 	TRACE_FUNCTION("simlock_check_NWCatLock");
 
 	status = mfw_simlock_get_lock_status(mmi_simlock_locktype);
 	if( (mmi_simlock_locktype EQ MFW_SIM_NLOCK ) && ( status NEQ MFW_SIM_BLOCKED) )
 		return 0;
 	else
-		return 1;	
-	
+		return 1;
+
 }
 
 /*******************************************************************************
@@ -5775,13 +5775,13 @@
 
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-USHORT	simlock_check_NSCatLock(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_NSCatLock(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 
 {
 	int status;
-	
+
 	TRACE_FUNCTION("simlock_check_NSCatLock");
 
 
@@ -5789,7 +5789,7 @@
 	if( (mmi_simlock_locktype EQ MFW_SIM_NSLOCK )&& ( status NEQ MFW_SIM_BLOCKED) )
 		return 0;
 	else
-		return 1;	
+		return 1;
 }
 
 /*******************************************************************************
@@ -5804,20 +5804,20 @@
 
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-USHORT	simlock_check_SPCatLock(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_SPCatLock(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 
 {
 	int status;
-	
+
 	TRACE_FUNCTION("simlock_check_SPCatLock");
 
 	status = mfw_simlock_get_lock_status(mmi_simlock_locktype);
 	if( (mmi_simlock_locktype EQ MFW_SIM_SPLOCK )&& ( status NEQ MFW_SIM_BLOCKED) )
 		return 0;
 	else
-		return 1;		
+		return 1;
 }
 
 /*******************************************************************************
@@ -5832,20 +5832,20 @@
 
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-USHORT	simlock_check_CPCatLock(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_CPCatLock(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 
 {
 	int status;
-	
+
 	TRACE_FUNCTION("simlock_check_CPCatLock");
 
 	status = mfw_simlock_get_lock_status(mmi_simlock_locktype);
 	if( (mmi_simlock_locktype EQ MFW_SIM_CLOCK )&& ( status NEQ MFW_SIM_BLOCKED) )
 		return 0;
 	else
-		return 1;		
+		return 1;
 }
 
 /*******************************************************************************
@@ -5860,20 +5860,20 @@
 
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-USHORT	simlock_check_SIMCatLock(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_SIMCatLock(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 
 {
 	int status;
-	
+
 	TRACE_FUNCTION("simlock_check_SIMCatLock");
 
 	status = mfw_simlock_get_lock_status(mmi_simlock_locktype);
 	if( (mmi_simlock_locktype EQ MFW_SIM_PLOCK )&& ( status NEQ MFW_SIM_BLOCKED) )
 		return 0;
 	else
-		return 1;		
+		return 1;
 }
 
 /*******************************************************************************
@@ -5888,8 +5888,8 @@
 
 *******************************************************************************/
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
-USHORT	simlock_check_CatBlock(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_CatBlock(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 {
 	T_SUP_INFO_TYPE FLAG;
@@ -5898,7 +5898,7 @@
 	TRACE_FUNCTION("simlock_check_CatBlock");
 
  	FLAG=FCATTEMPTSLEFT;          /* set flag to current */
-     	curr_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/	
+     	curr_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
 	if((curr_fc == 0)) //ME blocked
 		return 0;
 	else
@@ -5927,7 +5927,7 @@
 	status = mfw_simlock_master_unlock((U8*)pin_data->old_pin, MK_Unblock_flag);
 	if (status == MFW_SS_FAIL)
 		{
-		SEND_EVENT(pin_data->pin_win,SIM_LOCK_MKPWD_FAIL,0,pin_data);			
+		SEND_EVENT(pin_data->pin_win,SIM_LOCK_MKPWD_FAIL,0,pin_data);
 		}
        else
        	{
@@ -5947,21 +5947,21 @@
 
 *******************************************************************************/
 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
-USHORT	simlock_check_PBCatLock(struct MfwMnuTag *m, 
-									   struct MfwMnuAttrTag *ma, 
+USHORT	simlock_check_PBCatLock(struct MfwMnuTag *m,
+									   struct MfwMnuAttrTag *ma,
 									   struct MfwMnuItemTag *mi)
 
 {
 	int status;
-	
+
 	TRACE_FUNCTION("simlock_check_PBCatLock");
 
 	status = mfw_simlock_get_lock_status(mmi_simlock_locktype);
 	if( (mmi_simlock_locktype EQ MFW_SIM_PBLOCK ) && ( status NEQ MFW_SIM_BLOCKED) )
 		return 0;
 	else
-		return 1;	
-	
+		return 1;
+
 }
 
 /*******************************************************************************
@@ -5981,7 +5981,7 @@
 	T_MFW_HND 		pin_win = pin_windows;
 	T_MFW_WIN * win_data = ((T_MFW_HDR *)pin_win)->data;
 	T_pin * pin_data = (T_pin *)win_data->user; // pin main data
-	
+
 	TRACE_FUNCTION("simp_unlock_Category()");
 	switch((int)i->str)
 	{
@@ -5999,14 +5999,14 @@
 		break;
 	case TxtSIM:
 		SEND_EVENT(pin_win,INPUT_SIM_PIN_REQ, 0, pin_data);
-		break;		
+		break;
 
 	//x0pleela 25 Sep, 2006 ER: OMAPS00095524
 	//Handling "Blocked Network" category
 	case TxtBlkNetwork:
 		SEND_EVENT(pin_win,INPUT_PBLOCK_PIN_REQ, 0, pin_data);
-		break;	
-	}	
+		break;
+	}
 	return MFW_EVENT_CONSUMED;
 }
 
@@ -6018,7 +6018,7 @@
 *******************************************************************************/
 int get_fc_max_value (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
@@ -6028,7 +6028,7 @@
 
      TRACE_FUNCTION("get_fc_max_value");
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      sprintf(buf, "MAX %d tries", max_fc);
@@ -6036,25 +6036,25 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 
 /*******************************************************************************
  $Function:		get_fc_attempts_left
  $Description:	       gets the current value of FC
- $Returns:		none 
+ $Returns:		none
  $Arguments:	       none
 *******************************************************************************/
 int get_fc_attempts_left (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int curr_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
@@ -6063,9 +6063,9 @@
 //	Sept 24, 2005 REF:  LOCOSTO-ENH-34438, xpradipg
 //	new ENUM used to adopt to the aci label
      FLAG = FCATTEMPTSLEFT;          /* set flag to current */
-     
+
      curr_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(curr_fc != MFW_FAILURE)
      	{
      sprintf(buf, "%d tries left", curr_fc);
@@ -6073,14 +6073,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 
 
@@ -6093,16 +6093,16 @@
 *******************************************************************************/
 int get_fail_reset_fc_max_value (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
      T_DISPLAY_DATA display_info;
      char buf[30];
      FLAG=FCRESETFAILMAX;          /* set flag to current */
-     
+
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      sprintf(buf, "MAX %d tries", max_fc);
@@ -6110,14 +6110,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 
 /*******************************************************************************
@@ -6128,16 +6128,16 @@
 *******************************************************************************/
 int get_succ_reset_fc_max_value (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
      T_DISPLAY_DATA display_info;
      char buf[30];
      FLAG=FCRESETSUCCESSMAX;          /* set flag to current */
-     
+
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      sprintf(buf, "MAX %d tries", max_fc);
@@ -6145,14 +6145,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 /*******************************************************************************
  $Function:		get_fail_reset_fc_attempts_left
@@ -6162,18 +6162,18 @@
 *******************************************************************************/
 int get_fail_reset_fc_attempts_left (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
      T_DISPLAY_DATA display_info;
      char buf[30];
 //	Sept 24, 2005 REF:  LOCOSTO-ENH-34438, xpradipg
-//	new ENUM used to adopt to the aci label	 
+//	new ENUM used to adopt to the aci label
      FLAG = FCRESETFAILATTEMPTSLEFT;          /* set flag to current */
-     
+
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      sprintf(buf, "%d tries left", max_fc);
@@ -6181,14 +6181,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 /*******************************************************************************
  $Function:		get_succ_reset_fc_attempts_left
@@ -6198,18 +6198,18 @@
 *******************************************************************************/
 int get_succ_reset_fc_attempts_left (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
      T_DISPLAY_DATA display_info;
      char buf[30];
 //	Sept 24, 2005 REF:  LOCOSTO-ENH-34438, xpradipg
-//	new ENUM used to adopt to the aci label	 
+//	new ENUM used to adopt to the aci label
      FLAG=FCRESETSUCCESSATTEMPTSLEFT;          /* set flag to current */
-     
+
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      sprintf(buf, "%d tries left", max_fc);
@@ -6217,14 +6217,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 /*******************************************************************************
  $Function:		get_timer_flag_value
@@ -6234,16 +6234,16 @@
 *******************************************************************************/
 int get_timer_flag_value (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
      T_DISPLAY_DATA display_info;
      char buf[30];
      FLAG=TIMERFLAG;          /* set flag to current */
-     
+
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      	if( max_fc )
@@ -6254,14 +6254,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 
 /*******************************************************************************
@@ -6272,16 +6272,16 @@
 *******************************************************************************/
 int get_airtel_ind_flag_value (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
      T_DISPLAY_DATA display_info;
      char buf[30];
      FLAG=AIRTELINDFLAG;          /* set flag to current */
-     
+
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      	if( max_fc )
@@ -6292,14 +6292,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 
 /*******************************************************************************
@@ -6310,16 +6310,16 @@
 *******************************************************************************/
 int get_etsi_flag_value (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-   
+
     T_SUP_INFO_TYPE FLAG;
      int max_fc;
      T_MFW_HND       win  = mfwParent(mfw_header());
      T_DISPLAY_DATA display_info;
      char buf[30];
      FLAG=ETSIFLAG;          /* set flag to current */
-     
+
      max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
-     
+
      if(max_fc != MFW_FAILURE)
      	{
      	if( max_fc )
@@ -6330,14 +6330,14 @@
      	}
      else
      dlg_initDisplayData_TextId( &display_info, TxtNull,  TxtNull, TxtFailed, TxtNull, COLOUR_STATUS);
-     
+
      dlg_initDisplayData_events( &display_info, NULL, TWO_SECS, KEY_OK );
-    // display_info.TextString2   = NULL; 
+    // display_info.TextString2   = NULL;
      display_info.Identifier   = NULL;
       info_dialog(win,&display_info); //information screen
-      
+
       return 1;
-   
+
 }
 
 /*******************************************************************************
@@ -6348,7 +6348,7 @@
 *******************************************************************************/
 int setLockTypeNw (struct MfwMnuTag * m, struct MfwMnuItemTag * i)
 {
-       TRACE_FUNCTION("setLockTypeNw"); 
+       TRACE_FUNCTION("setLockTypeNw");
 	mmi_simlock_locktype=MFW_SIM_NLOCK;
 	simlock_doAction();
 	return 1;
@@ -6425,12 +6425,12 @@
 
  $Function:    	setLockActionLock
 
- $Description:	
-            
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 
@@ -6446,11 +6446,11 @@
  $Function:    	setLockActionUnlock
 
  $Description:	sets the global flag to the action unlock
-            
+
  $Returns:		none
 
  $Arguments:	none
- 
+
 *******************************************************************************/
 
 
@@ -6463,12 +6463,12 @@
 
  $Function:    	setLockActionChPwd
 
- $Description:	
-            
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 
@@ -6482,12 +6482,12 @@
 
  $Function:    	setLockActionChkStat
 
- $Description:	
-            
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 
@@ -6550,7 +6550,7 @@
 
 /*******************************************************************************
 
- $Function:	pin1_en_dis_verify 
+ $Function:	pin1_en_dis_verify
  $Description:	PIN enab/disab/verify start
  $Returns:		none
  $Arguments:	win
@@ -6567,19 +6567,19 @@
 		sim_verify_pin(MFW_SIM_PIN1,(char*)pin_data->old_pin);/* verification pin1 */
 	}
    else if(pin_data->set_state EQ ENABLE)
-   {	/* start enabling PIN1 */ 
-		TRACE_FUNCTION("MmiPins:Pin1 now enabled");   
+   {	/* start enabling PIN1 */
+		TRACE_FUNCTION("MmiPins:Pin1 now enabled");
 		if (sim_enable_pin((U8*)pin_data->old_pin) == MFW_SS_FAIL)
 		{	/*SPR 2145, if attempt fails then behave as though a "Pin incorrect"
 			event has been sent to MMI*/
  			 pin_data->pin_retries = sim_pin_count(MFW_SIM_PIN1);
 		     SEND_EVENT(pin_data->pin_win,PIN1_ENDIS_FAIL,0,pin_data);
 		}
-			
+
    }
-   else 
+   else
    { 	/* start disabling PIN1 */
-		TRACE_FUNCTION("MmiPins:Pin1 now disabled");   
+		TRACE_FUNCTION("MmiPins:Pin1 now disabled");
 		if (sim_disable_pin((U8*)pin_data->old_pin) == MFW_SS_FAIL)
 		{	/*SPR 2145, if attempt fails then behave as though a "Pin incorrect"
 			event has been sent to MMI*/
@@ -6592,7 +6592,7 @@
 
 /*******************************************************************************
 
- $Function:	pin_change 
+ $Function:	pin_change
  $Description:	PIN change : call from menu Settings
  $Returns:		Status int
  $Arguments:	menu, item
@@ -6605,7 +6605,7 @@
 		T_MFW_WIN * win_data = NULL;
 		T_pin * pin_data = NULL;
 		T_MFW_SIM_PIN_STATUS status;
-			
+
 		if(win != NULL) /* x0039928 - Lint warning removal */
 		{	win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
@@ -6637,7 +6637,7 @@
 
 /*******************************************************************************
 
- $Function:	pin2_change 
+ $Function:	pin2_change
  $Description:	PIN2 change : call from menu Settings
  $Returns:		Status int
  $Arguments:	menu, item
@@ -6648,7 +6648,7 @@
 		T_MFW_HND win = setting_pin_create(idle_win);
 		T_MFW_WIN * win_data = NULL;
 		T_pin * pin_data = NULL;
-		
+
 		if(win != NULL) /* x0039928 - Lint warning removal */
 		{	win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
@@ -6690,19 +6690,19 @@
 		T_MFW_SIM_PIN_STATUS status;
 		T_MFW_WIN * win_data = NULL;
 		T_pin * pin_data = NULL;
-		
+
 		if(win != NULL)  /* x0039928 - Lint warning removal */
 		{
 		win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
-    
+
 		status.type = MFW_SIM_PIN1;//get pin1 status
 		sim_pin_status(&status);
 		if(status.set EQ MFW_SIM_DISABLE) /*if PIN disabled*/
 		{	pin_data->set_state = ENABLE;
 			if(sim_pin_count(MFW_SIM_PIN1) > 0) //if PIN1 not blocked
 			{	//ask for PIN1
-			    SEND_EVENT(pin_data->pin_win,PIN1_REQ,0,pin_data);	
+			    SEND_EVENT(pin_data->pin_win,PIN1_REQ,0,pin_data);
 			}
 			else
 			{	//ask for PUK1
@@ -6773,7 +6773,7 @@
 
 /*******************************************************************************
 
- $Function:	pin_status  
+ $Function:	pin_status
  $Description:	how if pin request is on or off
  $Returns:		Status int
  $Arguments:	menu, item
@@ -6785,7 +6785,7 @@
 		T_MFW_HND win = setting_pin_create(idle_win);
 		T_MFW_WIN * win_data = NULL;
 		T_pin * pin_data = NULL;
-		
+
 		if(win != NULL) /* x0039928 - Lint warning removal */
 		{
 		win_data = ((T_MFW_HDR *)win)->data;
@@ -6804,7 +6804,7 @@
 
 /*******************************************************************************
 
- $Function:	pin2_fdn_activate 
+ $Function:	pin2_fdn_activate
  $Description:	PIN2 activate fdn    call from menu Settings
  $Returns:		Status int
  $Arguments:	none
@@ -6815,13 +6815,13 @@
 		T_MFW_SIM_PIN_STATUS status;
 		T_MFW_WIN * win_data = NULL;
 		T_pin * pin_data = NULL;
-		
+
 		if(win != NULL) /* x0039928 - Lint warning removal */
 		{
 		win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
-	
-	
+
+
 		pin_data->set_state = FDN_ACTIV;
 
 	TRACE_FUNCTION("MmiPins:pin2_check");
@@ -6852,24 +6852,24 @@
 		return 1;
 }
 void pin1_not_enabled_screen( void )
-{		
+{
 	T_MFW_HND	    parent_window	 = mfwParent( mfw_header() );
-	T_DISPLAY_DATA display_info; 
+	T_DISPLAY_DATA display_info;
 
 	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtEnablePIN, TxtNull , COLOUR_STATUS);
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)not_avail_cb, THREE_SECS, KEY_RIGHT|KEY_LEFT );
-	
+
 	info_dialog( parent_window, &display_info );
 }
 
 void pin2_not_available_screen( void )
-{		
+{
 	T_MFW_HND	    parent_window	 = mfwParent( mfw_header() );
-	T_DISPLAY_DATA display_info; 
+	T_DISPLAY_DATA display_info;
 
 	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtPin2Code, TxtNotAvailable , COLOUR_STATUS);
 	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)not_avail_cb, THREE_SECS, KEY_RIGHT|KEY_LEFT );
-	
+
 	info_dialog( parent_window, &display_info );
 }
 
@@ -6880,12 +6880,12 @@
 		{
 		case INFO_KCD_LEFT:
 		case INFO_KCD_RIGHT:
-		
+
 		case INFO_TIMEOUT:
 			winShow(win);
 			break;
 		}
-	
+
 }
 /*******************************************************************************
 
@@ -6900,7 +6900,7 @@
 		T_MFW_HND win = setting_pin_create(parent_win);
 		T_MFW_WIN * win_data = NULL;
 		T_pin * pin_data = NULL;
-		
+
 		if(win != NULL) /* x0039928 - Lint warning removal */
 		{	win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
@@ -6959,7 +6959,7 @@
 	{
 		SEND_EVENT(pin_edt_win,event,0,pin_data);
 	}
- 
+
 
 
 }
@@ -7049,7 +7049,7 @@
 #if(0) /* x0039928 - Lint warning removal */
 /*******************************************************************************
 
- $Function:	set_pin_win_cb 
+ $Function:	set_pin_win_cb
  $Description:	Callback function for editor windows
  $Returns:		status int
  $Arguments:	event, window
@@ -7088,7 +7088,7 @@
   /* SPR#1428 - SH - New Editor changes */
   #ifdef NEW_EDITOR
 	ATB_edit_Show(edt_data->editor);
-	
+
 	if (edt_data->editor->update!=ED_UPDATE_TRIVIAL)
 	{
 		/* Set the colour for drawing title */
@@ -7100,7 +7100,7 @@
 		/* Title */
 
 		if(pin_emergency_call == TRUE)
-		{					
+		{
 			PROMPT(0,0,0,TxtEmergency);
 		}
 		else
@@ -7113,7 +7113,7 @@
 		}
 
 		/* Soft keys */
-		
+
 		if ((strlen((char*)edt_data->pin) >= MIN_PIN) && (strlen((char*)edt_data->pin) < (MAX_PIN + 1)))
 		{
 				if(!(edt_data->gsm_state))	  /* usual way for PIN 4 digits     */
@@ -7130,31 +7130,31 @@
 		if((strlen((char*)edt_data->pin) == 0))//  May 13, 2004        REF: CRR 13623  xvilliva
 		{
 			TRACE_EVENT("clear softkey 16 - zero length");
-			softKeys_displayId(TxtNull,TxtNull,0, COLOUR_EDITOR_XX);												
+			softKeys_displayId(TxtNull,TxtNull,0, COLOUR_EDITOR_XX);
 		}
 		else if((strlen((char*)edt_data->pin) < MIN_PIN) && (edt_data->emergency_call != TRUE))
 		{
-			TRACE_EVENT("clear softkey 16");	
-			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);												
+			TRACE_EVENT("clear softkey 16");
+			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);
 		}
 #ifdef SIM_PERS
 		else if((strlen((char*)edt_data->pin) < MIN_PIN) && (edt_data->emergency_call == TRUE))
 		{
-			TRACE_EVENT("clear softkey 16");	
+			TRACE_EVENT("clear softkey 16");
 			if(pin_emergency_call == TRUE)
-				softKeys_displayId(TxtSoftCall,TxtDelete,0, COLOUR_EDITOR_XX);												
+				softKeys_displayId(TxtSoftCall,TxtDelete,0, COLOUR_EDITOR_XX);
 			else
-			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);												
+			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);
 		}
 #endif
 	}
-	
+
 	edt_data->editor->update = ED_UPDATE_DEFAULT;
-	
+
 #else /* NEW_EDITOR */
 	pin_icons();
    	PROMPT(INFO_TEXT_X,INFO_TEXT_Y,0,pin_data->display_id1);
-   	
+
   TRACE_FUNCTION("softkey 6");
 	softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);
 #endif /* NEW_EDITOR */
@@ -7280,16 +7280,16 @@
 		case KCD_STAR:
 			if(edt_data->editor_index < MAX_DIG)
 			{
-				/* xreddymn OMAPS00083495 Jul-04-2006 
+				/* xreddymn OMAPS00083495 Jul-04-2006
 				 * Limit PIN1, PIN2 entries to 8 digits.
 				 */
-				if(((edt_data->pin_case_edit==INPUT_PIN1) || 
+				if(((edt_data->pin_case_edit==INPUT_PIN1) ||
 					(edt_data->pin_case_edit==INPUT_PIN2) ||
 					(edt_data->pin_case_edit==INPUT_NEW_PIN) ||
 					(edt_data->pin_case_edit==INPUT_NEW_PIN_AGAIN) ||
 					(edt_data->pin_case_edit==INPUT_NEW_PIN2) ||
 					(edt_data->pin_case_edit==INPUT_NEW_PIN2_AGAIN)) &&
-					(edt_data->editor_index>=8) && 
+					(edt_data->editor_index>=8) &&
 					(!edt_data->gsm_state))
 
 					return MFW_EVENT_CONSUMED;
@@ -7326,51 +7326,51 @@
 			}
 
 			/* If it's a hash, insert it into the editor */
-			
+
 			// change by Sasken ( Rashmi C N) on March 25th 2004
 			// Issue Number : MMI-SPR-15692
 			// Subject: Wrong entry in last dialed number.
-			// Bug : While saving PIN, if a hash is entered as a 
-			// delimiter/terminater, the hash is also getting stored 
-			// as  a part of pin. This makes it mandatory for the user 
+			// Bug : While saving PIN, if a hash is entered as a
+			// delimiter/terminater, the hash is also getting stored
+			// as  a part of pin. This makes it mandatory for the user
 			// to enter hash as delimiter/terminater while he is authenticating.
 			// Solution: Avoid copying the hash(delimiter/terminater) in to the pin array.
 			//			 Commenting the copying part below in the "if" block.
-			
-			// If it's a hash, insert it into the editor 
+
+			// If it's a hash, insert it into the editor
 			//if(kc->code EQ KCD_HASH)
 			//xrashmic 1 Jul, 2006 OMAPS00075784
-			//To fix the reset while entering the gsm sequence for unblocking 
+			//To fix the reset while entering the gsm sequence for unblocking
 			// the pin1 or pin2
 			if(!(strncmp((char*)edt_data->pin,"**052*",IDENT_GSM_2))||!(strncmp((char*)edt_data->pin,"**05*",IDENT_GSM_1)))
 
 			{
 				edt_data->pin[edt_data->editor_index] = HASH;
-				// SPR#1428 - SH - New Editor changes 
+				// SPR#1428 - SH - New Editor changes
 #ifdef NEW_EDITOR
 				ATB_edit_AsciiChar(edt_data->editor, edt_data->pin[edt_data->editor_index], TRUE);
-#else // NEW_EDITOR 
+#else // NEW_EDITOR
 				edtChar(edt_data->editor_handle,edt_data->pin[edt_data->editor_index]);
-#endif // NEW_EDITOR 
+#endif // NEW_EDITOR
 				edt_data->editor_index++;
 			}
 
-			
+
 
 			// We save the pin2 entered in to this global variable which we
-			// use while calling sAT_PlusCLCK(), while locking or unlocking ALS. 					
+			// use while calling sAT_PlusCLCK(), while locking or unlocking ALS.
 			memset(g_pin2,0,MAX_PIN+1);
 			if(edt_data->pin_case_edit EQ INPUT_PIN2 || edt_data->pin_case_edit EQ INPUT_NEW_PIN2)
 				strncpy(g_pin2,(char*)edt_data->pin,MAX_PIN);//xvilliva SPR17291
 			switch(edt_data->pin_case_edit)
 			{
-#ifdef SIM_PERS                
+#ifdef SIM_PERS
                 case INPUT_SIM_PLOCK:
              	  case  INPUT_SIM_FCPWD:
 		//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 		  case INPUT_SIM_MKPWD:
-                		
-#endif                            
+
+#endif
 			/* PIN1 and PIN2 */
 				case INPUT_PIN1:/* finish of PIN entering */
 				case INPUT_PIN2:
@@ -7378,7 +7378,7 @@
 					TRACE_EVENT("When 'Call' is pressed!");
 
 					/* PIN is long enough, finish editing */
-					
+
 					if ((strlen((char*)edt_data->pin) >= MIN_PIN)  && !(edt_data->gsm_state))
 					{
 						clear_edit_array(edt_data);	    /*	   clear editor array */
@@ -7391,7 +7391,7 @@
 							SEND_EVENT(pin_data->pin_win,PIN1_END,0,pin_data);
 						}
 
-#ifdef SIM_PERS                        
+#ifdef SIM_PERS
                          			else if(edt_data->pin_case_edit EQ INPUT_SIM_PLOCK)
                          			{
 						    set_pin_edt_destroy(edt_data->pin_edt_win);
@@ -7408,8 +7408,8 @@
                          			{
 						    set_pin_edt_destroy(edt_data->pin_edt_win);
 							SEND_EVENT(pin_data->pin_win,SIM_MKPWD_END,0,pin_data);
-						}	  
-                         
+						}
+
 #endif
 						else
 						{
@@ -7420,7 +7420,7 @@
 					else
 					{
 						if(kc->code EQ KCD_HASH)
-						{	
+						{
 							if (!(edt_data->gsm_state))	/* could become gsm */
 							{
 								check_pins(win,edt_data);
@@ -7444,7 +7444,7 @@
 					break;
 
 				/* PUK1 and PUK2 */
-				
+
 				case INPUT_PUK1:
 				case INPUT_PUK2:
 					if ((strlen((char*)edt_data->pin) >= MIN_PIN) && !(edt_data->gsm_state)) /* finish of PUK entering */
@@ -7453,7 +7453,7 @@
 						timer = FALSE;
 						strncpy((char*)edt_data->puk,(char*)edt_data->pin,MAX_PIN);/* store puk  */
 						strncpy((char*)pin_data->puk, (char*)edt_data->puk,MAX_PIN);
-						if( pin_data->pin_case EQ INPUT_PUK1) 
+						if( pin_data->pin_case EQ INPUT_PUK1)
 						{
 							    set_pin_edt_destroy(edt_data->pin_edt_win);
 								SEND_EVENT(pin_data->pin_win,INPUT_NEW_PIN,0,pin_data);/* entering new pin1 start*/
@@ -7467,7 +7467,7 @@
 					else
 					{
 						if(kc->code EQ KCD_HASH)
-						{		
+						{
 							if (!(edt_data->gsm_state))/* could become gsm	    */
 							{
 								check_pins(win,edt_data);
@@ -7485,7 +7485,7 @@
 						}
 					}
 					break;
-					
+
 				case INPUT_NEW_PIN:
 				case INPUT_NEW_PIN2:
 
@@ -7503,7 +7503,7 @@
 						    set_pin_edt_destroy(edt_data->pin_edt_win);       /* entering new pin1 again*/
 							SEND_EVENT(pin_data->pin_win,INPUT_NEW_PIN_AGAIN,0,pin_data);
 						}
-					
+
 				#ifdef SIM_PERS
 			             		else if(pin_data->pin_case EQ INPUT_NEW_SIM_PLOCK)
                                        	{
@@ -7520,7 +7520,7 @@
 					else
 					{
 						if(kc->code EQ KCD_HASH)
-						{	
+						{
 							if(!(edt_data->gsm_state)) /* could become gsm	    */
 							{
 								check_pins(win,edt_data);
@@ -7546,7 +7546,7 @@
 
 	#ifdef SIM_PERS
                             case INPUT_NEW_SIM_PLOCK_AGAIN:
-       #endif						
+       #endif
 				case INPUT_NEW_PIN_AGAIN:
 				case INPUT_NEW_PIN2_AGAIN:
 						if ((strlen((char*)edt_data->pin) >= MIN_PIN) && !(edt_data->gsm_state))
@@ -7582,13 +7582,13 @@
 									set_pin_edt_destroy(edt_data->pin_edt_win);
 									SEND_EVENT(pin_data->pin_win,NEW_PIN_FAIL,0,NULL);
 								}
-						#ifdef  SIM_PERS  
+						#ifdef  SIM_PERS
 								else if(pin_data->pin_case EQ INPUT_NEW_SIM_PLOCK_AGAIN)
 								{
                                         				set_pin_edt_destroy(edt_data->pin_edt_win);
                                         				SEND_EVENT(pin_data->pin_win,NEW_SIM_PLOCK_FAIL,0,NULL);
                                  				}
-                                        #endif		
+                                        #endif
 								else
 								{
 									set_pin_edt_destroy(edt_data->pin_edt_win);
@@ -7621,12 +7621,12 @@
 							}
 						}
 						break;
-					
+
 					default:
 						break;
 				}
 				break;
-				
+
 /* KCD_HUP */
 			case KCD_HUP:
 				if( edt_data->pin_case_edit != INPUT_PUK1)//xvilliva SPR13623
@@ -7640,7 +7640,7 @@
 
 /* KCD RIGHT */
 
-			case KCD_RIGHT: 	
+			case KCD_RIGHT:
 			//nm, go back to the submenu if there is no character on the screen
 				if(strlen((char*)edt_data->pin) == 0 && edt_data->pin_case_edit != INPUT_PUK1)//xvilliva SPR13623
 				{
@@ -7648,7 +7648,7 @@
 					timer = FALSE;
 					set_pin_edt_destroy(edt_data->pin_edt_win);
 		    		SEND_EVENT(pin_data->pin_win,SETT_ABORT,0,NULL); // abort settings menu
-					return 1;			    
+					return 1;
 				}
 
 				if(edt_data->editor_index EQ 0)
@@ -7677,7 +7677,7 @@
 					winShow(edt_data->pin_edt_win);
 				}
 			    break;
-			    
+
 			default:
 				break;
 		}
@@ -7711,8 +7711,8 @@
 			}
 			winShow(edt_data->pin_edt_win);
 			break;
-				
-	
+
+
 		case KCD_LEFT:
 
 			if(pin_emergency_call == TRUE)
@@ -7722,7 +7722,7 @@
 			}
 			break;
 
-		case KCD_RIGHT: 	
+		case KCD_RIGHT:
 
 //				if( edt_data->edtbuf == '\0' )
 //					break;
@@ -7755,7 +7755,7 @@
 
 			default:
 				break;
-			}	
+			}
 	}
 #endif /* SIM_PERS */
 	if (timer)
@@ -7786,7 +7786,7 @@
 			timStop(edt_data->tim_out_handle); /* stop entering timer	*/
 			clear_edit_array(edt_data);
 			memset(edt_data->pin,'\0',sizeof(edt_data->pin));/* initial string */
-			
+
 			/* SPR#1428 - SH - New Editor: string changed, update word-wrap*/
 	#ifdef NEW_EDITOR
 			ATB_edit_Refresh(edt_data->editor);
@@ -7801,7 +7801,7 @@
 
 /*******************************************************************************
 
- $Function:	check_set_pins 
+ $Function:	check_set_pins
  $Description:	check input string for settings
  $Returns:		void
  $Arguments:	window pin editor attributes
@@ -7816,7 +7816,7 @@
     {
 	    if (strlen((char*)edt_data->pin) > FIRST_DIGIT)	 /* for every character  */
 			gsm_set_test(win,edt_data);	/* test if GSM string or not*/
-		/*API - 10/10/02 - 1162 - check the value entered into the PIN editor to see if the 
+		/*API - 10/10/02 - 1162 - check the value entered into the PIN editor to see if the
 								  value being entered in is an emergency number.
 		*/
 		if (strlen((char*)edt_data->pin) EQ (MIN_PIN - 1) || strlen((char*)edt_data->pin) EQ (MIN_PIN -2))
@@ -7833,13 +7833,13 @@
 			{
 // Nov 24, 2005, a0876501, DR: OMAPS00045909
 				if((edt_data->pin_case_edit EQ CARD_REJECTED) OR (edt_data->pin_case_edit EQ INSERT_CARD)
-					OR (edt_data->pin_case_edit EQ SHOW_IMEI_INVALID)				
+					OR (edt_data->pin_case_edit EQ SHOW_IMEI_INVALID)
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS	
+#ifdef SIM_PERS
 					//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 					OR(edt_data->pin_case_edit EQ NO_MEPD_DATA)
-#endif					
+#endif
 					)
 				{			  /* delete all digits	    */
 					clear_edit_array (edt_data);  /*  clear editor array	 */
@@ -7854,13 +7854,13 @@
 		{
 // Nov 24, 2005, a0876501, DR: OMAPS00045909
 			if((edt_data->pin_case_edit EQ CARD_REJECTED) OR (edt_data->pin_case_edit EQ INSERT_CARD)
-				OR (edt_data->pin_case_edit EQ SHOW_IMEI_INVALID)				
+				OR (edt_data->pin_case_edit EQ SHOW_IMEI_INVALID)
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS					
+#ifdef SIM_PERS
 				//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 				OR (edt_data->pin_case_edit EQ NO_MEPD_DATA)
-#endif				
+#endif
 				)
 			{			  /* delete all digits	    */
 				clear_edit_array (edt_data);  /*  clear editor array	 */
@@ -7897,7 +7897,7 @@
 
 /*******************************************************************************
 
- $Function:	sett_pin_mess 
+ $Function:	sett_pin_mess
  $Description:	help function for message dialog
  $Returns:		void
  $Arguments:	window, event
@@ -8019,9 +8019,9 @@
 	T_DISPLAY_DATA display_info;
 
 //    U8 uMode;   /* Warning Correction */
-	
+
 	T_MFW_SIM_PIN_STATUS status; //need to check the Pin 1 status
-	
+
 	T_pin * pin_data = (T_pin *)parameter;
 #ifdef SIM_PERS
 T_MFW status1 = 0, status2;
@@ -8033,7 +8033,7 @@
   /*
    * depending on signal
    */
-	
+
   switch (event)
   {
 	case PIN1_REQ_ATT:
@@ -8051,7 +8051,7 @@
 	case PIN1_ENAB_END:
 	case PIN1_DISAB_END:
 	case PIN1_ENDIS_FAIL:
-#ifdef SIM_PERS     
+#ifdef SIM_PERS
     	case SIM_LOCK_ENDIS_FAIL:
       	case SIM_LOCK_ENDSUCC:
        case SIM_LOCK_FCPWD_FAIL:
@@ -8060,17 +8060,17 @@
     	case NEW_SIM_PLOCK_FAIL:
     	case SIM_LOCK_NEW_ENDSUCC:
     	case SIM_LOCK_NEW_ENDISFAIL:
-    	case SIM_LOCK_NEW_ENDSUCC_CKEY:	
+    	case SIM_LOCK_NEW_ENDSUCC_CKEY:
     	case SIM_LOCK_ALREADY_ENDIS:
     	case SIM_LOCK_SIM_REM:
-	case SMLK_SHOW_FC_FAIL1:	
+	case SMLK_SHOW_FC_FAIL1:
 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
        case SIM_LOCK_MKPWD_FAIL:	//Master unlock failed
        case SIM_LOCK_MKPWDSUCC:	//Master unlock success
        case SIM_LOCK_BUSY:			//Category unlock return with Busy error from ACI
        //x0pleel 26 July, 2006 ER: OMAPS00087586, OMAPS00087587
        case SIM_LOCK_BUSY_UNBLOCK: //ME unblock return Busy error from aCI
-#endif       
+#endif
 	case FDN_FAIL:
 	case FDN_ACT_END:
 	case FDN_DEACT_END:
@@ -8079,7 +8079,7 @@
 
 
 		dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtNull, TxtNull,  COLOUR_STATUS_PINS);
-		
+
 		switch(event)
 		{
 		   case PIN1_REQ_ATT:
@@ -8111,14 +8111,14 @@
            		  pin_data->pin_case = SIM_LOCK_NEW_ENDSUCC;
 			  display_info.TextId = TxtPsLockChanged;
 			  break;
-			  
+
 		  case SIM_LOCK_ENDSUCC:
 		  	  pin_data->pin_case = SIM_LOCK_ENDSUCC;
 			  if(pin_data->set_state == ENABLE)
 			  	display_info.TextId = TxtLockActivated;
 			  else if(pin_data->set_state == DISABLE)
 			  	display_info.TextId = TxtLockDeactivated;
-			  break;	
+			  break;
 
 		  case SIM_LOCK_ALREADY_ENDIS:
 		  	  pin_data->pin_case = SIM_LOCK_ALREADY_ENDIS;
@@ -8126,8 +8126,8 @@
 			  	display_info.TextId = TxtAlreadyLocked;
 			  else if(pin_data->set_state == DISABLE)
 			  	display_info.TextId = TxtAlreadyUnlocked;
-			  break;	
-		
+			  break;
+
 		case SIM_LOCK_NEW_ENDSUCC_CKEY:
 			 {
 				char buf1[20], buf2[20] ;
@@ -8136,7 +8136,7 @@
 				mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
 				pin_data->pin_case = SIM_LOCK_NEW_ENDSUCC_CKEY;
 				sprintf((char*)buf1,"%d attempts left",curr_succ_reset);
-				sprintf((char*)buf2,"%s", "FC Reset-Success");								
+				sprintf((char*)buf2,"%s", "FC Reset-Success");
 				display_info.TextString= buf1;
 				display_info.TextString2 = buf2;
 			 }
@@ -8149,7 +8149,7 @@
 				mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
 				pin_data->pin_case = PUK1_REQ;
 				sprintf((char*)buf1,"%d attempts left",curr_fail_reset);
-				sprintf((char*)buf2,"%s", "FC Reset-Failure");								
+				sprintf((char*)buf2,"%s", "FC Reset-Failure");
 				display_info.TextString= buf1;
 				display_info.TextString2 = buf2;
 				  break;
@@ -8161,11 +8161,11 @@
 				int curr_fail_reset, curr_succ_reset;
 				mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
 				sprintf((char*)buf1,"%d attempts left",curr_succ_reset);
-				sprintf((char*)buf2,"%s", "FC Reset-Success");								
+				sprintf((char*)buf2,"%s", "FC Reset-Success");
 				display_info.TextString= buf2;
 				display_info.TextString2 = buf1;
 			 }
-			  	break;			  	
+			  	break;
 
 		//x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
 		//Displays a dialog saying "master unlock success"
@@ -8176,7 +8176,7 @@
 				display_info.TextString= buf1;
 				display_info.TextString2 = 0;
 			 }
-			  	break;	
+			  	break;
 #endif
 
 		   case PUK1_REQ_VER_INFO:
@@ -8193,12 +8193,12 @@
 			  }
 			  display_info.TextId =TxtPINBlock;
 			  break;
-			  
+
 			case GSM_FAIL:
 			  if(pin_data->set_state EQ IDLE_GSM)
 				  pin_data->pin_case = IDLE_GSM_FAIL;
 			  display_info.TextId = TxtNotAcc;
-			  break;   
+			  break;
 		}
 		 switch(event)
 		 {
@@ -8231,7 +8231,7 @@
 			TRACE_FUNCTION("PIN_OK_INFO");
 			  pin_data->pin_case = PIN_OK;
 			  display_info.TextId = TxtPINOK;
-			  break;		   
+			  break;
 			case PUK1_UNBL_FAIL_INFO:
 			  if((pin_data->set_state EQ CHANGE_PIN2) ||
 				 (pin_data->set_state EQ PIN2_CHECK) ||
@@ -8263,7 +8263,7 @@
 				display_info.TextId = TxtNewPIN2;
 			  else
 				display_info.TextId = TxtNewPIN;
-			  pin_data->pin_case = UNBL_OK;    
+			  pin_data->pin_case = UNBL_OK;
 			  display_info.TextId2 = TxtChanged;
 			  break;
 			case PIN1_ENAB_END:
@@ -8298,7 +8298,7 @@
 			  else
 				display_info.TextId2 = TxtTwoAttemptsLeft;
 			  break;
-#ifdef SIM_PERS         
+#ifdef SIM_PERS
  case NEW_SIM_PLOCK_FAIL:
               pin_data->pin_case = INPUT_NEW_SIM_PLOCK;
 			  display_info.TextId = TxtPsLockConfWrong;
@@ -8320,7 +8320,7 @@
 					 }
 					 else
 					 	display_info.TextId = TxtCodeInc;
-			
+
 			}
 			//display_info.TextId=TxtPassword;
 			//display_info.TextId2 = TxtPassfailed;
@@ -8339,13 +8339,13 @@
 		  case SIM_LOCK_SIM_REM:
                  display_info.TextId=TxtNoCard;
                  break;
-		  
+
             case SIM_LOCK_ENDIS_FAIL:
              if(pin_data->set_state EQ DISABLE)
              {
-             		
+
 			char buf[20];
-			
+
 	              status1 = mfw_simlock_check_status(mmi_simlock_locktype,&max,&curr);
 			  if(status1 != MFW_SIM_BLOCKED && status1 != MFW_SIM_PERM_BLOCKED && ( max != 0xff))
 			  {
@@ -8360,12 +8360,12 @@
 			  }
 			  else
 			  	display_info.TextId = TxtCodeInc;
-		
+
               //display_info.TextId = TxtPsLockWrong;
               }
              else
              	{
-			display_info.TextId = TxtCodeInc;				
+			display_info.TextId = TxtCodeInc;
              	}
 		break;
 
@@ -8376,7 +8376,7 @@
 		display_info.TextId = TxtBusy;
 		break;
 
-		
+
 	//x0pleela 26 July, 2006 ER: OMAPS00087586, OMAPS00087587
 	//Displays a dialog saying "Busy" for wrong entry of unblocking password
 	case SIM_LOCK_BUSY_UNBLOCK:
@@ -8390,7 +8390,7 @@
 				int curr_fail_reset, curr_succ_reset;
 				mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
 				sprintf((char*)buf1,"%d attempts left",curr_fail_reset);
-				sprintf((char*)buf2,"%s", "FC Reset-Failure");								
+				sprintf((char*)buf2,"%s", "FC Reset-Failure");
 				display_info.TextString= buf2;
 				display_info.TextString2 = buf1;
 				  break;
@@ -8429,7 +8429,7 @@
 					display_info.TextId = TxtEnabled; /*Display the "Enabled Pin1 */
 				}
 
-		
+
 
 			  display_info.TextId2 = 0;
 			  display_info.TextString2 = 0;
@@ -8449,15 +8449,15 @@
                 display_info.TextString2 = 0;
                 break;
             /* Marcus: Issue 1609: 23/01/2003: End */
-			  
+
 		 	}
 
-#ifdef SIM_PERS 
+#ifdef SIM_PERS
     TRACE_EVENT_P1(" Status Bef: %d", status1);
     status1 = mfw_simlock_check_status(mmi_simlock_locktype,&max,&curr);
 	    status2 = mfw_simlock_check_status(0,&max1,&curr1);
 		TRACE_EVENT_P1("Status Aft: %d", status1);
-		
+
   	if(((event==SIM_LOCK_NEW_ENDISFAIL)||(event == SIM_LOCK_ENDIS_FAIL)) && (curr == 0))
     {
       TRACE_EVENT("SIM_LOCK_ENDIS_FAIL,MFW_SIM_BLOCKED");
@@ -8489,11 +8489,11 @@
 	set_pin_mess_destroy(mess_data->pin_mess_win);
 
 	info_dialog(pin_data->pin_win,&display_info); //information screen
-	//	Nov 03, 2005 DR: OMAPS00052032 - xpradipg  
+	//	Nov 03, 2005 DR: OMAPS00052032 - xpradipg
 	 dspl_Enable(1);
     }
 break;
-			
+
 #ifdef SIM_PERS
 	case PERM_BLK:
 		TRACE_FUNCTION("Enter PERM_BLK");
@@ -8504,14 +8504,14 @@
 		break;
 
 
-#endif 
+#endif
 	case PUK1_REQ:
 		TRACE_FUNCTION("Enter PUK_REQ");
-#ifdef SIM_PERS 
+#ifdef SIM_PERS
 		if( C_KEY_REQ )
 			pin_data->display_id1 = TxtUnblockCode;
 		else
-			
+
 #endif
 		pin_data->display_id1 = TxtEnterPuk1;
 		set_pin_mess_destroy(mess_data->pin_mess_win);
@@ -8524,7 +8524,7 @@
 		SEND_EVENT(pin_data->pin_win,TXT_ENTER_PIN1,0,pin_data);
 		break;
 
-#ifdef SIM_PERS        
+#ifdef SIM_PERS
        case TXT_SIM_LOCK_ALL:
        switch(mmi_simlock_locktype)
        {
@@ -8543,7 +8543,7 @@
 		case  MFW_SIM_PLOCK:
 			pin_data->display_id1 = TxtEnterPsLock;
 			break;
-	    //x0pleela 25 Sep, 2006 ER: OMAPS00095524			
+	    //x0pleela 25 Sep, 2006 ER: OMAPS00095524
 	    //Prompting user to enter Blocked Network password
 		case MFW_SIM_PBLOCK:
 			pin_data->display_id1 = TxtEnterPbLock;
@@ -8578,12 +8578,12 @@
 	case INPUT_NEW_PIN:
 #ifdef SIM_PERS
 		if(C_KEY_REQ)
-		{ 
-		
+		{
+
 			int sta;
 			int curr_fail_reset, curr_succ_reset;
-			
-			
+
+
 			mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
 
 			if( curr_succ_reset )
@@ -8597,8 +8597,8 @@
 
 				TRACE_EVENT_P1("Input_new_pin: %d", sta);
 				TRACE_EVENT_P1("set_pin_messages: C_KEY_REQ: %d", C_KEY_REQ);
-				
-				if(sta== MFW_SS_OK) 
+
+				if(sta== MFW_SS_OK)
 				{
 					if(FCUnlock_flag)
 						FCUnlock_flag=0;
@@ -8624,13 +8624,13 @@
 					{
 						SEND_EVENT(pin_data->pin_win,SIM_LOCK_BUSY_UNBLOCK,0,pin_data);
 					}
-													 
+
 			    		//x0pleela 27 Apr, 2006 DR: OMAPS00067919
 			    		//To avoid executing this during bootup sequence
 			    		else if( curr_fail_reset != 0)
 						SEND_EVENT(pin_data->pin_win,SMLK_SHOW_FC_FAIL1,0,pin_data);
 
-					else 
+					else
 					{
 						perm_blocked =1;
 						SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
@@ -8701,7 +8701,7 @@
 	default:
 		break;
   }
-		
+
 }
 
 
@@ -8744,19 +8744,19 @@
 		case SETT_ABORT:        // Marcus: Issue 1609: 23/01/2003
 			SEND_EVENT(pin_data->pin_win,identifier,0,NULL);//pin_main data !!
 			break;
-		default:		
+		default:
 		switch (reasons)
 		{
 			case INFO_KCD_LEFT:
 			case INFO_KCD_RIGHT:
-		
+
 			case INFO_TIMEOUT:
 #ifdef SIM_PERS
 			{
 			        pin_skClear();
 				setting_pin_destroy(pin_data->pin_win);// destroy pin settings dialog
 			}
-		
+
 #else
 			dspl_ClearAll();
 #endif /* SIM_PERS*/
@@ -8769,10 +8769,10 @@
 
 /*******************************************************************************
 
- $Function:	gsm_set_test 
+ $Function:	gsm_set_test
  $Description:	test if gsm string
  $Returns:		status int
- $Arguments:	win, pin editor attributes 
+ $Arguments:	win, pin editor attributes
 *******************************************************************************/
 static int gsm_set_test(T_MFW_HND win,void * edt_pin)
 {
@@ -8963,8 +8963,8 @@
 				}
 			return status;
 		case MFW_SS_DIAL:	       /* string not yet detected  */
-        case MFW_SS_USSD:  /*JVJ SPR 1040- The short USSD strings should also be 
-                              considered in this case, since they can be confused with dialled numbers  
+        case MFW_SS_USSD:  /*JVJ SPR 1040- The short USSD strings should also be
+                              considered in this case, since they can be confused with dialled numbers
                              */
 				edt_data->gsm_state = FALSE;
 			return status;
@@ -9047,7 +9047,7 @@
 
 /*******************************************************************************
 
- $Function:	pin2_check 
+ $Function:	pin2_check
  $Description:	PIN2 check :call from menu Services and Phonebook
  $Returns:		status int
  $Arguments:	parent window
@@ -9063,10 +9063,10 @@
 		{
 		win_data = ((T_MFW_HDR *)win)->data;
 		pin_data = (T_pin *)win_data->user;
-	
+
 //		T_DISPLAY_DATA display_info;
-		
-	
+
+
 		pin_data->set_state = PIN2_CHECK;
 
 	TRACE_FUNCTION("MmiPins:pin2_check");
@@ -9096,10 +9096,10 @@
 
 
 
-	
-/*******************************************************************************
-
- $Function:	pin1_check 
+
+/*******************************************************************************
+
+ $Function:	pin1_check
  $Description:	PIN1 check :call from menu Services (AOC)
  $Returns:		status int
  $Arguments:	parent window
@@ -9150,7 +9150,7 @@
 
 /*******************************************************************************
 
- $Function:	fdnDeactivate 
+ $Function:	fdnDeactivate
  $Description:	deactivate FDN
  $Returns:		status int
  $Arguments:	menu, item
@@ -9166,7 +9166,7 @@
 
 /*******************************************************************************
 
- $Function:	set_fdn_on_item_flag 
+ $Function:	set_fdn_on_item_flag
  $Description:	decision about menu entry FDN "on"
  $Returns:		0 if show entry, 1 if not
  $Arguments:	menu, menu attributes, item
@@ -9204,7 +9204,7 @@
 
 /*******************************************************************************
 
- $Function:	gsm_idle 
+ $Function:	gsm_idle
  $Description:	handle gsm string in idle screen (unblock and change pin)
  $Returns:		Status int
  $Arguments:	parent window, string
@@ -9255,13 +9255,13 @@
 			clear_edit_array (edt_data);
 			pin_edt_destroy(edt_data->pin_edt_win);
 			//xrashmic 1 Jul, 2006 OMAPS00075784
-			//After the PUK is verified, security menu has to be displayed. 
-			//Hence we need to delete the pin window or else the blue  
+			//After the PUK is verified, security menu has to be displayed.
+			//Hence we need to delete the pin window or else the blue
 			//screen is displayed
 			//xrashmic 6 Jul, 2006 OMAPS00080708
 			//The pin window is necessary for displaying the error message for MFW_SS_FAIL
 			if(result!=MFW_SS_FAIL)
-			pin_destroy(pin_data->pin_win);		
+			pin_destroy(pin_data->pin_win);
 		}
 		else
 			result = ss_execute_transaction((UBYTE*)string,0);/* ussd_man = 0 while SSD */
@@ -9288,12 +9288,12 @@
 
  $Function:	pins_editor_cb
 
- $Description:	
-
- $Returns:		
-
- $Arguments:	
- 
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 static void pins_editor_cb (T_MFW_HND win, USHORT Identifier, SHORT reason)
@@ -9313,13 +9313,13 @@
 	 * the editor has not been destroyed at this point.
 	 * BUT in all other cases it has, so we need to set the
 	 * editor handle to NULL. */
-	 
+
 // Nov 24, 2005, a0876501, DR: OMAPS00045909
-	if (Identifier!=INSERT_CARD && Identifier!=CARD_REJECTED 
-		&& Identifier!=SHOW_IMEI_INVALID		
+	if (Identifier!=INSERT_CARD && Identifier!=CARD_REJECTED
+		&& Identifier!=SHOW_IMEI_INVALID
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS			
+#ifdef SIM_PERS
 		//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 		&& Identifier != NO_MEPD_DATA
 #endif
@@ -9331,41 +9331,41 @@
 	switch (reason)
 	{
 
-		case INFO_EMERGENCY:		
-			TRACE_EVENT_P1(" call %s", data->edtbuf);	
+		case INFO_EMERGENCY:
+			TRACE_EVENT_P1(" call %s", data->edtbuf);
 
 			/* SPR#1746 - SH - Function modified to provide context */
 			show_confirmation (win, Identifier);
 
 			break;
-			
+
 		case INFO_KCD_LEFT:
 			switch (Identifier)
 			{
 
 				case PIN1_REQ:
-				{	TRACE_EVENT ("PIN1_REQ");			
+				{	TRACE_EVENT ("PIN1_REQ");
 
 		    // verification pin1
-					sim_verify_pin(MFW_SIM_PIN1, data->edtbuf);  
+					sim_verify_pin(MFW_SIM_PIN1, data->edtbuf);
 				}
 					break;
 #ifdef SIM_PERS
 					case PERM_BLK:
 						break;
 #endif
-				case PUK1_REQ:					
+				case PUK1_REQ:
 				{
 #ifdef SIM_PERS
 					int status,curr_fail_reset, curr_succ_reset;
-					
+
 					TRACE_FUNCTION ("PUK1-REQ");
-					strncpy((char*)pin_data->puk, data->edtbuf,MAX_PIN);  
+					strncpy((char*)pin_data->puk, data->edtbuf,MAX_PIN);
 					status = mfw_simlock_check_status(0, &curr_fail_reset, &curr_succ_reset);
 //	Nov 03, 2005 DR: OMAPS00050595 - xpradipg
-//	the check for C_KEY_REQ is made first to find if the PUK request was for 
+//	the check for C_KEY_REQ is made first to find if the PUK request was for
 //	SIM Personalization or for the SIM PIN1
-					
+
 			if(C_KEY_REQ)
 			{
 				if((curr_fail_reset!=0) && (curr_succ_reset!=0) )
@@ -9378,11 +9378,11 @@
 						else
 						{
 							TRACE_FUNCTION("FCUnlock_flag: FALSE");
-                            
+
 						       // June 07, 2006    DR: OMAPS00080701   x0021334
                                                  // Descripton: Phone hangs while unblocking SIMP during bootup.
                                                  // Assign 'SIMP_BOOTUP' to 'sim_unlock_in_prog' to indicate that
-                                                 // the operation is happeneing during boot-up sequence. 
+                                                 // the operation is happeneing during boot-up sequence.
 						       sim_unlock_in_prog = SIMP_BOOTUP;
 							status= mfw_simlock_reset_fc_value((U8*)pin_data->puk,MFW_SIM_FC);
 						}
@@ -9395,7 +9395,7 @@
 
 							if((aciErrDesc & 0x0000FFFF) EQ CME_ERR_SimNotIns)
 						     	 SEND_EVENT(pin_data->pin_win,SIM_LOCK_SIM_REM,0,pin_data);
-	
+
 							//x0pleela 11 Sep, 2006  DR: OMASP00094215
 							//Handling CME error busy while unlocking a locked category
 							else if( ( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext) AND
@@ -9418,7 +9418,7 @@
 								}
 							}
 						}
-					 	else 
+					 	else
 						{
 							TRACE_FUNCTION("UNBLOCK_SUCESS");
 							if(FCUnlock_flag)
@@ -9445,12 +9445,12 @@
 				}
 			else
 			{
-#endif			
-				strncpy((char*)pin_data->puk, data->edtbuf,MAX_PIN);  
+#endif
+				strncpy((char*)pin_data->puk, data->edtbuf,MAX_PIN);
 				SEND_EVENT(pin_data->pin_win,INPUT_NEW_PIN,0,pin_data);
 #ifdef SIM_PERS
 			}
-#endif				
+#endif
 		}
 					break;
 
@@ -9460,22 +9460,22 @@
 				case INPUT_MASTER_KEY_REQ:
 				{
 					int status;
-					strncpy((char*)pin_data->mk_pin, data->edtbuf,MAX_PIN);  
+					strncpy((char*)pin_data->mk_pin, data->edtbuf,MAX_PIN);
 					status = mfw_simlock_master_unlock((U8*)pin_data->mk_pin, MFW_SIM_MKEY);
 					if( status EQ MFW_SS_OK )
 						SEND_EVENT(pin_data->pin_win, SMLK_SHOW_MK_SUCC, 0, pin_data);
 
 					//x0pleela 13 Nov, 2006 DR: OMAPS00103356
-					//send wrong password event 
-					else if ( status EQ MFW_WRONG_PWD) 
+					//send wrong password event
+					else if ( status EQ MFW_WRONG_PWD)
 						SEND_EVENT(pin_data->pin_win, SMLK_SHOW_WRONG_PWD, 0, pin_data);
 					//x0pleela 13 Nov, 2006 DR: OMAPS00103356
 					//send event which says all the dependent categories are unlocked
-					else if ( status EQ MFW_MASTER_OK) 
+					else if ( status EQ MFW_MASTER_OK)
 						SEND_EVENT(pin_data->pin_win, SMLK_SHOW_DEP_CATS_UNLOCKED, 0, pin_data);
 					else
 						SEND_EVENT(pin_data->pin_win, SMLK_SHOW_MK_FAIL, 0, pin_data);
-					
+
 				}
 				break;
 
@@ -9483,7 +9483,7 @@
 				case INPUT_NLOCK_PIN_REQ:
 				case INPUT_NSLOCK_PIN_REQ:
 				case INPUT_SPLOCK_PIN_REQ:
-				case INPUT_CLOCK_PIN_REQ: 
+				case INPUT_CLOCK_PIN_REQ:
 				//x0pleela 25 Sep, 2006 ER: OMAPS00095524
 				case INPUT_PBLOCK_PIN_REQ:
 				{
@@ -9496,11 +9496,11 @@
 					{
 						perm_blocked =1;
 						SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
-					}	
+					}
 					else
 					{
-					
-						strncpy((char*)pin_data->puk, data->edtbuf,MAX_PIN);  
+
+						strncpy((char*)pin_data->puk, data->edtbuf,MAX_PIN);
 						//for CPIN to CLCK change
 						switch(Identifier)
 						{
@@ -9516,14 +9516,14 @@
 							case INPUT_SPLOCK_PIN_REQ:
 								lcktype=MFW_SIM_SPLOCK;
 								break;
-							case INPUT_CLOCK_PIN_REQ: 
+							case INPUT_CLOCK_PIN_REQ:
 								lcktype=MFW_SIM_CLOCK;
 								break;
 
 							//x0pleela 25 Sep, 2006 ER: OMAPS00095524
 							case INPUT_PBLOCK_PIN_REQ:
 								lcktype=MFW_SIM_PBLOCK;
-								break;								
+								break;
 						}
 						ret = mfw_simlock_check_lock_bootup((char*)pin_data->puk, lcktype);
 						//x0pleela 20 july, 2006 ER: OMAPS00087586, OMAPS00087587
@@ -9535,7 +9535,7 @@
 							simp_cpin_flag = FALSE;
 							SEND_EVENT(pin_data->pin_win,SIM_LOCK_PERS_CHK_OK,0,pin_data);
 						}
-						else if (ret ==BOOTUP_OK) 
+						else if (ret ==BOOTUP_OK)
 						{
 						  sim_simlock_cpin_code (simp_cpin_code);
 						}
@@ -9554,7 +9554,7 @@
 									//send event to display a dialog Busy for the user
 									SEND_EVENT(pin_data->pin_win,SIM_LOCK_BUSY_BOOTUP,0,pin_data);
 								}
-								    //x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+								    //x0pleela 25 Sep, 2006 ER: OMAPS00095524
 								    //check for CME class and handle all CME errors
 								else if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Cme)
 								{
@@ -9563,8 +9563,8 @@
 										case CME_ERR_NetworkPersPinReq:
 											TRACE_EVENT("CME_ERR_NetworkPersPinReq");
 											//x0pleela 20 July, 2006
-											//check for Master Unlock option enabled. 
-											//If so, then display the menu with options Network unlock and Master Unlock	
+											//check for Master Unlock option enabled.
+											//If so, then display the menu with options Network unlock and Master Unlock
 											if( simlock_get_masterkey_status())
 											{
 												mmi_simlock_locktype = MFW_SIM_NLOCK;
@@ -9573,12 +9573,12 @@
 											else
 												SEND_EVENT(pin_data->pin_win,INPUT_NLOCK_PIN_REQ,0,pin_data);
 										break;
-											
+
 										case CME_ERR_NetworkSubsetPersPinReq:
 											TRACE_EVENT("CME_ERR_NetworkSubsetPersPinReq");
 											//x0pleela 20 July, 2006
-											//check for Master Unlock option enabled. 
-											//If so, then display the menu with options Network subset unlock and Master Unlock	
+											//check for Master Unlock option enabled.
+											//If so, then display the menu with options Network subset unlock and Master Unlock
 											if( simlock_get_masterkey_status())
 											{
 												mmi_simlock_locktype = MFW_SIM_NSLOCK;
@@ -9587,12 +9587,12 @@
 											else
 												SEND_EVENT(pin_data->pin_win,INPUT_NSLOCK_PIN_REQ,0,pin_data);
 										break;
-											
+
 										case CME_ERR_ProviderPersPinReq:
 											TRACE_EVENT("CME_ERR_ProviderPersPinReq");
 											//x0pleela 20 July, 2006
-											//check for Master Unlock option enabled. 
-											//If so, then display the menu with options service provider unlock and Master Unlock	
+											//check for Master Unlock option enabled.
+											//If so, then display the menu with options service provider unlock and Master Unlock
 											if( simlock_get_masterkey_status())
 											{
 												mmi_simlock_locktype = MFW_SIM_SPLOCK;
@@ -9601,12 +9601,12 @@
 											else
 												SEND_EVENT(pin_data->pin_win,INPUT_SPLOCK_PIN_REQ,0,pin_data);
 										break;
-											
+
 										case CME_ERR_CorporatePersPinReq:
 											TRACE_EVENT("CME_ERR_CorporatePersPinReq");
 											//x0pleela 20 July, 2006
-											//check for Master Unlock option enabled. 
-											//If so, then display the menu with options Corporate unlock and Master Unlock	
+											//check for Master Unlock option enabled.
+											//If so, then display the menu with options Corporate unlock and Master Unlock
 											if( simlock_get_masterkey_status())
 											{
 												mmi_simlock_locktype = MFW_SIM_CLOCK;
@@ -9615,12 +9615,12 @@
 											else
 												SEND_EVENT(pin_data->pin_win,INPUT_CLOCK_PIN_REQ,0,pin_data);
 										break;
-											
+
 										case CME_ERR_PhSimPinReq:
 											TRACE_EVENT("CME_ERR_PhSimPinReq");
 											//x0pleela 20 July, 2006
-											//check for Master Unlock option enabled. 
-											//If so, then display the menu with options SIM unlock and Master Unlock	
+											//check for Master Unlock option enabled.
+											//If so, then display the menu with options SIM unlock and Master Unlock
 											if( simlock_get_masterkey_status())
 											{
 												mmi_simlock_locktype = MFW_SIM_PLOCK;
@@ -9644,8 +9644,8 @@
 											{
 												C_KEY_REQ = 1;
 												//x0pleela 20 July, 2006
-												//check for Master Unlock option enabled. 
-												//If so, then display the menu with options Unblock ME and Master Unlock	
+												//check for Master Unlock option enabled.
+												//If so, then display the menu with options Unblock ME and Master Unlock
 											if( simlock_get_masterkey_status())
 											{
 											  	pin_data->simp_list_win = mmi_simlock_category_menus(win);
@@ -9657,9 +9657,9 @@
 											{
 												perm_blocked =1;
 												SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
-											}	
+											}
 										}
-										break;	
+										break;
 
 
 										case CME_ERR_WrongPasswd:
@@ -9669,7 +9669,7 @@
 											break;
 									}
 							}
-							    //x0pleela 25 Sep, 2006 ER: OMAPS00095524	
+							    //x0pleela 25 Sep, 2006 ER: OMAPS00095524
 							    //check for Ext class and handle all Extension errors
 							else if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext)
 							{
@@ -9687,7 +9687,7 @@
 											SEND_EVENT(pin_data->pin_win,INPUT_PBLOCK_PIN_REQ,0,pin_data);
 									break;
 
-									//Request for Blocked Network Unblock code 
+									//Request for Blocked Network Unblock code
 									case EXT_ERR_BlockedNetworkPersPukReq:
 									{
 										int status,curr_fail_reset, curr_succ_reset;
@@ -9697,8 +9697,8 @@
 										if( status==MFW_SIM_BLOCKED)
 										{
 											C_KEY_REQ = 1;
-											//check for Master Unlock option enabled. 
-											//If so, then display the menu with options Unblock ME and Master Unlock	
+											//check for Master Unlock option enabled.
+											//If so, then display the menu with options Unblock ME and Master Unlock
 											if( simlock_get_masterkey_status())
 											{
 												pin_data->simp_list_win = mmi_simlock_category_menus(win);
@@ -9710,24 +9710,24 @@
 										{
 											perm_blocked =1;
 											SEND_EVENT(pin_data->pin_win,PERM_BLK,0,pin_data);
-										}	
+										}
 									}
-									break;	
+									break;
 
 									default:
 										break;
 								}
 							}
-					   	}	
+					   	}
 					}
 				}
 			}
 				break;
 #endif
-					
-				case INPUT_NEW_PIN:	
-				{	TRACE_EVENT ("INPUT_NEW_PIN");	
-					strncpy((char*)pin_data->new_pin, data->edtbuf,MAX_PIN);  
+
+				case INPUT_NEW_PIN:
+				{	TRACE_EVENT ("INPUT_NEW_PIN");
+					strncpy((char*)pin_data->new_pin, data->edtbuf,MAX_PIN);
 					SEND_EVENT(pin_data->pin_win,INPUT_NEW_PIN_AGAIN,0,pin_data);
 				}
 					break;
@@ -9744,7 +9744,7 @@
 					break;
 			}
 			break;
-					
+
 	    case INFO_KCD_RIGHT:
 	    case INFO_KCD_CLEAR:
 
@@ -9766,12 +9766,12 @@
 
  $Function:	call emergency confirmation
 
- $Description:	 
- 
- $Returns:		
-
- $Arguments:	
-				
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 /* SPR#1746 - SH - Add 'Identifier' so previous context is known */
@@ -9808,12 +9808,12 @@
 
  $Function:	idle_imei_info_cb
 
- $Description:	 
- 
- $Returns:		
-
- $Arguments:	
-				
+ $Description:
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 
 
@@ -9824,7 +9824,7 @@
 	T_MFW_WIN   * win_data = ((T_MFW_HDR *) win)->data;
 	T_pin	      * data	 = (T_pin *)win_data->user;
 
-    switch (reason)	 
+    switch (reason)
    {
 
 	case INFO_KCD_LEFT:
@@ -9832,9 +9832,9 @@
 				pin_emergency_call = TRUE;
 
 			// call emergency number
-			callNumber ((UBYTE*)data->edtbuf);			
+			callNumber ((UBYTE*)data->edtbuf);
 	  break;
-	  
+
 	case INFO_KCD_HUP:
 	case INFO_KCD_RIGHT:
 		pin_emergency_call = FALSE;
@@ -9842,7 +9842,7 @@
 		/* SPR#1746 - SH - Now use identifier to return to previous context.
 		 * If the editor handle is not NULL, the editor is still hanging around.
 		 * We want to restart the editor, so we'll destroy it first. */
-		 
+
 		if (pin_editor_window)
 		{
 #ifdef NEW_EDITOR
@@ -9866,14 +9866,14 @@
 			identifier = INVALID_IMEI;
 //x0pleela 18 Oct, 2006 DR: OMAPS00099660
 //Added the following code inside the SIM_PERS flag
-#ifdef SIM_PERS			
+#ifdef SIM_PERS
 				//x0pleela 30 Aug, 2006 DR: OMAPS00091250
 		else if( identifier == NO_MEPD_DATA )
 			identifier = NO_MEPD;
 #endif
 
 		/* Restart the appropriate editor */
-		SEND_EVENT(win, identifier, 0, data);		
+		SEND_EVENT(win, identifier, 0, data);
 		break;
     }
 
@@ -9884,11 +9884,11 @@
  $Function:	pins_loadEditDefault
 
  $Description:	fill up editor-sttribut with default
- 
- $Returns:		
- 
- $Arguments:		
-				
+
+ $Returns:
+
+ $Arguments:
+
 *******************************************************************************/
 //GW-SPR#844 - Zero editor data structure to reset all values to a known state.
 
@@ -9903,7 +9903,7 @@
 		AUI_edit_SetEvents(editor_data, Identifier, TRUE, FOREVER, (T_AUI_EDIT_CB)pins_editor_cb);
 		if (pin1Flag EQ TRUE)   // June 16, 2005  REF: CRR 31267  x0021334
 			AUI_edit_SetTextStr(editor_data, TxtSoftOK, TxtDelete, TitleId, NULL); //display RSK as delete
-		else																  
+		else
 			AUI_edit_SetTextStr(editor_data, TxtSoftOK, TxtSoftBack, TitleId, NULL); // display RSK as back
 		AUI_edit_SetAltTextStr(editor_data, 4, TxtNull,  TRUE, TxtNull);
 
@@ -9914,7 +9914,7 @@
 {
 		TRACE_EVENT ("pins_loadEditDefault()");
 		memset(editor_data,0x00,sizeof(T_EDITOR_DATA));
-		
+
 		editor_attr_init(&editor_data->editor_attr, PASSWORD_EDITOR, edtCurBar1, NULL, NULL, 0, COLOUR_EDITOR_XX);
 
 		editor_data->hide			    = FALSE;
@@ -9924,8 +9924,8 @@
 		editor_data->LeftSoftKey	  = TxtSoftSelect;
 		editor_data->AlternateLeftSoftKey   = TxtNull;
 		editor_data->RightSoftKey	  = TxtSoftBack;
-		editor_data->TextId		 = '\0';  
-		editor_data->TextString 	  = NULL;  
+		editor_data->TextId		 = '\0';
+		editor_data->TextString 	  = NULL;
 		editor_data->min_enter		     = 1;  // Avoid to return empty strings
 	    editor_data->timeout	      = FOREVER;
 		editor_data->Callback		  = (T_EDIT_CB)pins_editor_cb;
@@ -9937,7 +9937,7 @@
 //Clear PIN area
 void pin_rectClear( MfwRect *win )
 {
-	
+
 	dspl_Clear(win->px,win->py,win->px+win->sx-1,win->py+win->sy-1);
 }
 void pin_skClear( void )
@@ -9961,9 +9961,9 @@
  $Function:	getBootUpState
 
  $Description:	 returns the current state during bootup
- 
+
  $Returns:		T_BOOTUP_STATE
- 
+
  $Arguments:		None
 
 //xashmic 21 Sep 2006, OMAPS00095831
@@ -9987,21 +9987,21 @@
     UBYTE phlock_status, auto_phlock_status;
     T_MFW_WIN * win_data = NULL;
     T_pin * pin_data = NULL;
-	
-       TRACE_FUNCTION("phLock_Enable_Lock"); 
-	   
-    if(win != NULL) 
+
+       TRACE_FUNCTION("phLock_Enable_Lock");
+
+    if(win != NULL)
     {
 	win_data = ((T_MFW_HDR *)win)->data;
 	pin_data = (T_pin *)win_data->user;
 
 	//x0pleela 23 May, 2007  DR: OMAPS00132483
 	//stop the audio file if playing
-#ifdef FF_MMI_AUDIO_PROFILE				
+#ifdef FF_MMI_AUDIO_PROFILE
 	if( mfwAudPlay)
 	{
 		// Stopping the current ring tone.
-		#ifdef FF_MIDI_RINGER  
+		#ifdef FF_MIDI_RINGER
 			mfw_ringer_stop(sounds_midi_ringer_stop_cb);
 		#endif
 	}
@@ -10011,7 +10011,7 @@
     	phlock_status= mfw_phlock_get_lock_status(MFW_PH_LOCK);
     	//check the status of Automatic Phone lock
     	auto_phlock_status = mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK);
-    	
+
 	//x0pleela 28 May, 2007  DR: OMAPS132483
 	//set the phonelock and auto ph lock status to TRUE if lock is enabled
 	if( phlock_status EQ MFW_PH_LOCK_DISABLE)
@@ -10023,15 +10023,15 @@
 		mfw_set_Auto_Phlock_status(FALSE);
 	else
 		mfw_set_Auto_Phlock_status(TRUE);
-	
+
     	pin_data->set_state = ENABLE;
 
-	if( (phlock_status EQ MFW_PH_LOCK_DISABLE) && 
+	if( (phlock_status EQ MFW_PH_LOCK_DISABLE) &&
 	     (auto_phlock_status EQ MFW_PH_LOCK_DISABLE))/*if Phone lock is disabled*/
-	{	
-       	SEND_EVENT(pin_data->pin_win,TXT_PH_LOCK_ALL,0,pin_data);	
+	{
+       	SEND_EVENT(pin_data->pin_win,TXT_PH_LOCK_ALL,0,pin_data);
      	}
-	else 
+	else
 	        SEND_EVENT(pin_data->pin_win,PH_LOCK_ALREADY_ENDIS,0,pin_data);
     }
 	return 1;
@@ -10052,21 +10052,21 @@
     T_pin * pin_data = NULL;
 	T_MFW_SS_RETURN ret;
 	T_DISPLAY_DATA display_info;
-	
-       TRACE_FUNCTION("phLock_Lock"); 
-
-    if(win != NULL) 
+
+       TRACE_FUNCTION("phLock_Lock");
+
+    if(win != NULL)
     {
 	win_data = ((T_MFW_HDR *)win)->data;
 	pin_data = (T_pin *)win_data->user;
 
 //x0pleela 23 May, 2007  DR: OMAPS00132483
 	//stop the audio file if playing
-#ifdef FF_MMI_AUDIO_PROFILE				
+#ifdef FF_MMI_AUDIO_PROFILE
 	if( mfwAudPlay)
 	{
 		// Stopping the current ring tone.
-		#ifdef FF_MIDI_RINGER  
+		#ifdef FF_MIDI_RINGER
 			mfw_ringer_stop(sounds_midi_ringer_stop_cb);
 		#endif
 	}
@@ -10075,11 +10075,11 @@
     	slock_status= mfw_phlock_get_lock_status(MFW_PH_LOCK);
 
 	if(slock_status EQ MFW_PH_LOCK_DISABLE) /*if Phone lock is enabled*/
-      {	
-        ret = mfw_phlock_enable_lock(NULL, MFW_PH_LOCK); 
+      {
+        ret = mfw_phlock_enable_lock(NULL, MFW_PH_LOCK);
 
 		if ( ret == MFW_SS_FAIL)
-		{	
+		{
 		        SEND_EVENT(pin_data->pin_win,PH_LOCK_EN_FAIL,0,pin_data);
 		}
 		else if( ret == MFW_EXCT)
@@ -10114,21 +10114,21 @@
     UBYTE slock_status;
     T_MFW_WIN * win_data = NULL;
     T_pin * pin_data = NULL;
-	
-       TRACE_FUNCTION("phLock_UnLock"); 
-
-    if(win != NULL) 
+
+       TRACE_FUNCTION("phLock_UnLock");
+
+    if(win != NULL)
     {
 	win_data = ((T_MFW_HDR *)win)->data;
 	pin_data = (T_pin *)win_data->user;
 
 	//x0pleela 23 May, 2007  DR: OMAPS00132483
 		//stop the audio file if playing
-#ifdef FF_MMI_AUDIO_PROFILE				
+#ifdef FF_MMI_AUDIO_PROFILE
 	if( mfwAudPlay)
 	{
 		// Stopping the current ring tone.
-		#ifdef FF_MIDI_RINGER  
+		#ifdef FF_MIDI_RINGER
 			mfw_ringer_stop(sounds_midi_ringer_stop_cb);
 		#endif
 	}
@@ -10139,10 +10139,10 @@
     	pin_data->set_state = DISABLE;
 
 	if(slock_status EQ MFW_PH_LOCK_ENABLE) /*if Phone lock is disabled*/
-    {	
-        SEND_EVENT(pin_data->pin_win,TXT_PH_LOCK_ALL,0,pin_data);	
+    {
+        SEND_EVENT(pin_data->pin_win,TXT_PH_LOCK_ALL,0,pin_data);
      }
-    else 
+    else
         SEND_EVENT(pin_data->pin_win,PH_LOCK_ALREADY_ENDIS,0,pin_data);
     	}
 	return 1;
@@ -10161,22 +10161,22 @@
 	UBYTE slock_status;
 	T_MFW_WIN * win_data = NULL;
 	T_pin * pin_data = NULL;
-	
+
 	TRACE_FUNCTION("phLock_Automatic_On");
 	autoPhLock_menu = TRUE;
-	   
-    if(win != NULL) 
+
+    if(win != NULL)
     {
 	win_data = ((T_MFW_HDR *)win)->data;
 	pin_data = (T_pin *)win_data->user;
 
 //x0pleela 23 May, 2007  DR: OMAPS00132483
 	//stop the audio file if playing
-#ifdef FF_MMI_AUDIO_PROFILE				
+#ifdef FF_MMI_AUDIO_PROFILE
 	if( mfwAudPlay)
 	{
 		// Stopping the current ring tone.
-		#ifdef FF_MIDI_RINGER  
+		#ifdef FF_MIDI_RINGER
 			mfw_ringer_stop(sounds_midi_ringer_stop_cb);
 		#endif
 	}
@@ -10187,10 +10187,10 @@
     	pin_data->set_state = ENABLE;
 
 	if(slock_status EQ MFW_PH_LOCK_DISABLE) /*if Phone lock is disabled*/
-    {	
-        SEND_EVENT(pin_data->pin_win,TXT_PH_LOCK_ALL,0,pin_data);	
+    {
+        SEND_EVENT(pin_data->pin_win,TXT_PH_LOCK_ALL,0,pin_data);
      }
-    else 
+    else
         SEND_EVENT(pin_data->pin_win,PH_LOCK_ALREADY_ENDIS,0,pin_data);
     	}
 	return 1;
@@ -10206,15 +10206,15 @@
 {
 	int status;
 
-	TRACE_FUNCTION("phLock_Automatic_Off"); 
+	TRACE_FUNCTION("phLock_Automatic_Off");
 
 	//x0pleela 23 May, 2007  DR: OMAPS00132483
 		//stop the audio file if playing
-#ifdef FF_MMI_AUDIO_PROFILE				
+#ifdef FF_MMI_AUDIO_PROFILE
 	if( mfwAudPlay)
 	{
 		// Stopping the current ring tone.
-		#ifdef FF_MIDI_RINGER  
+		#ifdef FF_MIDI_RINGER
 			mfw_ringer_stop(sounds_midi_ringer_stop_cb);
 		#endif
 	}
@@ -10223,27 +10223,27 @@
 	status = mfw_phlock_disable_autoLock(MFW_AUTO_PH_LOCK);
 	if( status == MFW_SS_OK )
 	{
-		//x0pleela 09 Mar, 2007  DR: OMAPS00129014	
+		//x0pleela 09 Mar, 2007  DR: OMAPS00129014
 		//set the flag to FALSE
-		phlock_auto = FALSE;	
-		
+		phlock_auto = FALSE;
+
 		//x0pleela 28 May, 2007   DR: OMAPS00132483
 		//Set the auto phone lock status to FALSE
 		mfw_set_Auto_Phlock_status(FALSE);
-		
+
 		mmi_phlock_show_info(0, TxtAutoLockDisable, TxtSuccess, NULL);
 	}
 	else if ( status == MFW_SS_ALRDY_DIS )
-		mmi_phlock_show_info(0, TxtPhoneLock, TxtAlreadyDisabled, NULL);   
+		mmi_phlock_show_info(0, TxtPhoneLock, TxtAlreadyDisabled, NULL);
 	else
-		mmi_phlock_show_info(0, TxtAutoLockDisable, TxtFailed, NULL);   
+		mmi_phlock_show_info(0, TxtAutoLockDisable, TxtFailed, NULL);
 
       return 1;
 }
 
 /*******************************************************************************
  $Function:		phLock_Change_UnlockCode
- $Description:	
+ $Description:
  $Returns:		none
  $Arguments:	none
 *******************************************************************************/
@@ -10260,11 +10260,11 @@
 	{
 		//x0pleela 23 May, 2007  DR: OMAPS00132483
 			//stop the audio file if playing
-#ifdef FF_MMI_AUDIO_PROFILE				
+#ifdef FF_MMI_AUDIO_PROFILE
 	if( mfwAudPlay)
 	{
 		// Stopping the current ring tone.
-		#ifdef FF_MIDI_RINGER  
+		#ifdef FF_MIDI_RINGER
 			mfw_ringer_stop(sounds_midi_ringer_stop_cb);
 		#endif
 	}
@@ -10276,7 +10276,7 @@
 		status = mfw_phlock_get_lock_status(MFW_PH_LOCK);
 		auto_lock_status = mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK);
 		if( ( status == MFW_PH_LOCK_ENABLE) ||
-			auto_lock_status == MFW_PH_LOCK_ENABLE) 
+			auto_lock_status == MFW_PH_LOCK_ENABLE)
 		{
 			SEND_EVENT(pin_data->pin_win,PH_LOCK_STATUS,0,pin_data);
 		}
@@ -10306,26 +10306,26 @@
 
 	TRACE_FUNCTION("mmi_phlock_en_dis_verify()");
   if((pin_data->set_state != ENABLE) && (pin_data->set_state != DISABLE))
-	{	
-              
+	{
+
 	       TRACE_FUNCTION("We're verifying SIMLock");
-	     
+
               SEND_EVENT(pin_data->pin_win,PH_LOCK_REQ_NEW,0,pin_data);
-              
+
        }
   else if(pin_data->set_state EQ ENABLE)
-   {	 
+   {
 		TRACE_FUNCTION("MmiPins:Enable Lock now");
  		if( autoPhLock_menu )
  		{
-			ret = mfw_phlock_enable_lock((U8*)pin_data->old_pin, MFW_AUTO_PH_LOCK); 
+			ret = mfw_phlock_enable_lock((U8*)pin_data->old_pin, MFW_AUTO_PH_LOCK);
  		}
 		else
 		{
-			ret = mfw_phlock_enable_lock((U8*)pin_data->old_pin, MFW_PH_LOCK); 
+			ret = mfw_phlock_enable_lock((U8*)pin_data->old_pin, MFW_PH_LOCK);
 		}
 		if ( ret == MFW_SS_FAIL)
-		{	
+		{
 		        SEND_EVENT(pin_data->pin_win,PH_LOCK_ENDIS_FAIL,0,pin_data);
 		}
 		else if( ret == MFW_EXCT)
@@ -10357,11 +10357,11 @@
      		}
    }
    else  if(pin_data->set_state EQ DISABLE)
-   { 	
+   {
    TRACE_FUNCTION("MmiPins:Disable Lock now");
    		ret = mfw_phlock_disable_lock((U8*)pin_data->old_pin,MFW_PH_LOCK);
 		if (ret == MFW_SS_FAIL)
-		{	
+		{
 			SEND_EVENT(pin_data->pin_win,PH_LOCK_ENDIS_FAIL,0,pin_data);
 		}
         	else
@@ -10369,7 +10369,7 @@
 			//x0pleela 28 May, 2007   DR: OMAPS00132483
 			//Set the phone lock status to FALSE
 			mfw_set_Phlock_status(FALSE);
-			
+
 	       	SEND_EVENT(pin_data->pin_win,PH_LOCK_ENDSUCC,0,pin_data);
         	}
    }
@@ -10486,7 +10486,7 @@
 }
 /*******************************************************************************
 
- $Function:	phlock_setting_pin_win_cb 
+ $Function:	phlock_setting_pin_win_cb
  $Description:	Callback function for main windows in settings
  $Returns:		Status int
  $Arguments:	event, window
@@ -10508,7 +10508,7 @@
 
 /*******************************************************************************
 
- $Function:	phlock_setting_pin_main 
+ $Function:	phlock_setting_pin_main
  $Description:	PIN Settings Dialog Handling function
  $Returns:		none
  $Arguments:	win, event, value, parameters
@@ -10526,7 +10526,7 @@
 	case PH_LOCK_STATUS:
        case PH_LOCK_REQ_OLD:
    	case PH_LOCK_REQ_NEW:
-       case INPUT_NEW_PH_LOCK_AGAIN:	
+       case INPUT_NEW_PH_LOCK_AGAIN:
        case NEW_PH_LOCK_FAIL:
        case PH_LOCK_NEW_ENDISFAIL:
        case PH_LOCK_NEW_ENDSUCC:
@@ -10551,52 +10551,52 @@
                    case TXT_ENTER_NEW_PHLOCK:
                                pin_data->pin_case = INPUT_NEW_PH_LOCK;
 				   phlock_sett_pin_edit(win,INPUT_NEW_PH_LOCK);
-                                break;  
+                                break;
 
                    case TXT_ENTER_NEW_PHLOCK_AGAIN:
                                pin_data->pin_case = INPUT_NEW_PH_LOCK_AGAIN;
 				   phlock_sett_pin_edit(win,INPUT_NEW_PH_LOCK_AGAIN);
-				   break;      
+				   break;
 
                   case NEW_PH_LOCK_END:
                                     mmi_phlock_change_pin(win,MFW_PH_LOCK,(char*)pin_data->old_pin,(char*)pin_data->new_pin);
-                              break; 				   
+                              break;
 
 		case PH_LOCK_END:
 			TRACE_EVENT("phlock_setting_pin_main:PH_LOCK_END");
-			
+
 			//x0pleela 15 May, 2007 DR: OMAPS00127483
 			//When ringer for either incoming call or alarm is playing in phone locked state, Audio usues the DMA channels
 			//which will be active. The DMA channels will be available only after the audio file is fully played.
-			//This will cause that process to be blocked until the DMA channel becomes in-active and in turn if we try to 
+			//This will cause that process to be blocked until the DMA channel becomes in-active and in turn if we try to
 			//query or access secure driver we are blocked until the audio file is completely played.
-			//Since this is a hardware constraint, we found a workaround for this issue and are stopping the ringer  
+			//Since this is a hardware constraint, we found a workaround for this issue and are stopping the ringer
 			//either for incoming call or alarm before accessing secure driver for enabling or disbaling the phone lock.
 
 			if( (( call_data.call_direction == MFW_CM_MTC ) &&  phlock_dialog_mtc_win_handle)
 				|| (phlock_alarm) )
 			{
-				if( (!phlock_win_handle)		
-			#ifdef FF_MMI_AUDIO_PROFILE				
+				if( (!phlock_win_handle)
+			#ifdef FF_MMI_AUDIO_PROFILE
 					&& ( mfwAudPlay)
 			#endif
 					)
 				{
 				// Stopping the current ring tone.
-				#ifdef FF_MIDI_RINGER  
+				#ifdef FF_MIDI_RINGER
 					mfw_ringer_stop(sounds_midi_ringer_stop_cb);
 				#endif
 				}
 			}
 			 mmi_phlock_en_dis_verify(win);
                       break;
-				   
-	 
+
+
                case PH_LOCK_SETT_ABORT:
 	 			TRACE_EVENT("phlock_setting_pin_main: PH_LOCK_SETT_ABORT");
 				phlock_setting_pin_destroy(pin_data->pin_win);// destroy pin settings dialog
 				break;
-				
+
 		  default:
 			  break;
 	 }
@@ -10605,7 +10605,7 @@
 
 /*******************************************************************************
 
- $Function:	phlock_sett_pin_mess 
+ $Function:	phlock_sett_pin_mess
  $Description:	help function for message dialog
  $Returns:		void
  $Arguments:	window, event
@@ -10731,7 +10731,7 @@
   /*
    * depending on signal
    */
-	
+
   switch (event)
   {
 	case PH_LOCK_ALREADY_ENDIS:
@@ -10739,14 +10739,14 @@
     	case PH_LOCK_ENDSUCC:
 	case PH_LOCK_AUTO_SUCC:
 	case PH_LOCK_SUCC:
-	case PH_LOCK_STATUS:		
+	case PH_LOCK_STATUS:
    	case NEW_PH_LOCK_FAIL:
        case PH_LOCK_NEW_ENDISFAIL:
        case PH_LOCK_ENDIS_FAIL:
 	case PH_LOCK_EN_FAIL:
 
 		dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtNull, TxtNull,  COLOUR_STATUS_PINS);
-		
+
 		switch(event)
 		{
 		case PH_LOCK_ALREADY_ENDIS:
@@ -10757,7 +10757,7 @@
 				display_info.TextId2 = TxtAlreadyEnabled;
 			else if(pin_data->set_state == DISABLE)
 			  	display_info.TextId2 = TxtAlreadyDisabled;
-			  
+
 			  break;
 
 	         case PH_LOCK_NEW_ENDSUCC:
@@ -10771,7 +10771,7 @@
 			  display_info.TextId = TxtPhoneLock;
 			  display_info.TextId2 = TxtPsLockChanged;
 			  break;
-			  
+
 		  case PH_LOCK_ENDSUCC:
 		  	TRACE_EVENT("phlock_set_pin_messages: PH_LOCK_ENDSUCC");
 			if(phlock_win_handle)
@@ -10782,14 +10782,14 @@
 				phlock_kbd_handle = NULL;
 
 				//x0pleela 28 May, 2007  DR: OMAPS00132483
-				//get the phone lock status 
+				//get the phone lock status
 				if( mfw_get_Phlock_status() )
       				{
       					TRACE_EVENT("LOCK ENABLED");
 	      				//For USB MS
 	      				if( mmi_get_usbms_enum() )
 	      				{
-					#ifdef FF_MMI_USBMS      			
+					#ifdef FF_MMI_USBMS
 						//unregister USB enumeration
 						TRACE_EVENT("USB de-enumeration");
 			      			mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL);
@@ -10798,7 +10798,7 @@
 					//For Headset
 					if( mmi_get_Headset_Reg() )
 					{
-						#ifdef FF_MMI_AUDIO_PROFILE	
+						#ifdef FF_MMI_AUDIO_PROFILE
 							//unregister headset
 							//mfw_headset_unregister();
 							TRACE_EVENT("headset unregister");
@@ -10813,7 +10813,7 @@
 					//For USB MS
 					if( mmi_get_usbms_enum() )
 					{
-					#ifdef FF_MMI_USBMS      
+					#ifdef FF_MMI_USBMS
 			      			//register USB enumeration
 			      			TRACE_EVENT("USB re-enumeration");
 		      				mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL);
@@ -10822,7 +10822,7 @@
 					//For Headset
 					if( mmi_get_Headset_Reg() )
 					{
-						#ifdef FF_MMI_AUDIO_PROFILE	
+						#ifdef FF_MMI_AUDIO_PROFILE
 							//register headset
 							//mfw_headset_register();
 						if(call_data.win_calling OR call_data.win_incoming OR call_data.calls.numCalls)
@@ -10831,13 +10831,13 @@
 								mfw_hook_register();
 							}
 						#endif /*FF_MMI_AUDIO_PROFILE*/
-					}	
+					}
 						pin_data->pin_case = PH_LOCK_SUCCESS;
-							
+
 				}
 				display_info.TextId = TxtPhone;
 				display_info.Identifier = pin_data->pin_case;
-	
+
 		 if(pin_data->set_state == ENABLE)
 			  {
 			  	display_info.TextId2 = TxtLockActivated;
@@ -10849,8 +10849,8 @@
 				TRACE_EVENT("phlock_set_pin_messages: PH_LOCK_ENDSUCC: Deactivated");
 			  }
 
-			  break;				  
-		
+			  break;
+
 		case PH_LOCK_AUTO_SUCC:
 			TRACE_EVENT("phlock_set_pin_messages: PH_LOCK_AUTO_SUCC");
 			if(phlock_win_handle)
@@ -10861,7 +10861,7 @@
 				phlock_kbd_handle = NULL;
 
 			//x0pleela 29 May, 2007  DR: OMAPS00132483
-				//get the auto phone lock status 
+				//get the auto phone lock status
 				if( mfw_get_Auto_Phlock_status() )
 			  {
 			  	display_info.TextId = TxtAutoPhone;
@@ -10883,19 +10883,19 @@
 			if(phlock_win_handle)
 				phlock_win_handle = NULL;
 
-			
+
 			if( phlock_kbd_handle)
 				phlock_kbd_handle = NULL;
 
 				//x0pleela 28 May, 2007  DR: OMAPS00132483
-				//get the phone lock status 
+				//get the phone lock status
 				if( mfw_get_Phlock_status() )
       				{
       					TRACE_EVENT("LOCK ENABLED");
 	      				//For USB MS
 	      				if( mmi_get_usbms_enum() )
 	      				{
-					#ifdef FF_MMI_USBMS      			
+					#ifdef FF_MMI_USBMS
 						//unregister USB enumeration
 						TRACE_EVENT("USB de-enumeration");
 			      			mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL);
@@ -10904,7 +10904,7 @@
 					//For Headset
 					if( mmi_get_Headset_Reg() )
 					{
-						#ifdef FF_MMI_AUDIO_PROFILE	
+						#ifdef FF_MMI_AUDIO_PROFILE
 							//unregister headset
 							//mfw_headset_unregister();
 							TRACE_EVENT("headset unregister");
@@ -10918,7 +10918,7 @@
 					//For USB MS
 					if( mmi_get_usbms_enum() )
 					{
-					#ifdef FF_MMI_USBMS      
+					#ifdef FF_MMI_USBMS
 			      			//register USB enumeration
 			      			TRACE_EVENT("USB re-enumeration");
 		      				mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL);
@@ -10927,7 +10927,7 @@
 					//For Headset
 					if( mmi_get_Headset_Reg() )
 					{
-						#ifdef FF_MMI_AUDIO_PROFILE	
+						#ifdef FF_MMI_AUDIO_PROFILE
 							//register headset
 							//mfw_headset_register();
 						if(call_data.win_calling OR call_data.win_incoming OR call_data.calls.numCalls)
@@ -10936,25 +10936,25 @@
 								mfw_hook_register();
 							}
 						#endif /*FF_MMI_AUDIO_PROFILE*/
-					}	
+					}
 					}
-			
+
 			display_info.TextId = TxtLockActivated;
 			pin_data->pin_case = PH_LOCK_ENDSUCC;
 			 display_info.Identifier = pin_data->pin_case;
-			  
-			  break;	
-  
+
+			  break;
+
 	case PH_LOCK_STATUS:
 		pin_data->pin_case = PH_LOCK_STATUS;
 		display_info.TextId = TxtPhone;
-      		switch(mfw_phlock_get_lock_status(MFW_PH_LOCK)) 
+      		switch(mfw_phlock_get_lock_status(MFW_PH_LOCK))
       		{
                       case MFW_PH_LOCK_DISABLE:
 				display_info.TextId2 = TxtLockDisabled;
 				break;
                       case  MFW_PH_LOCK_ENABLE:
-				display_info.TextId2 = TxtLockEnabled; 
+				display_info.TextId2 = TxtLockEnabled;
 				break;
            	}
      		break;
@@ -10976,11 +10976,11 @@
  	case NEW_PH_LOCK_FAIL:
 			if(phlock_win_handle)
 				phlock_win_handle = NULL;
-			
+
 			if( phlock_kbd_handle)
 				phlock_kbd_handle = NULL;
 
-			
+
               	pin_data->pin_case = INPUT_NEW_PH_LOCK;
 			  display_info.TextId = TxtPsLockConfWrong;
 			  display_info.TextId2 = TxtPsLockConfwrong2;
@@ -10989,8 +10989,8 @@
        case PH_LOCK_ENDIS_FAIL:
 	   	TRACE_EVENT("phlock_set_pin_msgs:PH_LOCK_ENDIS_FAIL");
 		//x0pleela 28 May, 2007  DR: OMAPS00132483
-		//get the phone lock status 
-		if ( mfw_get_Phlock_status() ) 
+		//get the phone lock status
+		if ( mfw_get_Phlock_status() )
 			pin_data->pin_case = PH_LOCK_ENDIS_FAIL;
 		else
 			pin_data->pin_case = PH_LOCK_FAILURE;
@@ -11000,13 +11000,13 @@
 			autoPhLock_menu = FALSE;
 
 		  display_info.TextId = TxtCodeInc;
-		break;	
+		break;
 
 	case PH_LOCK_EN_FAIL:
 		pin_data->pin_case = PH_LOCK_FAILURE;
 		display_info.TextId = TxtNotLocked;
 		break;
-		
+
 		 	}
 
     {
@@ -11018,7 +11018,7 @@
 	 dspl_Enable(1);
     }
 	break;
-		
+
 	case TXT_PH_LOCK_ALL:
 	case PH_UNLOCK_REQ:
 		TRACE_EVENT(":phlock_set_pin_msgs: TXT_PH_LOCK_ALL");
@@ -11046,7 +11046,7 @@
 	default:
 		break;
   }
-		
+
 }
 
 
@@ -11067,11 +11067,11 @@
 	switch(identifier)
 	{
 
-		case PH_LOCK_ENDSUCC:					
+		case PH_LOCK_ENDSUCC:
 				TRACE_EVENT("PH_LOCK_ENDSUCC");
-				
+
 				//x0pleela 28 May, 2007  DR: OMAPS00132483
-				//get the phone lock status 
+				//get the phone lock status
 				if( mfw_get_Phlock_status() )
 	      			{
 	      			TRACE_EVENT("phlock_set_pin_info_cb: LOCK ENABLED");
@@ -11079,18 +11079,18 @@
 						//For USB MS
 	      				if( mmi_get_usbms_enum() )
 	      				{
-					#ifdef FF_MMI_USBMS      			
+					#ifdef FF_MMI_USBMS
 						//unregister USB enumeration
 						TRACE_EVENT("USB de-enumeration");
 			      			mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL);
 					#endif /*FF_MMI_USBMS*/
 	      				}
-						
+
 					pin_data->set_state = DISABLE;
 					identifier = pin_data->pin_case = PH_UNLOCK_REQ;
-					SEND_EVENT(pin_data->pin_win,identifier,0,NULL);				
+					SEND_EVENT(pin_data->pin_win,identifier,0,NULL);
 	           		}
-												
+
 			break;
 
 			case PH_LOCK_ENDIS_FAIL:
@@ -11098,65 +11098,65 @@
 				dspl_Enable(1);
 				pin_data->set_state = DISABLE;
 				identifier = pin_data->pin_case = PH_UNLOCK_REQ;
-				
+
 				//x0pleela 15 May, 2007 DR: OMAPS00127483
 				//Starting the ringer again for either incoming call or alarm if the user has entered wrong unlocking pasword.
 				if( ( ( ( call_data.call_direction == MFW_CM_MTC ) &&  (phlock_dialog_mtc_win_handle) ) || ( phlock_alarm ) )
 					&& (phlock_win_handle)
-					#ifdef FF_MMI_AUDIO_PROFILE				
+					#ifdef FF_MMI_AUDIO_PROFILE
 						&& ( !mfwAudPlay)
-					#endif	
+					#endif
 				)
 				{
-					if( call_data.call_direction == MFW_CM_MTC ) 
+					if( call_data.call_direction == MFW_CM_MTC )
 					{
-					#ifdef FF_MIDI_RINGER  
+					#ifdef FF_MIDI_RINGER
 						mfw_ringer_start(AS_RINGER_MODE_IC, TRUE, sounds_midi_ringer_start_cb);
 					#endif
 					}
 					else if ( phlock_alarm )
 					{
-					#ifdef FF_MIDI_RINGER  
+					#ifdef FF_MIDI_RINGER
 						mfw_ringer_start(AS_RINGER_MODE_ALARM, TRUE, sounds_midi_ringer_start_cb);
 					#endif
 					}
-					
+
 				}
-				SEND_EVENT(pin_data->pin_win,identifier,0,NULL);				
+				SEND_EVENT(pin_data->pin_win,identifier,0,NULL);
 			break;
 
-			case PH_LOCK_SETT_ABORT:      
+			case PH_LOCK_SETT_ABORT:
 				SEND_EVENT(pin_data->pin_win,identifier,0,NULL);//pin_main data !!
-				break;				
-			
-
-		default:		
+				break;
+
+
+		default:
 		switch (reasons)
 		{
 			case INFO_KCD_LEFT:
 			case INFO_KCD_RIGHT:
-		
+
 			case INFO_TIMEOUT:
 			{
 			        pin_skClear();
 				phlock_setting_pin_destroy(pin_data->pin_win);// destroy pin settings dialog
 				//x0pleela 07 Apr, 2007  ER: OMAPS00122561
-				if( phlock_alarm) 
+				if( phlock_alarm)
 				{
 					TRACE_EVENT("phlock_set_pin_info_cb: INFO_TIMEOUT ");
 					if( phlock_alarm_win_handle )
 						winShow(phlock_alarm_win_handle);
-				}	
+				}
 				if( call_data.call_direction == MFW_CM_MTC )
 				{
 					if( phlock_mtc_win_handle )
 						winShow(phlock_mtc_win_handle);
-					
+
 					if( phlock_dialog_mtc_win_handle )
 						winShow(phlock_dialog_mtc_win_handle);
 				}
 			}
-		
+
 			break;
 		}
 			break;
@@ -11191,7 +11191,7 @@
 	{
 		SEND_EVENT(pin_edt_win,event,0,pin_data);
 	}
- 
+
 
 
 }
@@ -11216,7 +11216,7 @@
 
   if (data->pin_edt_win EQ 0)
     return 0;
-  
+
 	phlock_win_handle = data->pin_edt_win;
   /*
    * Create window handler
@@ -11270,7 +11270,7 @@
   /* SPR#1428 - SH - New Editor changes */
   #ifdef NEW_EDITOR
 	ATB_edit_Show(edt_data->editor);
-	
+
 	if (edt_data->editor->update!=ED_UPDATE_TRIVIAL)
 	{
 		/* Set the colour for drawing title */
@@ -11282,7 +11282,7 @@
 		/* Title */
 
 		if(pin_emergency_call == TRUE)
-		{					
+		{
 			PROMPT(0,0,0,TxtEmergency);
 		}
 		else
@@ -11295,7 +11295,7 @@
 		}
 
 		/* Soft keys */
-		
+
 		if ((strlen((char*)edt_data->pin) >= MIN_PIN) && (strlen((char*)edt_data->pin) < (MAX_PIN + 1)))
 		{
 				if(!(edt_data->gsm_state))	  /* usual way for PIN 4 digits     */
@@ -11312,35 +11312,35 @@
 		if((strlen((char*)edt_data->pin) == 0))//  May 13, 2004        REF: CRR 13623  xvilliva
 		{
 			TRACE_EVENT("clear softkey 16 - zero length");
-			softKeys_displayId(TxtNull,TxtNull,0, COLOUR_EDITOR_XX);												
+			softKeys_displayId(TxtNull,TxtNull,0, COLOUR_EDITOR_XX);
 		}
 		else if((strlen((char*)edt_data->pin) < MIN_PIN) && (edt_data->emergency_call != TRUE))
 		{
-			TRACE_EVENT("clear softkey 16");	
-			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);												
+			TRACE_EVENT("clear softkey 16");
+			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);
 		}
 #ifdef SIM_PERS
 		else if((strlen((char*)edt_data->pin) < MIN_PIN) && (edt_data->emergency_call == TRUE))
 		{
-			TRACE_EVENT("clear softkey 16");	
+			TRACE_EVENT("clear softkey 16");
 			if(pin_emergency_call == TRUE)
-				softKeys_displayId(TxtSoftCall,TxtDelete,0, COLOUR_EDITOR_XX);												
+				softKeys_displayId(TxtSoftCall,TxtDelete,0, COLOUR_EDITOR_XX);
 			else
-			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);												
+			softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);
 		}
 #endif
 	}
-	
+
 	edt_data->editor->update = ED_UPDATE_DEFAULT;
-	
+
 #else /* NEW_EDITOR */
 	pin_icons();
    	PROMPT(INFO_TEXT_X,INFO_TEXT_Y,0,pin_data->display_id1);
-   	
+
   TRACE_FUNCTION("softkey 6");
 	softKeys_displayId(TxtNull,TxtDelete,0, COLOUR_EDITOR_XX);
 #endif /* NEW_EDITOR */
- 
+
     return 1;
   }
   return 0;
@@ -11371,7 +11371,7 @@
    */
   switch (event)
   {
-	
+
 //x0pleela 06 Mar, 2007 ER: OMAPS00122561
 #ifdef FF_PHONE_LOCK
 	case INPUT_PH_LOCK:
@@ -11433,19 +11433,19 @@
 
 	TRACE_FUNCTION("MmiPins:phlock_set_pin_kbd_cb");
 
-//x0pleela 12 Mar, 2007  ER: OMAPS00122561	
+//x0pleela 12 Mar, 2007  ER: OMAPS00122561
 #if defined ( SIM_PERS) || defined (FF_PHONE_LOCK)
  	#if defined (SIM_PERS ) AND !defined (FF_PHONE_LOCK)
-		if ( !perm_blocked) 
+		if ( !perm_blocked)
 	#elif defined (FF_PHONE_LOCK ) AND !defined (SIM_PERS)
 		if ((mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_DISABLE) ||
 			(mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_DISABLE) )
 	#elif defined (SIM_PERS ) AND defined (FF_PHONE_LOCK)
-		if( ( !perm_blocked) || 
+		if( ( !perm_blocked) ||
 			(mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_DISABLE) 	||
 			(mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_DISABLE))
 	#endif
-	
+
 #endif /* SIM_PERS OR FF_PHONE_LOCK */
 	{
 	switch(kc->code)
@@ -11464,7 +11464,7 @@
 //x0pleela 12 Mar, 2007  ER: OMAPS00122561
 			if(edt_data->editor_index < PH_MAX_DIG)
 			{
-				/* xreddymn OMAPS00083495 Jul-04-2006 
+				/* xreddymn OMAPS00083495 Jul-04-2006
 				 * Limit PIN1, PIN2 entries to 8 digits.
 				 */
 				if((
@@ -11472,7 +11472,7 @@
 					(edt_data->pin_case_edit==INPUT_NEW_PH_LOCK)  ||
 					(edt_data->pin_case_edit==INPUT_NEW_PH_LOCK_AGAIN)
 					)
-					&&(edt_data->editor_index>=4) 
+					&&(edt_data->editor_index>=4)
 
 					&& (!edt_data->gsm_state))
 					return MFW_EVENT_CONSUMED;
@@ -11511,24 +11511,24 @@
 #endif //FF_PHONE_LOCK
 			}
 
-			
+
 			if(!(strncmp((char*)edt_data->pin,"**052*",IDENT_GSM_2))||!(strncmp((char*)edt_data->pin,"**05*",IDENT_GSM_1)))
 
 			{
 				edt_data->pin[edt_data->editor_index] = HASH;
-				// SPR#1428 - SH - New Editor changes 
+				// SPR#1428 - SH - New Editor changes
 #ifdef NEW_EDITOR
 				ATB_edit_AsciiChar(edt_data->editor, edt_data->pin[edt_data->editor_index], TRUE);
-#else // NEW_EDITOR 
+#else // NEW_EDITOR
 				edtChar(edt_data->editor_handle,edt_data->pin[edt_data->editor_index]);
-#endif // NEW_EDITOR 
+#endif // NEW_EDITOR
 				edt_data->editor_index++;
 			}
 
-			
+
 
 			// We save the pin2 entered in to this global variable which we
-			// use while calling sAT_PlusCLCK(), while locking or unlocking ALS. 					
+			// use while calling sAT_PlusCLCK(), while locking or unlocking ALS.
 			memset(g_pin2,0,MAX_PIN+1);
 			if(edt_data->pin_case_edit EQ INPUT_PIN2 || edt_data->pin_case_edit EQ INPUT_NEW_PIN2)
 				strncpy(g_pin2,(char*)edt_data->pin,MAX_PIN);//xvilliva SPR17291
@@ -11538,37 +11538,37 @@
 #ifdef FF_PHONE_LOCK
 		 case INPUT_PH_LOCK:
 #endif /*FF_PHONE_LOCK*/
-				
+
 					TRACE_EVENT_P1("pin_emergency_call = %d", pin_emergency_call);
 					TRACE_EVENT("When 'Call' is pressed!");
 
 					/* PIN is long enough, finish editing */
-					
+
 					if ((strlen((char*)edt_data->pin) >= MIN_PIN)  && !(edt_data->gsm_state))
 					{
 						clear_edit_array(edt_data);	    /*	   clear editor array */
 						timer = FALSE;
 						strncpy((char*)edt_data->old_pin,(char*)edt_data->pin,MAX_PIN);
 						strncpy((char*)pin_data->old_pin, (char*)edt_data->old_pin,MAX_PIN);
-						
+
      						 if(edt_data->pin_case_edit EQ INPUT_PH_LOCK)
                          			{
 	                        			TRACE_EVENT("phlock_set_pin_kbd_cb: INPUT_PH_LOCK");
 							if(phlock_win_handle)
 								phlock_win_handle = NULL;
-							
+
 							if( phlock_kbd_handle)
 								phlock_kbd_handle = NULL;
 
 						    phlock_set_pin_edt_destroy(edt_data->pin_edt_win);
 							SEND_EVENT(pin_data->pin_win,PH_LOCK_END,0,pin_data);
 						}
-						
+
 					}
 					else
 					{
 						if(kc->code EQ KCD_HASH)
-						{	
+						{
 							if (!(edt_data->gsm_state))	/* could become gsm */
 							{
 								check_pins(win,edt_data);
@@ -11591,18 +11591,18 @@
 					}
 					break;
 
-					
+
 //x0pleela 06 Mar, 2007 ER: OMAPS00122561
 #ifdef FF_PHONE_LOCK
 				case INPUT_NEW_PH_LOCK:
-#endif /*FF_PHONE_LOCK*/					
+#endif /*FF_PHONE_LOCK*/
 					if ((strlen((char*)edt_data->pin) >= MIN_PIN)  && !(edt_data->gsm_state))
 					{
 						clear_edit_array (edt_data);			  /* clear editor array */
 						timer = FALSE;
 						strncpy((char*)edt_data->new_pin, (char*)edt_data->pin,MAX_PIN);	  /*  store new pin	  */
 						strncpy((char*)pin_data->new_pin, (char*)edt_data->new_pin,MAX_PIN);
-						
+
 				//x0pleela 06 Mar, 2007  ER: OMAPS00122561
 				#ifdef  FF_PHONE_LOCK
 					if(pin_data->pin_case EQ INPUT_NEW_PH_LOCK)
@@ -11610,13 +11610,13 @@
                             		phlock_set_pin_edt_destroy(edt_data->pin_edt_win);
                                    	SEND_EVENT(pin_data->pin_win,INPUT_NEW_PH_LOCK_AGAIN,0,NULL);
                                  	}
-                             #endif /* FF_PHONE_LOCK */							
-						
+                             #endif /* FF_PHONE_LOCK */
+
 					}
 					else
 					{
 						if(kc->code EQ KCD_HASH)
-						{	
+						{
 							if(!(edt_data->gsm_state)) /* could become gsm	    */
 							{
 								check_pins(win,edt_data);
@@ -11642,8 +11642,8 @@
 //x0pleela 06 Mar, 2007 ER: OMAPS00122561
 #ifdef FF_PHONE_LOCK
 				case INPUT_NEW_PH_LOCK_AGAIN:
-#endif	/*FF_PHONE_LOCK*/					
-				
+#endif	/*FF_PHONE_LOCK*/
+
 						if ((strlen((char*)edt_data->pin) >= MIN_PIN) && !(edt_data->gsm_state))
 						{
 							clear_edit_array (edt_data);			  /* clear editor array */
@@ -11651,7 +11651,7 @@
 							if(strcmp((char*)edt_data->pin, (char*)pin_data->new_pin) EQ 0) /* compare PINs successfull*/
 							{
 								strncpy((char*)pin_data->new_pin, (char*)edt_data->pin,MAX_PIN);
-								
+
 								//x0pleela 06 Mar, 2007 ER: OMAPS00122561
 							#ifdef FF_PHONE_LOCK
 								if (pin_data->pin_case EQ INPUT_NEW_PH_LOCK_AGAIN)
@@ -11659,13 +11659,13 @@
                                                      		phlock_set_pin_edt_destroy(edt_data->pin_edt_win);
                                                     		SEND_EVENT(pin_data->pin_win, NEW_PH_LOCK_END,0,pin_data);
                                                    	}
-							#endif /*FF_PHONE_LOCK*/								
-								
+							#endif /*FF_PHONE_LOCK*/
+
 							}
 							else
 							{									/* new PIN != new PIN again */
 
-								
+
 								//x0pleela 06 Mar, 2007 ER: OMAPS00122561
 							#ifdef FF_PHONE_LOCK
 								if (pin_data->pin_case EQ INPUT_NEW_PH_LOCK_AGAIN)
@@ -11673,8 +11673,8 @@
                                                      		phlock_set_pin_edt_destroy(edt_data->pin_edt_win);
                                                     		SEND_EVENT(pin_data->pin_win, NEW_PH_LOCK_FAIL,0,pin_data);
                                                    	}
-							#endif /*FF_PHONE_LOCK*/									
-								
+							#endif /*FF_PHONE_LOCK*/
+
 							}
 						}
 						else
@@ -11702,12 +11702,12 @@
 							}
 						}
 						break;
-					
+
 					default:
 						break;
 				}
 				break;
-				
+
 /* KCD_HUP */
 			case KCD_HUP:
 				if( edt_data->pin_case_edit != INPUT_PUK1)//xvilliva SPR13623
@@ -11718,18 +11718,18 @@
 #ifdef FF_PHONE_LOCK
 			if( (!phlock_win_handle) || (pin_data->set_state != DISABLE) )
 				{
-#endif //FF_PHONE_LOCK				
+#endif //FF_PHONE_LOCK
 				phlock_set_pin_edt_destroy(edt_data->pin_edt_win);
 	    		SEND_EVENT(pin_data->pin_win,PH_LOCK_SETT_ABORT,0,NULL); // abort settings menu
 #ifdef FF_PHONE_LOCK
 				}
-#endif //FF_PHONE_LOCK	    		
+#endif //FF_PHONE_LOCK
 				}
 				break;
 
 /* KCD RIGHT */
 
-			case KCD_RIGHT: 	
+			case KCD_RIGHT:
 			//nm, go back to the submenu if there is no character on the screen
 				if(strlen((char*)edt_data->pin) == 0 && edt_data->pin_case_edit != INPUT_PUK1)//xvilliva SPR13623
 				{
@@ -11742,10 +11742,10 @@
 #endif //FF_PHONE_LOCK
 					phlock_set_pin_edt_destroy(edt_data->pin_edt_win);
 		    		SEND_EVENT(pin_data->pin_win,PH_LOCK_SETT_ABORT,0,NULL); // abort settings menu
-					return 1;			    
+					return 1;
 #ifdef FF_PHONE_LOCK
 				}
-#endif //FF_PHONE_LOCK					
+#endif //FF_PHONE_LOCK
 				}
 
 				if(edt_data->editor_index EQ 0)
@@ -11774,7 +11774,7 @@
 					winShow(edt_data->pin_edt_win);
 				}
 			    break;
-			    
+
 			default:
 				break;
 		}
@@ -11783,7 +11783,7 @@
 #if defined (SIM_PERS) || defined ( FF_PHONE_LOCK )
 	else
 #ifdef FF_PHONE_LOCK
-    		if((mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_ENABLE) || 
+    		if((mfw_phlock_get_lock_status(MFW_PH_LOCK) == MFW_PH_LOCK_ENABLE) ||
 			(mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_ENABLE) )
 #endif /*FF_PHONE_LOCK*/
 	{
@@ -11813,8 +11813,8 @@
 			}
 			winShow(edt_data->pin_edt_win);
 			break;
-				
-	
+
+
 		case KCD_LEFT:
 
 			if(pin_emergency_call == TRUE)
@@ -11824,7 +11824,7 @@
 			}
 			break;
 
-		case KCD_RIGHT: 	
+		case KCD_RIGHT:
 
 //				if( edt_data->edtbuf == '\0' )
 //					break;
@@ -11857,7 +11857,7 @@
 
 			default:
 				break;
-			}	
+			}
 	}
 #endif /* SIM_PERS  OR FF_PHONE_LOCK*/
 	if (timer)
@@ -11888,7 +11888,7 @@
 			timStop(edt_data->tim_out_handle); /* stop entering timer	*/
 			clear_edit_array(edt_data);
 			memset(edt_data->pin,'\0',sizeof(edt_data->pin));/* initial string */
-			
+
 			/* SPR#1428 - SH - New Editor: string changed, update word-wrap*/
 	#ifdef NEW_EDITOR
 			ATB_edit_Refresh(edt_data->editor);
@@ -11906,8 +11906,8 @@
  $Function:	phlock_pin_edt_tim_out_cb
  $Description:	Callback function for timer (watchdog entering)
  $Returns:		void
- $Arguments:	window handler event, timer control block 
- 
+ $Arguments:	window handler event, timer control block
+
 *******************************************************************************/
 static void phlock_pin_edt_tim_out_cb (T_MFW_EVENT event,T_MFW_TIM * t)
 {
@@ -11928,7 +11928,7 @@
 	pin_skClear();
 	clear_edit_array(edt_data);
 	// clear the input
-	
+
 	/* SPR#1428 - SH - New Editor changes */
 #ifdef NEW_EDITOR
 	ATB_edit_ClearAll(edt_data->editor);
@@ -11946,7 +11946,7 @@
 
 /*******************************************************************************
 
- $Function:	phlock_setting_pin_destroy 
+ $Function:	phlock_setting_pin_destroy
  $Description:	Destroy the settings pin main dialog.
  $Returns:		none
  $Arguments:	window