From c1c0a63e5e5a0738d8b1af1a6789e777986a2821 Mon Sep 17 00:00:00 2001 From: caoyr Date: Tue, 9 Jun 2015 17:07:56 +0800 Subject: [PATCH] CB-9135 fix the vulnerability bug This closes 181 https://github.com/apache/cordova-android/pull/181 --- .../org/apache/cordova/CordovaWebView.java | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java index 0e9d35dd..14919c4b 100755 --- a/framework/src/org/apache/cordova/CordovaWebView.java +++ b/framework/src/org/apache/cordova/CordovaWebView.java @@ -405,7 +405,7 @@ public class CordovaWebView extends WebView { // Create a timeout timer for loadUrl final CordovaWebView me = this; final int currentLoadUrlTimeout = me.loadUrlTimeout; - final int loadUrlTimeoutValue = Integer.parseInt(this.getProperty("LoadUrlTimeoutValue", "20000")); + final int loadUrlTimeoutValue = preferences.getInteger("LoadUrlTimeoutValue", 20000); // Timeout error method final Runnable loadError = new Runnable() { @@ -609,26 +609,6 @@ public class CordovaWebView extends WebView { } } - /** - * Get string property for activity. - * - * @param name - * @param defaultValue - * @return the String value for the named property - */ - public String getProperty(String name, String defaultValue) { - Bundle bundle = this.cordova.getActivity().getIntent().getExtras(); - if (bundle == null) { - return defaultValue; - } - name = name.toLowerCase(Locale.getDefault()); - Object p = bundle.get(name); - if (p == null) { - return defaultValue; - } - return p.toString(); - } - @Override public boolean onKeyDown(int keyCode, KeyEvent event) {