CB-2085: Fixing deleted database for ChildBrowser

This commit is contained in:
Joe Bowser 2013-02-21 11:53:06 -08:00
parent a30c2b6a75
commit 17b668a115

View File

@ -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