mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 969922 - Pre: Close cursor. r=mcomella
This commit is contained in:
parent
70c143f2c1
commit
6c941ea917
@ -13,6 +13,8 @@ import android.util.Log;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import org.mozilla.gecko.db.BrowserContract;
|
||||
|
||||
/*
|
||||
* This test is meant to exercise all operations exposed by Fennec's
|
||||
* history and bookmarks content provider. It does so in an isolated
|
||||
@ -158,10 +160,17 @@ public class testBrowserProvider extends ContentProviderTest {
|
||||
}
|
||||
|
||||
private void loadMobileFolderId() throws Exception {
|
||||
Cursor c = getBookmarkByGuid(MOBILE_FOLDER_GUID);
|
||||
mAsserter.is(c.moveToFirst(), true, "Mobile bookmarks folder is present");
|
||||
Cursor c = null;
|
||||
try {
|
||||
c = getBookmarkByGuid(BrowserContract.Bookmarks.MOBILE_FOLDER_GUID);
|
||||
mAsserter.is(c.moveToFirst(), true, "Mobile bookmarks folder is present");
|
||||
|
||||
mMobileFolderId = c.getLong(c.getColumnIndex(mBookmarksIdCol));
|
||||
mMobileFolderId = c.getLong(c.getColumnIndex(BrowserContract.Bookmarks._ID));
|
||||
} finally {
|
||||
if (c != null) {
|
||||
c.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureEmptyDatabase() throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user