From e99f75d59ba36f9c16e565af7b02af6c6fe510f2 Mon Sep 17 00:00:00 2001 From: macdonst Date: Mon, 16 May 2011 23:12:01 +0800 Subject: [PATCH] Issue #85: window.openDatabase throws DOM Exception 18 on Android 3.1 The way were were detecting we were on an Android 3.0 device was not applicable for Android 3.1. I've made and update so that any Android 3.X device will use our implementation of web sql databases instead of the built in one which thows a security error. --- framework/assets/js/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/assets/js/storage.js b/framework/assets/js/storage.js index c3cca1ad..6915a366 100755 --- a/framework/assets/js/storage.js +++ b/framework/assets/js/storage.js @@ -397,7 +397,7 @@ PhoneGap.addConstructor(function() { navigator.openDatabase = window.openDatabase = DroidDB_openDatabase; window.droiddb = new DroidDB(); } - if ((typeof window.openDatabase === "undefined") || (navigator.userAgent.indexOf("Android 3.0") != -1)) { + if ((typeof window.openDatabase === "undefined") || (navigator.userAgent.indexOf("Android 3.") != -1)) { setupDroidDB(); } else { window.openDatabase_orig = window.openDatabase;