cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [18/18] android commit: This is an ugly merge commit, because the rebase made even less sense. This should add the old setProperty methods required for the tests. We decided to not deprecate them. I don't make a habit of doing merge commits, due to thei
Date Wed, 30 Apr 2014 22:03:02 GMT
This is an ugly merge commit, because the rebase made even less sense.
This should add the old setProperty methods required for the tests. We
decided to not deprecate them.  I don't make a habit of doing merge
commits, due to their destructive nature, but I think I might have
merged too much stuff in.

Merge branch 'pluggable_webview' of https://git-wip-us.apache.org/repos/asf/cordova-android
into pluggable_webview

Conflicts:
	framework/src/org/apache/cordova/AndroidChromeClient.java
	framework/src/org/apache/cordova/AndroidWebView.java
	framework/src/org/apache/cordova/CordovaActivity.java
	framework/src/org/apache/cordova/CordovaWebView.java


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

Branch: refs/heads/pluggable_webview
Commit: 105ccc81a54b9e547766afa71b6645b78a145568
Parents: 3571307 df05f3a
Author: Joe Bowser <bowserj@apache.org>
Authored: Wed Apr 30 14:59:40 2014 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Wed Apr 30 14:59:40 2014 -0700

----------------------------------------------------------------------
 bin/templates/cordova/defaults.xml              |   1 +
 bin/templates/cordova/lib/build.js              |  11 +-
 bin/templates/project/AndroidManifest.xml       |   2 +-
 framework/assets/www/cordova.js                 | 168 +++++++++++--------
 .../src/org/apache/cordova/AndroidWebView.java  |  41 +++++
 .../src/org/apache/cordova/CordovaActivity.java |  25 ++-
 .../org/apache/cordova/CordovaResourceApi.java  |  21 +++
 .../src/org/apache/cordova/CordovaWebView.java  |   6 +-
 .../apache/cordova/NativeToJsMessageQueue.java  |  19 ++-
 9 files changed, 198 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/105ccc81/framework/src/org/apache/cordova/AndroidWebView.java
----------------------------------------------------------------------
diff --cc framework/src/org/apache/cordova/AndroidWebView.java
index 4e86dba,2603a86..9b464b5
--- a/framework/src/org/apache/cordova/AndroidWebView.java
+++ b/framework/src/org/apache/cordova/AndroidWebView.java
@@@ -166,8 -166,6 +166,11 @@@ public class AndroidWebView extends Web
          {
              Log.d(TAG, "Your activity must implement CordovaInterface to work");
          }
++<<<<<<< HEAD
 +        this.setWebChromeClient(this.makeChromeClient());
 +        this.initWebViewClient(this.cordova);
++=======
++>>>>>>> df05f3a3c07c0630c3d598409289db7a8f3c87e3
          this.loadConfiguration();
          this.setup();
      }
@@@ -190,7 -188,6 +193,10 @@@
          {
              Log.d(TAG, "Your activity must implement CordovaInterface to work");
          }
++<<<<<<< HEAD
 +        this.setWebChromeClient(this.makeChromeClient());
++=======
++>>>>>>> df05f3a3c07c0630c3d598409289db7a8f3c87e3
          this.loadConfiguration();
          this.setup();
      }
@@@ -214,17 -211,37 +220,49 @@@
          {
              Log.d(TAG, "Your activity must implement CordovaInterface to work");
          }
++<<<<<<< HEAD
 +        this.setWebChromeClient(this.makeChromeClient());
 +        this.initWebViewClient(this.cordova);
++=======
++>>>>>>> df05f3a3c07c0630c3d598409289db7a8f3c87e3
          this.loadConfiguration();
          this.setup();
      }
  
      /**
++<<<<<<< HEAD
 +     * set the WebViewClient, but provide special case handling for IceCreamSandwich.
 +     */
 +    private void initWebViewClient(CordovaInterface cordova) {
 +        this.setWebViewClient(this.makeWebViewClient());
++=======
+      * Create a default WebViewClient object for this webview. This can be overridden by
the
+      * main application's CordovaActivity subclass.
+      *
+      * By default, it creates an AndroidWebViewClient, but we provide special case handling
for
+      * IceCreamSandwich.
+      */
+     @Override
+     public CordovaWebViewClient makeWebViewClient() {
+         if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB
||
+                 android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)
+         {
+             return (CordovaWebViewClient) new AndroidWebViewClient(this.cordova, this);
+         }
+         else
+         {
+             return (CordovaWebViewClient) new IceCreamCordovaWebViewClient(this.cordova,
this);
+         }
+     }
+ 
+     /**
+      * Create a default WebViewClient object for this webview. This can be overridden by
the
+      * main application's CordovaActivity subclass.
+      */
+     @Override
+     public CordovaChromeClient makeWebChromeClient() {
+         return (CordovaChromeClient) new AndroidChromeClient(this.cordova);
++>>>>>>> df05f3a3c07c0630c3d598409289db7a8f3c87e3
      }
  
      /**
@@@ -1074,18 -1091,4 +1112,21 @@@
      public View getView() {
          return this;
      }
++<<<<<<< HEAD
 +
 +    @Override
 +    public CordovaWebViewClient makeWebViewClient() {
 +        if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB)
{
 +            return (CordovaWebViewClient) new AndroidWebViewClient(this.cordova, this);
 +        } else {
 +            return (CordovaWebViewClient) new IceCreamCordovaWebViewClient(this.cordova,
this);
 +        }
 +    }
 +
 +    @Override
 +    public CordovaChromeClient makeChromeClient() {
 +        return (CordovaChromeClient) new AndroidChromeClient(this.cordova, this);
 +    }
++=======
++>>>>>>> df05f3a3c07c0630c3d598409289db7a8f3c87e3
  }

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/105ccc81/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --cc framework/src/org/apache/cordova/CordovaActivity.java
index 1715fde,830332e..eccb094
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@@ -219,8 -219,7 +219,6 @@@ public class CordovaActivity extends Ac
          try {
              Class webViewClass = Class.forName(r);
              Constructor<CordovaWebView> [] webViewConstructors = webViewClass.getConstructors();
-             
-             
 -
              if(CordovaWebView.class.isAssignableFrom(webViewClass)) {
                  for (Constructor<CordovaWebView> constructor : webViewConstructors)
{
                      try {
@@@ -272,7 -270,7 +269,7 @@@
       * @param webView the default constructed web view object
       */
      protected CordovaChromeClient makeChromeClient(CordovaWebView webView) {
-     	return webView.makeChromeClient();
 -        return webView.makeWebChromeClient();
++    	return webView.makeWebChromeClient();
      }
  
      /**


Mime
View raw message