Remove whitelists from WebView classes

This commit is contained in:
Ian Clelland 2014-10-09 15:28:29 -04:00
parent 8df2d4fcfd
commit 83377d366a
3 changed files with 1 additions and 23 deletions

View File

@ -86,8 +86,6 @@ public class AndroidWebView extends WebView implements CordovaWebView {
private WebChromeClient.CustomViewCallback mCustomViewCallback;
private CordovaResourceApi resourceApi;
private Whitelist internalWhitelist;
private Whitelist externalWhitelist;
private CordovaPreferences preferences;
private CordovaUriHelper helper;
// The URL passed to loadUrl(), not necessarily the URL of the current page.
@ -112,14 +110,11 @@ public class AndroidWebView extends WebView implements CordovaWebView {
// Use two-phase init so that the control will work with XML layouts.
@Override
public void init(CordovaInterface cordova, List<PluginEntry> pluginEntries,
Whitelist internalWhitelist, Whitelist externalWhitelist,
CordovaPreferences preferences) {
if (this.cordova != null) {
throw new IllegalStateException();
}
this.cordova = cordova;
this.internalWhitelist = internalWhitelist;
this.externalWhitelist = externalWhitelist;
this.preferences = preferences;
this.helper = new CordovaUriHelper(cordova, this);
@ -750,16 +745,6 @@ public class AndroidWebView extends WebView implements CordovaWebView {
return this;
}
@Override
public Whitelist getWhitelist() {
return this.internalWhitelist;
}
@Override
public Whitelist getExternalWhitelist() {
return this.externalWhitelist;
}
@Override
public CordovaPreferences getPreferences() {
return preferences;

View File

@ -123,8 +123,6 @@ public class CordovaActivity extends Activity implements CordovaInterface {
// Read from config.xml:
protected CordovaPreferences preferences;
protected Whitelist internalWhitelist;
protected Whitelist externalWhitelist;
protected String launchUrl;
protected ArrayList<PluginEntry> pluginEntries;
@ -185,8 +183,6 @@ public class CordovaActivity extends Activity implements CordovaInterface {
preferences = parser.getPreferences();
preferences.setPreferencesBundle(getIntent().getExtras());
preferences.copyIntoIntentExtras(this);
internalWhitelist = parser.getInternalWhitelist();
externalWhitelist = parser.getExternalWhitelist();
launchUrl = parser.getLaunchUrl();
pluginEntries = parser.getPluginEntries();
Config.parser = parser;
@ -266,7 +262,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
// If all else fails, return a default WebView
ret = new AndroidWebView(this);
}
ret.init(this, pluginEntries, internalWhitelist, externalWhitelist, preferences);
ret.init(this, pluginEntries, preferences);
return ret;
}

View File

@ -13,7 +13,6 @@ public interface CordovaWebView {
public static final String CORDOVA_VERSION = "4.0.0-dev";
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries,
Whitelist internalWhitelist, Whitelist externalWhitelist,
CordovaPreferences preferences);
View getView();
@ -81,8 +80,6 @@ public interface CordovaWebView {
PluginManager getPluginManager();
Whitelist getWhitelist();
Whitelist getExternalWhitelist();
CordovaPreferences getPreferences();
void onFilePickerResult(Uri uri);