cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: CB-2085: Fixing deleted database for ChildBrowser
Date Thu, 21 Feb 2013 19:53:26 GMT
Updated Branches:
  refs/heads/master a30c2b6a7 -> 17b668a11


CB-2085: Fixing deleted database for ChildBrowser


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

Branch: refs/heads/master
Commit: 17b668a115852eddb5f8c5a84abb281f6dc0d9f4
Parents: a30c2b6
Author: Joe Bowser <bowserj@apache.org>
Authored: Thu Feb 21 11:53:06 2013 -0800
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Feb 21 11:53:06 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/17b668a1/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 4731adb..166dcf4 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -259,9 +259,14 @@ public class CordovaWebView extends WebView {
         if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
             Level16Apis.enableUniversalAccess(settings);
         // Enable database
-        settings.setDatabaseEnabled(true);
+        // We keep this disabled because we use or shim to get around DOM_EXCEPTION_ERROR_16
         String databasePath = this.cordova.getActivity().getApplicationContext().getDir("database",
Context.MODE_PRIVATE).getPath();
-        settings.setDatabasePath(databasePath);
+        if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB)
+        {
+            settings.setDatabaseEnabled(true);
+            settings.setDatabasePath(databasePath);
+        }
+        
         settings.setGeolocationDatabasePath(databasePath);
 
         // Enable DOM storage


Mime
View raw message