You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2015/03/25 14:34:20 UTC

android commit: CB-8715 Update comments to match whitelist code (close #166)

Repository: cordova-android
Updated Branches:
  refs/heads/master 32e84d231 -> 38a8d7742


CB-8715 Update comments to match whitelist code (close #166)


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/38a8d774
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/38a8d774
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/38a8d774

Branch: refs/heads/master
Commit: 38a8d7742edb330027732fce832a5b7945eae698
Parents: 32e84d2
Author: Jason Chase <ja...@gmail.com>
Authored: Tue Mar 24 23:35:22 2015 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 25 09:34:13 2015 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/PluginManager.java   | 46 +++++++-------------
 1 file changed, 15 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/38a8d774/framework/src/org/apache/cordova/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/PluginManager.java b/framework/src/org/apache/cordova/PluginManager.java
index 7115bb1..87663be 100755
--- a/framework/src/org/apache/cordova/PluginManager.java
+++ b/framework/src/org/apache/cordova/PluginManager.java
@@ -308,18 +308,13 @@ public class PluginManager {
     /**
      * Called when the webview is going to request an external resource.
      *
-     * This delegates to the installed plugins, which must all return true for
-     * this method to return true.
+     * This delegates to the installed plugins, and returns true/false for the
+     * first plugin to provide a non-null result.  If no plugins respond, then
+     * the default policy is applied.
      *
      * @param url       The URL that is being requested.
-     * @return          Tri-State:
-     *                    null: All plugins returned null (the default). This
-     *                          indicates that the default policy should be
-     *                          followed.
-     *                    true: All plugins returned true (allow the resource
-     *                          to load)
-     *                    false: At least one plugin returned false (block the
-     *                           resource)
+     * @return          Returns true to allow the resource to load,
+     *                  false to block the resource.
      */
     public boolean shouldAllowRequest(String url) {
         for (PluginEntry entry : this.entryMap.values()) {
@@ -351,18 +346,13 @@ public class PluginManager {
     /**
      * Called when the webview is going to change the URL of the loaded content.
      *
-     * This delegates to the installed plugins, which must all return true for
-     * this method to return true. A true result will allow the new page to load;
-     * a false result will prevent the page from loading.
+     * This delegates to the installed plugins, and returns true/false for the
+     * first plugin to provide a non-null result.  If no plugins respond, then
+     * the default policy is applied.
      *
      * @param url       The URL that is being requested.
-     * @return          Tri-State:
-     *                    null: All plugins returned null (the default). This
-     *                          indicates that the default policy should be
-     *                          followed.
-     *                    true: All plugins returned true (allow the navigation)
-     *                    false: At least one plugin returned false (block the
-     *                           navigation)
+     * @return          Returns true to allow the navigation,
+     *                  false to block the navigation.
      */
     public boolean shouldAllowNavigation(String url) {
         for (PluginEntry entry : this.entryMap.values()) {
@@ -402,19 +392,13 @@ public class PluginManager {
      * Called when the webview is going not going to navigate, but may launch
      * an Intent for an URL.
      *
-     * This delegates to the installed plugins, which must all return true for
-     * this method to return true. A true result will allow the URL to launch;
-     * a false result will prevent the URL from loading.
+     * This delegates to the installed plugins, and returns true/false for the
+     * first plugin to provide a non-null result.  If no plugins respond, then
+     * the default policy is applied.
      *
      * @param url       The URL that is being requested.
-     * @return          Tri-State:
-     *                    null: All plugins returned null (the default). This
-     *                          indicates that the default policy should be
-     *                          followed.
-     *                    true: All plugins returned true (allow the URL to
-     *                          launch an intent)
-     *                    false: At least one plugin returned false (block the
-     *                           intent)
+     * @return          Returns true to allow the URL to launch an intent,
+     *                  false to block the intent.
      */
     public Boolean shouldOpenExternalUrl(String url) {
         for (PluginEntry entry : this.entryMap.values()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org