if you add a new contact who is no online, rosterItemVO.pending will be false before you login again.it should be true.try comments
subscription = RosterExtension.SUBSCRIBE_TYPE_TO; this line out seems works.solution2 ,do not add a rosterItemVO to Roster Collection in addContact method,wait for server push.