mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 741224 - Force unlock on tabs.db file when database is opened in read-only mode (r=blassey)
This commit is contained in:
parent
822a6bc976
commit
7a440a1f47
@ -206,8 +206,19 @@ public class TabsProvider extends ContentProvider {
|
||||
if (dbHelper != null) {
|
||||
return dbHelper;
|
||||
}
|
||||
dbHelper = new DatabaseHelper(getContext(), getDatabasePath(profile));
|
||||
|
||||
String databasePath = getDatabasePath(profile);
|
||||
dbHelper = new DatabaseHelper(getContext(), databasePath);
|
||||
mDatabasePerProfile.put(profile, dbHelper);
|
||||
|
||||
// When running on Android releases older than 8, the returned
|
||||
// database path is just filename, not the full path. We need
|
||||
// the full path when unlocking the database.
|
||||
if (Build.VERSION.SDK_INT <= 8) {
|
||||
databasePath = mContext.getDatabasePath(databasePath).getAbsolutePath();
|
||||
}
|
||||
|
||||
DBUtils.ensureDatabaseIsNotLocked(dbHelper, databasePath);
|
||||
}
|
||||
|
||||
debug("Created database helper for profile: " + profile);
|
||||
|
Loading…
Reference in New Issue
Block a user