File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
88### Fixed
99* ui: subject dialog for external billing now works in dark mode
1010* ui: external billing icon works with dark mode now
11+ * core: prevent SQLiteLockedException and recover from it on product database update
1112
1213## [ 0.75.7]
1314### Added
Original file line number Diff line number Diff line change 66import android .content .pm .PackageInfo ;
77import android .content .pm .PackageManager ;
88import android .database .Cursor ;
9- import android .database .sqlite .SQLiteCantOpenDatabaseException ;
109import android .database .sqlite .SQLiteDatabase ;
1110import android .database .sqlite .SQLiteException ;
1211import android .os .CancellationSignal ;
@@ -336,9 +335,12 @@ synchronized void applyDeltaUpdate(InputStream inputStream) throws IOException {
336335 }
337336 final SQLiteDatabase tempDb ;
338337
338+ if (!tempDbFile .canRead () || !tempDbFile .canWrite ())
339+ throw new IOException ("TempDbFile cannot be read and/or written." );
340+
339341 try {
340342 tempDb = SQLiteDatabase .openOrCreateDatabase (tempDbFile , null );
341- } catch (SQLiteCantOpenDatabaseException e ) {
343+ } catch (SQLiteException e ) {
342344 project .logErrorEvent ("Could not open or create db: %s" , e .getMessage ());
343345 throw new IOException ("Could not open or create db" , e );
344346 }
You can’t perform that action at this time.
0 commit comments