Don't leak cursors
b/15830514 Change-Id: I91f452fc7c14a076d7f9078ec066215b28ddc3c3
This commit is contained in:
parent
c24d5d4f19
commit
2eecdd1a50
@ -4592,9 +4592,14 @@ public class EmailProvider extends ContentProvider
|
|||||||
final int nameColumn = projectionList.indexOf(UIProvider.FolderColumns.NAME);
|
final int nameColumn = projectionList.indexOf(UIProvider.FolderColumns.NAME);
|
||||||
final int typeColumn = projectionList.indexOf(UIProvider.FolderColumns.TYPE);
|
final int typeColumn = projectionList.indexOf(UIProvider.FolderColumns.TYPE);
|
||||||
if (c.moveToFirst()) {
|
if (c.moveToFirst()) {
|
||||||
c = getUiFolderCursorRowFromMailboxCursorRow(
|
final Cursor closeThis = c;
|
||||||
new MatrixCursorWithCachedColumns(uiProjection),
|
try {
|
||||||
uiProjection.length, c, nameColumn, typeColumn);
|
c = getUiFolderCursorRowFromMailboxCursorRow(
|
||||||
|
new MatrixCursorWithCachedColumns(uiProjection),
|
||||||
|
uiProjection.length, c, nameColumn, typeColumn);
|
||||||
|
} finally {
|
||||||
|
closeThis.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
notifyUri = UIPROVIDER_FOLDER_NOTIFIER.buildUpon().appendPath(mailboxIdString)
|
notifyUri = UIPROVIDER_FOLDER_NOTIFIER.buildUpon().appendPath(mailboxIdString)
|
||||||
.build();
|
.build();
|
||||||
|
Loading…
Reference in New Issue
Block a user