private void removeBlockedIconFromContact(CharSequence cs) { Jid jid = JidCreate.fromOrThrowUnchecked(cs); removeBlockedIconFromContact(jid); }
private void setBlockedIconToContact(CharSequence cs) { Jid jid = JidCreate.fromOrThrowUnchecked(cs); setBlockedIconToContact(jid); }
/** * Gets JID from URI. Returns the full jid including resource * * @param uri * the URI * @return romeo@montague.net */ public Jid retrieveJID(URI uri) { StringBuilder sb = new StringBuilder(32); String user = uri.getUserInfo(); if (user != null) { sb.append(user); sb.append('@'); } sb.append(uri.getHost()); // Resource contains the leading / String resource = uri.getPath(); if (resource != null && resource.length() > 0 && !resource.equals("/")) { sb.append(resource); } return JidCreate.fromOrThrowUnchecked(sb); } }