mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
[CB-4280] handle invalid bridge mode request
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user