mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-27 14:32:06 +01:00
Merge branch 'fixReason' into jingle2
This commit is contained in:
commit
f3244f507e
2 changed files with 12 additions and 1 deletions
|
@ -156,5 +156,9 @@ public class JingleReason implements NamedElement {
|
||||||
xml.closeElement(this);
|
xml.closeElement(this);
|
||||||
return xml;
|
return xml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAlternativeSessionId() {
|
||||||
|
return sessionId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,14 @@ public class JingleProvider extends IQProvider<Jingle> {
|
||||||
case JingleReason.ELEMENT:
|
case JingleReason.ELEMENT:
|
||||||
parser.next();
|
parser.next();
|
||||||
String reasonString = parser.getName();
|
String reasonString = parser.getName();
|
||||||
Reason reason = Reason.fromString(reasonString);
|
JingleReason reason;
|
||||||
|
if (reasonString.equals("alternative-session")) {
|
||||||
|
parser.next();
|
||||||
|
String sid = parser.nextText();
|
||||||
|
reason = new JingleReason.AlternativeSession(sid);
|
||||||
|
} else {
|
||||||
|
reason = new JingleReason(Reason.fromString(reasonString));
|
||||||
|
}
|
||||||
builder.setReason(reason);
|
builder.setReason(reason);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue