Hi Yong,
Indeed, what it does is check if you have just changed the devices – and then update the FP settings accordingly. I cannot recall off the top of my head whether it is essential – perhaps you can remove it and it will still work. If i was to guess what issues it could create I would say perhaps if you try to update those selections whilst the user is trying to use them (i.e. if they have one of the FP seting dropdown boxes open) perhaps the HTML front-end would close the menu – making it hard for them to select the right option before it disappears!
If you can get away without that line I expect all is fine!
Harrison