[Contacts] Fix listener logical bugs and codingstyle.
Merge pull request #2 from legendlee1314/contacts_listener

[Contacts] Fix listener logical bugs