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

Commit 4d76d0b8 authored by Vasu Nori's avatar Vasu Nori
Browse files

STOPSHIP follow up to Change-Id: I392875b62ed270741633f5bffa519932e4a9f985

adding back an object that originally existed (when the bug appeared randomly)

Change-Id: Ie6fef529e7b366aaecaace5d3409f2cdc551c8ae
parent c64c6a99
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -23,12 +23,13 @@ import android.database.CursorWindow;
 */
public abstract class SQLiteClosable {
    private int mReferenceCount = 1;
    private Object mLock = new Object(); // STOPSHIP remove this line

    protected abstract void onAllReferencesReleased();
    protected void onAllReferencesReleasedFromContainer() {}

    public void acquireReference() {
        synchronized(this) {
        synchronized(mLock) { // STOPSHIP change 'mLock' to 'this'
            checkRefCount();
            if (mReferenceCount <= 0) {
                throw new IllegalStateException(
@@ -39,7 +40,7 @@ public abstract class SQLiteClosable {
    }

    public void releaseReference() {
        synchronized(this) {
        synchronized(mLock) { // STOPSHIP change 'mLock' to 'this'
            checkRefCount();
            mReferenceCount--;
            if (mReferenceCount == 0) {
@@ -49,7 +50,7 @@ public abstract class SQLiteClosable {
    }

    public void releaseReferenceFromContainer() {
        synchronized(this) {
        synchronized(mLock) { // STOPSHIP change 'mLock' to 'this'
            checkRefCount();
            mReferenceCount--;
            if (mReferenceCount == 0) {