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

Commit 8a358a7e authored by Vasu Nori's avatar Vasu Nori
Browse files

bug:3497143 don't print warning if it is a bug in platform - not in app.

fixing a couple of very confusing warnings..

Change-Id: I3c91fa53fc73a2fb4bee213e33af56c4bdb75fd8
parent 108500ab
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -117,7 +117,8 @@ public abstract class AbstractWindowedCursor extends AbstractCursor {
        super.checkPosition();
        
        if (mWindow == null) {
            throw new StaleDataException("Attempting to access a closed cursor");
            throw new StaleDataException("Attempting to access a closed CursorWindow." +
                    "Most probable cause: cursor is deactivated prior to calling this method.");
        }
    }

+3 −6
Original line number Diff line number Diff line
@@ -568,12 +568,9 @@ public class CursorWindow extends SQLiteClosable implements Parcelable {
        if (nWindow == 0) {
            return;
        }
        if (StrictMode.vmSqliteObjectLeaksEnabled()) {
            StrictMode.onSqliteObjectLeaked(
                    "Releasing cursor in a finalizer. Please ensure " +
                    "that you explicitly call close() on your cursor: ",
                    mStackTrace);
        }
        // due to bugs 3329504, 3502276, cursorwindow sometimes is closed in fialize()
        // don't print any warning saying "don't release cursor in finzlize"
        // because it is a bug in framework code - NOT an app bug.
        recordClosingOfWindow(nWindow);
        close_native();
    }