From e02322b66b7588e93433697493b1a4795e78227a Mon Sep 17 00:00:00 2001 From: macdonst Date: Sat, 26 Nov 2011 07:33:06 +0800 Subject: [PATCH] Remove addWhiteList from public API --- framework/assets/js/app.js | 10 ---------- framework/src/com/phonegap/App.java | 13 ------------- framework/src/com/phonegap/DroidGap.java | 2 +- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/framework/assets/js/app.js b/framework/assets/js/app.js index 2068458a..8734cefd 100755 --- a/framework/assets/js/app.js +++ b/framework/assets/js/app.js @@ -95,16 +95,6 @@ App.prototype.exitApp = function() { return PhoneGap.exec(null, null, "App", "exitApp", []); }; -/** - * Add entry to approved list of URLs (whitelist) that will be loaded into PhoneGap container instead of default browser. - * - * @param origin URL regular expression to allow - * @param subdomains T=include all subdomains under origin - */ -App.prototype.addWhiteListEntry = function(origin, subdomains) { - return PhoneGap.exec(null, null, "App", "addWhiteListEntry", [origin, subdomains]); -}; - PhoneGap.addConstructor(function() { navigator.app = new App(); }); diff --git a/framework/src/com/phonegap/App.java b/framework/src/com/phonegap/App.java index 62074345..bd56bc16 100755 --- a/framework/src/com/phonegap/App.java +++ b/framework/src/com/phonegap/App.java @@ -70,9 +70,6 @@ public class App extends Plugin { else if (action.equals("exitApp")) { this.exitApp(); } - else if (action.equals("addWhiteListEntry")) { - this.addWhiteListEntry(args.getString(0), args.optBoolean(1)); - } return new PluginResult(status, result); } catch (JSONException e) { return new PluginResult(PluginResult.Status.JSON_EXCEPTION); @@ -198,14 +195,4 @@ public class App extends Plugin { public void exitApp() { ((DroidGap)this.ctx).endActivity(); } - - /** - * Add entry to approved list of URLs (whitelist) - * - * @param origin URL regular expression to allow - * @param subdomains T=include all subdomains under origin - */ - public void addWhiteListEntry(String origin, boolean subdomains) { - ((DroidGap)this.ctx).addWhiteListEntry(origin, subdomains); - } } diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 218c4735..6a0a0613 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -1767,7 +1767,7 @@ public class DroidGap extends PhonegapActivity { * @param origin URL regular expression to allow * @param subdomains T=include all subdomains under origin */ - public void addWhiteListEntry(String origin, boolean subdomains) { + private void addWhiteListEntry(String origin, boolean subdomains) { try { // Unlimited access to network resources if(origin.compareTo("*") == 0) {