mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Add ParserUtils.getXmlLang(XmlPullParser)
and add TODO comment to PacketParserUtils.getLanguageAttribute().
This commit is contained in:
parent
5424c9635f
commit
1448fa4632
2 changed files with 7 additions and 0 deletions
|
@ -976,6 +976,8 @@ public class PacketParserUtils {
|
||||||
return new Session.Feature(optional);
|
return new Session.Feature(optional);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Remove this static method and use ParserUtils.getXmlLang(XmlPullParser) instead.
|
||||||
private static String getLanguageAttribute(XmlPullParser parser) {
|
private static String getLanguageAttribute(XmlPullParser parser) {
|
||||||
// CHECKSTYLE:OFF
|
// CHECKSTYLE:OFF
|
||||||
for (int i = 0; i < parser.getAttributeCount(); i++) {
|
for (int i = 0; i < parser.getAttributeCount(); i++) {
|
||||||
|
|
|
@ -251,4 +251,9 @@ public class ParserUtils {
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getXmlLang(XmlPullParser parser) {
|
||||||
|
String langString = parser.getAttributeValue("http://www.w3.org/XML/1998/namespace", "lang");
|
||||||
|
return langString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue