mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-03 05:11:59 +08:00
[CB-4280] handle invalid bridge mode request
This commit is contained in:
parent
b915aafb5b
commit
7c7230dd35
@ -228,8 +228,13 @@ public class CordovaChromeClient extends WebChromeClient {
|
|||||||
|
|
||||||
// Sets the native->JS bridge mode.
|
// Sets the native->JS bridge mode.
|
||||||
else if (reqOk && defaultValue != null && defaultValue.equals("gap_bridge_mode:")) {
|
else if (reqOk && defaultValue != null && defaultValue.equals("gap_bridge_mode:")) {
|
||||||
this.appView.exposedJsApi.setNativeToJsBridgeMode(Integer.parseInt(message));
|
try {
|
||||||
result.confirm("");
|
this.appView.exposedJsApi.setNativeToJsBridgeMode(Integer.parseInt(message));
|
||||||
|
result.confirm("");
|
||||||
|
} catch (NumberFormatException e){
|
||||||
|
result.confirm("");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Polling for JavaScript messages
|
// Polling for JavaScript messages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user