mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-31 11:46:33 +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.
|
||||
else if (reqOk && defaultValue != null && defaultValue.equals("gap_bridge_mode:")) {
|
||||
this.appView.exposedJsApi.setNativeToJsBridgeMode(Integer.parseInt(message));
|
||||
result.confirm("");
|
||||
try {
|
||||
this.appView.exposedJsApi.setNativeToJsBridgeMode(Integer.parseInt(message));
|
||||
result.confirm("");
|
||||
} catch (NumberFormatException e){
|
||||
result.confirm("");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// Polling for JavaScript messages
|
||||
|
Loading…
x
Reference in New Issue
Block a user