Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
### Fixed
* ui: subject dialog for external billing now works in dark mode
* ui: external billing icon works with dark mode now
* core: prevent SQLiteLockedException and recover from it on product database update

## [0.75.7]
### Added
Expand Down
6 changes: 4 additions & 2 deletions core/src/main/java/io/snabble/sdk/ProductDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.database.sqlite.SQLiteCantOpenDatabaseException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.os.CancellationSignal;
Expand Down Expand Up @@ -336,9 +335,12 @@ synchronized void applyDeltaUpdate(InputStream inputStream) throws IOException {
}
final SQLiteDatabase tempDb;

if (!tempDbFile.canRead() || !tempDbFile.canWrite())
throw new IOException("TempDbFile cannot be read and/or written.");

try {
tempDb = SQLiteDatabase.openOrCreateDatabase(tempDbFile, null);
} catch (SQLiteCantOpenDatabaseException e) {
} catch (SQLiteException e) {
project.logErrorEvent("Could not open or create db: %s", e.getMessage());
throw new IOException("Could not open or create db", e);
}
Expand Down