cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [1/2] android commit: Adding additional condition that the phone must be made by HTC for the setNavDump to be set to true to try and work around CB-2907, if it's still a problem on HTC devices running Android 2.2, that's just the luck of the draw.
Date Thu, 04 Apr 2013 23:06:12 GMT
Updated Branches:
  refs/heads/master 778b784eb -> bb9615eed


Adding additional condition that the phone must be made by HTC for the setNavDump to be set
to true to try and work around CB-2907, if it's still a problem on HTC devices running Android
2.2, that's just the luck of the draw.


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

Branch: refs/heads/master
Commit: 18877bf80e7b8c779f5a949d5717ee61e76f37ae
Parents: b42c918
Author: Joe Bowser <bowserj@apache.org>
Authored: Thu Apr 4 16:05:35 2013 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Apr 4 16:05:35 2013 -0700

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaWebView.java     |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/18877bf8/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index e653a95..60a46a3 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -24,6 +24,7 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Stack;
+import java.util.regex.Pattern;
 
 import org.apache.cordova.Config;
 import org.apache.cordova.api.CordovaInterface;
@@ -237,7 +238,11 @@ public class CordovaWebView extends WebView {
         // Set the nav dump for HTC 2.x devices (disabling for ICS, deprecated entirely for
Jellybean 4.2)
         try {
             Method gingerbread_getMethod =  WebSettings.class.getMethod("setNavDump", new
Class[] { boolean.class });
-            if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB)
+            
+            String manufacturer = android.os.Build.MANUFACTURER;
+            Log.d(TAG, "CordovaWebView is running on device made by: " + manufacturer);
+            if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB
&&
+                    android.os.Build.MANUFACTURER.contains("HTC"))
             {
                 gingerbread_getMethod.invoke(settings, true);
             }


Mime
View raw message