Compare commits

...

1 Commits
3.7.2 ... 3.7.x

Author SHA1 Message Date
caoyr
c1c0a63e5e CB-9135 fix the vulnerability bug
This closes 181
https://github.com/apache/cordova-android/pull/181
2015-06-10 08:59:31 -07:00

View File

@@ -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)
{