mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Guard against null request in Android 1.5/1.6
This commit is contained in:
parent
a7415bcfc9
commit
54eff557d9
@ -188,6 +188,7 @@ public class CallbackServer implements Runnable {
|
|||||||
request = xhrReader.readLine();
|
request = xhrReader.readLine();
|
||||||
String response = "";
|
String response = "";
|
||||||
//System.out.println("CallbackServerRequest="+request);
|
//System.out.println("CallbackServerRequest="+request);
|
||||||
|
if (request != null) {
|
||||||
if (request.contains("GET")) {
|
if (request.contains("GET")) {
|
||||||
|
|
||||||
// Must have security token
|
// Must have security token
|
||||||
@ -235,7 +236,9 @@ public class CallbackServer implements Runnable {
|
|||||||
//System.out.println("CallbackServer: closing output");
|
//System.out.println("CallbackServer: closing output");
|
||||||
output.writeBytes(response);
|
output.writeBytes(response);
|
||||||
output.flush();
|
output.flush();
|
||||||
|
}
|
||||||
output.close();
|
output.close();
|
||||||
|
xhrReader.close();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user