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

Commit 03a566a1 authored by Hans Boehm's avatar Hans Boehm
Browse files

Fix missing Cursor close

Bug: 33253215
Bug: 33251173
Change-Id: I4c353dcf916e67ffcba2b442ea5a4f48edc24626
parent 146d97f6
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -334,13 +334,14 @@ public class ExpressionDB {
        RowData result;
        waitForExpressionDB();
        String args[] = new String[] { Long.toString(index) };
        Cursor resultC = mExpressionDB.rawQuery(SQL_GET_ROW, args);
        try (Cursor resultC = mExpressionDB.rawQuery(SQL_GET_ROW, args)) {
            if (!resultC.moveToFirst()) {
                throw new AssertionError("Missing Row");
            } else {
                result = new RowData(resultC.getBlob(1), resultC.getInt(2) /* flags */,
                        resultC.getLong(3) /* timestamp */);
            }
        }
        return result;
    }