mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 09:02:50 +08:00
Remove obsolete check for JellyBean (GH-534) (#544)
to work properly on Android Pie
was introduced in dc0bfeb0c
(CB-11828)
Resolves #534
Co-authored-by: <pradiv-kumar@users.noreply.github.com>
Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
This commit is contained in:
parent
7da53741cd
commit
e31596f60e
11
cordova-js-src/exec.js
vendored
11
cordova-js-src/exec.js
vendored
@ -109,17 +109,6 @@ function androidExec(success, fail, service, action, args) {
|
||||
}
|
||||
|
||||
androidExec.init = function() {
|
||||
//CB-11828
|
||||
//This failsafe checks the version of Android and if it's Jellybean, it switches it to
|
||||
//using the Online Event bridge for communicating from Native to JS
|
||||
//
|
||||
//It's ugly, but it's necessary.
|
||||
var check = navigator.userAgent.toLowerCase().match(/android\s[0-9].[0-9]/);
|
||||
var version_code = check && check[0].match(/4.[0-3].*/);
|
||||
if (version_code != null && nativeToJsBridgeMode == nativeToJsModes.EVAL_BRIDGE) {
|
||||
nativeToJsBridgeMode = nativeToJsModes.ONLINE_EVENT;
|
||||
}
|
||||
|
||||
bridgeSecret = +prompt('', 'gap_init:' + nativeToJsBridgeMode);
|
||||
channel.onNativeReady.fire();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user