File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ public Date getLastUpdateDate() {
295295 * <p>
296296 * Returns true if successful, false otherwise
297297 */
298- void applyDeltaUpdate (InputStream inputStream ) throws IOException {
298+ synchronized void applyDeltaUpdate (InputStream inputStream ) throws IOException {
299299 if (dbName == null ){
300300 return ;
301301 }
@@ -308,6 +308,9 @@ void applyDeltaUpdate(InputStream inputStream) throws IOException {
308308 File dbFile = application .getDatabasePath (dbName );
309309 File tempDbFile = application .getDatabasePath ("_" + dbName );
310310
311+ SQLiteDatabase tempDbBUG123 = SQLiteDatabase .openOrCreateDatabase (tempDbFile , null );
312+ tempDbBUG123 .beginTransaction ();
313+
311314 if (!deleteDatabase (tempDbFile )) {
312315 Logger .e ("Could not apply delta update: Could not delete temp database" );
313316 return ;
@@ -401,7 +404,7 @@ void applyDeltaUpdate(InputStream inputStream) throws IOException {
401404 * <p>
402405 * If a read error occurs, an IOException will be thrown.
403406 */
404- void applyFullUpdate (InputStream inputStream ) throws IOException {
407+ synchronized void applyFullUpdate (InputStream inputStream ) throws IOException {
405408 if (dbName == null ){
406409 return ;
407410 }
You can’t perform that action at this time.
0 commit comments