Exemple #1
0
 public PacketExtension parseExtension(XmlPullParser parser) throws Exception {
   ChatState state;
   try {
     state = ChatState.valueOf(parser.getName());
   } catch (Exception ex) {
     state = ChatState.active;
   }
   return new ChatStateExtension(state);
 }
Exemple #2
0
 public String getElementName() {
   return state.name();
 }