mozilla-b2g/gaia — pull request #6891 by gtorodelvalle (2012-12-07 14:59:57+00:00)
Title: Bug 815504 - USSD/MMI Dialog should close itself when it is being dismissed (r=etiennesegonzac).

In this implementation, the USSD/MMI page is closed whenever the Communications app looses visibility and restored whenever it gains it again (only if it was close due to this visibility hack). If during the time the USSD/MMI page was closed further messages were received, the last one is shown. If no further messages were received, the last shown message is shown, again.

I also this some refactoring ;-)