mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-cordova-android
This commit is contained in:
commit
e11beade4b
@ -731,11 +731,10 @@ public class CordovaWebView extends WebView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Init preferences
|
// Init preferences
|
||||||
if ("false".equals(this.getProperty("useBrowserHistory", "false"))) {
|
this.useBrowserHistory = !"false".equals(this.getProperty("useBrowserHistory", "true"));
|
||||||
this.useBrowserHistory = false;
|
if (!this.useBrowserHistory) {
|
||||||
}
|
// Deprecated in Cordova 2.2.0.
|
||||||
else {
|
Log.w(TAG, "useBrowserHistory=false is deprecated. Use history.back() instead of navigator.app.backHistory().");
|
||||||
this.useBrowserHistory = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("true".equals(this.getProperty("fullscreen", "false"))) {
|
if ("true".equals(this.getProperty("fullscreen", "false"))) {
|
||||||
|
@ -137,7 +137,20 @@ public class Storage extends CordovaPlugin {
|
|||||||
this.path = this.cordova.getActivity().getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
|
this.path = this.cordova.getActivity().getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dbName = this.path + File.pathSeparator + db + ".db";
|
this.dbName = this.path + File.separator + db + ".db";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* What is all this nonsense? Well the separator was incorrect so the db was showing up in the wrong
|
||||||
|
* directory. This bit of code fixes that issue and moves the db to the correct directory.
|
||||||
|
*/
|
||||||
|
File oldDbFile = new File(this.path + File.pathSeparator + db + ".db");
|
||||||
|
if (oldDbFile.exists()) {
|
||||||
|
File dbPath = new File(this.path);
|
||||||
|
File dbFile = new File(dbName);
|
||||||
|
dbPath.mkdirs();
|
||||||
|
oldDbFile.renameTo(dbFile);
|
||||||
|
}
|
||||||
|
|
||||||
this.myDb = SQLiteDatabase.openOrCreateDatabase(this.dbName, null);
|
this.myDb = SQLiteDatabase.openOrCreateDatabase(this.dbName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user