(JabberDataBlock data)
| 200 | } |
| 201 | |
| 202 | public int blockArrived(JabberDataBlock data) { |
| 203 | if (data instanceof Iq) { |
| 204 | if (data.getTypeAttribute().equals("result")) { |
| 205 | JabberDataBlock query = data.findNamespace("query", "jabber:iq:private"); |
| 206 | if (query == null) { |
| 207 | return BLOCK_REJECTED; |
| 208 | } |
| 209 | JabberDataBlock gs = query.findNamespace("gs", GROUPSTATE_NS); |
| 210 | if (gs == null || gs.getChildBlocks() == null) { |
| 211 | return BLOCK_REJECTED; |
| 212 | } |
| 213 | for (Enumeration e = gs.getChildBlocks().elements(); e.hasMoreElements();) { |
| 214 | JabberDataBlock item = (JabberDataBlock) e.nextElement(); |
| 215 | String groupName = item.getText(); |
| 216 | boolean collapsed = item.getAttribute("state").equals("collapsed"); |
| 217 | Group grp = getGroup(groupName); |
| 218 | if (grp == null) { |
| 219 | continue; |
| 220 | } |
| 221 | grp.collapsed = collapsed; |
| 222 | } |
| 223 | sd.roster.reEnumRoster(); |
| 224 | return NO_MORE_BLOCKS; |
| 225 | } |
| 226 | } |
| 227 | return BLOCK_REJECTED; |
| 228 | } |
| 229 | |
| 230 | public void queryGroupState(boolean get) { |
| 231 | if (!sd.roster.isLoggedIn()) { |
nothing calls this directly
no test coverage detected