mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-10 11:15:03 -05:00
made work around not being a work around any more
This commit is contained in:
parent
8b85b603d3
commit
0c37abf1e9
@ -96,9 +96,8 @@ public class DNSHelper {
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
builder.replace(0, 1, "");
|
builder.replace(0, 1, "");
|
||||||
|
byte type = receiveData[i+1];
|
||||||
//TODO: workaround. speak proper dns later
|
if (type!=-64) {
|
||||||
if (!builder.toString().contains(".")) {
|
|
||||||
namePort.putString("error", "nosrv");
|
namePort.putString("error", "nosrv");
|
||||||
return namePort;
|
return namePort;
|
||||||
}
|
}
|
||||||
|
@ -47,12 +47,9 @@ public class XmlReader {
|
|||||||
|
|
||||||
public Tag readTag() throws XmlPullParserException, IOException {
|
public Tag readTag() throws XmlPullParserException, IOException {
|
||||||
if (wakeLock.isHeld()) {
|
if (wakeLock.isHeld()) {
|
||||||
//Log.d(LOGTAG,"there was a wake lock. releasing it till next event");
|
|
||||||
wakeLock.release(); //release wake look while waiting on next parser event
|
wakeLock.release(); //release wake look while waiting on next parser event
|
||||||
}
|
}
|
||||||
//Log.d(LOGTAG,"waiting for new event...");
|
|
||||||
while(parser.next() != XmlPullParser.END_DOCUMENT) {
|
while(parser.next() != XmlPullParser.END_DOCUMENT) {
|
||||||
//Log.d(LOGTAG,"found new event. acquiring wake lock");
|
|
||||||
wakeLock.acquire();
|
wakeLock.acquire();
|
||||||
if (parser.getEventType() == XmlPullParser.START_TAG) {
|
if (parser.getEventType() == XmlPullParser.START_TAG) {
|
||||||
Tag tag = Tag.start(parser.getName());
|
Tag tag = Tag.start(parser.getName());
|
||||||
|
Loading…
Reference in New Issue
Block a user