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

Commit 75375909 authored by Vasu Nori's avatar Vasu Nori Committed by Android (Google) Code Review
Browse files

Merge "yet another race condition fix to address bug:2456970"

parents aa13fbed 1d726580
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -57,8 +57,10 @@ public abstract class SQLiteProgram extends SQLiteClosable {
            mCompiledSql = new SQLiteCompiledSql(db, sql);

            // add it to the cache of compiled-sqls
            db.addToCompiledQueries(sql, mCompiledSql);
            // but before adding it and thus making it available for anyone else to use it,
            // make sure it is acquired by me.
            mCompiledSql.acquire();
            db.addToCompiledQueries(sql, mCompiledSql);
        } else {
            // it is already in compiled-sql cache.
            // try to acquire the object.