Ticket 136: window.openDatabase() in Android 3.0 throws SECURITY_ERR (most code written by Simon MacDonald - I just tested and checked in)

When you call window.openDatabase() on an Android 3.0 device you get and error something like this:

E/Web Console( 1791): SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

Simon worked with Pat for a bit and they think this is a WebKit or Android/WebKit interaction bug. In the meantime this fix determines if you are on Android 3.0 and uses Droid_DB if so.
This commit is contained in:
Bryce Curtis
2011-04-19 16:54:16 -05:00
parent 44945f9d5e
commit 673a8871df
2 changed files with 36 additions and 11 deletions

View File

@@ -389,7 +389,7 @@ PhoneGap.addConstructor(function() {
navigator.openDatabase = window.openDatabase = DroidDB_openDatabase;
window.droiddb = new DroidDB();
}
if (typeof window.openDatabase === "undefined") {
if ((typeof window.openDatabase === "undefined") || (navigator.userAgent.indexOf("Android 3.0") != -1)) {
setupDroidDB();
} else {
window.openDatabase_orig = window.openDatabase;