Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad239ab8 authored by Vasu Nori's avatar Vasu Nori
Browse files

when closing db, close all pending statements also

Change-Id: Ia543933e0cd70852c4e60623de698bb51b976900
parent 4ed8e42c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -365,7 +365,8 @@ public class SQLiteDatabase extends SQLiteClosable {
    @Override
    protected void onAllReferencesReleased() {
        if (isOpen()) {
            dbclose();
            // close the database which will close all pending statements to be finalized also
            close();
        }
    }

@@ -1042,7 +1043,7 @@ public class SQLiteDatabase extends SQLiteClosable {
            // finalize ALL statements queued up so far
            closePendingStatements();
            // close this database instance - regardless of its reference count value
            onAllReferencesReleased();
            dbclose();
            if (mConnectionPool != null) {
                mConnectionPool.close();
            }