Guard against null request in Android 1.5/1.6

This commit is contained in:
macdonst 2011-01-06 00:29:17 +08:00
parent a7415bcfc9
commit 54eff557d9

View File

@ -188,6 +188,7 @@ public class CallbackServer implements Runnable {
request = xhrReader.readLine();
String response = "";
//System.out.println("CallbackServerRequest="+request);
if (request != null) {
if (request.contains("GET")) {
// Must have security token
@ -235,7 +236,9 @@ public class CallbackServer implements Runnable {
//System.out.println("CallbackServer: closing output");
output.writeBytes(response);
output.flush();
}
output.close();
xhrReader.close();
}
} catch (IOException e) {
e.printStackTrace();