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

View File

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

View File

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