Cache column name/indexes so we can use getColumnIndex()
MatrixCursor doesn't do this, so we need to add our own cache. Depends on Ia5ffd31f54a2a335f495df5e0d1a0886ee08c14b Change-Id: Ica78e3cec747bf86fcef16508156e359216c64fe
This commit is contained in:
parent
80b5bb3dfc
commit
7fdde9bb4a
@ -19,12 +19,13 @@ package com.android.email.data;
|
|||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.database.MatrixCursor;
|
import android.database.MatrixCursor;
|
||||||
|
|
||||||
|
import com.android.mail.utils.MatrixCursorWithCachedColumns;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link MatrixCursor} which takes an extra {@link Cursor} to the constructor, and close
|
* {@link MatrixCursor} which takes an extra {@link Cursor} to the constructor, and close
|
||||||
* it when self is closed.
|
* it when self is closed.
|
||||||
*/
|
*/
|
||||||
public class ClosingMatrixCursor extends MatrixCursor {
|
public class ClosingMatrixCursor extends MatrixCursorWithCachedColumns {
|
||||||
private final Cursor mInnerCursor;
|
private final Cursor mInnerCursor;
|
||||||
|
|
||||||
public ClosingMatrixCursor(String[] columnNames, Cursor innerCursor) {
|
public ClosingMatrixCursor(String[] columnNames, Cursor innerCursor) {
|
||||||
|
@ -16,14 +16,6 @@
|
|||||||
|
|
||||||
package com.android.email.provider;
|
package com.android.email.provider;
|
||||||
|
|
||||||
import com.android.emailcommon.Logging;
|
|
||||||
import com.android.emailcommon.internet.MimeUtility;
|
|
||||||
import com.android.emailcommon.provider.EmailContent;
|
|
||||||
import com.android.emailcommon.provider.EmailContent.Attachment;
|
|
||||||
import com.android.emailcommon.provider.EmailContent.AttachmentColumns;
|
|
||||||
import com.android.emailcommon.utility.AttachmentUtilities;
|
|
||||||
import com.android.emailcommon.utility.AttachmentUtilities.Columns;
|
|
||||||
|
|
||||||
import android.content.ContentProvider;
|
import android.content.ContentProvider;
|
||||||
import android.content.ContentUris;
|
import android.content.ContentUris;
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
@ -38,6 +30,15 @@ import android.os.Binder;
|
|||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.emailcommon.Logging;
|
||||||
|
import com.android.emailcommon.internet.MimeUtility;
|
||||||
|
import com.android.emailcommon.provider.EmailContent;
|
||||||
|
import com.android.emailcommon.provider.EmailContent.Attachment;
|
||||||
|
import com.android.emailcommon.provider.EmailContent.AttachmentColumns;
|
||||||
|
import com.android.emailcommon.utility.AttachmentUtilities;
|
||||||
|
import com.android.emailcommon.utility.AttachmentUtilities.Columns;
|
||||||
|
import com.android.mail.utils.MatrixCursorWithCachedColumns;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
@ -275,7 +276,7 @@ public class AttachmentProvider extends ContentProvider {
|
|||||||
c.close();
|
c.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixCursor ret = new MatrixCursor(projection);
|
MatrixCursor ret = new MatrixCursorWithCachedColumns(projection);
|
||||||
Object[] values = new Object[projection.length];
|
Object[] values = new Object[projection.length];
|
||||||
for (int i = 0, count = projection.length; i < count; i++) {
|
for (int i = 0, count = projection.length; i < count; i++) {
|
||||||
String column = projection[i];
|
String column = projection[i];
|
||||||
|
@ -27,6 +27,7 @@ import android.util.Log;
|
|||||||
import android.util.LruCache;
|
import android.util.LruCache;
|
||||||
|
|
||||||
import com.android.email2.ui.MailActivityEmail;
|
import com.android.email2.ui.MailActivityEmail;
|
||||||
|
import com.android.mail.utils.MatrixCursorWithCachedColumns;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -543,7 +544,7 @@ public final class ContentCache {
|
|||||||
Cursor c = get(id);
|
Cursor c = get(id);
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
// Make a new MatrixCursor with the requested columns
|
// Make a new MatrixCursor with the requested columns
|
||||||
MatrixCursor mc = new MatrixCursor(projection, 1);
|
MatrixCursor mc = new MatrixCursorWithCachedColumns(projection, 1);
|
||||||
if (c.getCount() == 0) {
|
if (c.getCount() == 0) {
|
||||||
return mc;
|
return mc;
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,7 @@ import com.android.mail.providers.UIProvider.ConversationSendingState;
|
|||||||
import com.android.mail.providers.UIProvider.DraftType;
|
import com.android.mail.providers.UIProvider.DraftType;
|
||||||
import com.android.mail.providers.UIProvider.Swipe;
|
import com.android.mail.providers.UIProvider.Swipe;
|
||||||
import com.android.mail.utils.LogUtils;
|
import com.android.mail.utils.LogUtils;
|
||||||
|
import com.android.mail.utils.MatrixCursorWithCachedColumns;
|
||||||
import com.android.mail.utils.MatrixCursorWithExtra;
|
import com.android.mail.utils.MatrixCursorWithExtra;
|
||||||
import com.android.mail.utils.Utils;
|
import com.android.mail.utils.Utils;
|
||||||
import com.android.mail.widget.BaseWidgetProvider;
|
import com.android.mail.widget.BaseWidgetProvider;
|
||||||
@ -1254,7 +1255,7 @@ public class EmailProvider extends ContentProvider {
|
|||||||
case ACCOUNT_ID:
|
case ACCOUNT_ID:
|
||||||
case HOSTAUTH_ID:
|
case HOSTAUTH_ID:
|
||||||
case POLICY_ID:
|
case POLICY_ID:
|
||||||
return new MatrixCursor(projection, 0);
|
return new MatrixCursorWithCachedColumns(projection, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
@ -1344,7 +1345,7 @@ public class EmailProvider extends ContentProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Return a cursor with an id projection
|
// Return a cursor with an id projection
|
||||||
MatrixCursor mc = new MatrixCursor(EmailContent.ID_PROJECTION);
|
MatrixCursor mc = new MatrixCursorWithCachedColumns(EmailContent.ID_PROJECTION);
|
||||||
mc.addRow(new Object[] {accountId});
|
mc.addRow(new Object[] {accountId});
|
||||||
c = mc;
|
c = mc;
|
||||||
break;
|
break;
|
||||||
@ -1355,7 +1356,7 @@ public class EmailProvider extends ContentProvider {
|
|||||||
int type = Integer.parseInt(pathSegments.get(2));
|
int type = Integer.parseInt(pathSegments.get(2));
|
||||||
long mailboxId = getMailboxIdFromMailboxTypeMap(accountId, type);
|
long mailboxId = getMailboxIdFromMailboxTypeMap(accountId, type);
|
||||||
// Return a cursor with an id projection
|
// Return a cursor with an id projection
|
||||||
mc = new MatrixCursor(EmailContent.ID_PROJECTION);
|
mc = new MatrixCursorWithCachedColumns(EmailContent.ID_PROJECTION);
|
||||||
mc.addRow(new Object[] {mailboxId});
|
mc.addRow(new Object[] {mailboxId});
|
||||||
c = mc;
|
c = mc;
|
||||||
break;
|
break;
|
||||||
@ -1375,7 +1376,7 @@ public class EmailProvider extends ContentProvider {
|
|||||||
int accountCount = mMailboxTypeMap.size();
|
int accountCount = mMailboxTypeMap.size();
|
||||||
// In the rare case there are MAX_CACHED_ACCOUNTS or more, we can't do this
|
// In the rare case there are MAX_CACHED_ACCOUNTS or more, we can't do this
|
||||||
if (accountCount < MAX_CACHED_ACCOUNTS) {
|
if (accountCount < MAX_CACHED_ACCOUNTS) {
|
||||||
mc = new MatrixCursor(projection, 1);
|
mc = new MatrixCursorWithCachedColumns(projection, 1);
|
||||||
mc.addRow(new Object[] {accountCount});
|
mc.addRow(new Object[] {accountCount});
|
||||||
c = mc;
|
c = mc;
|
||||||
break;
|
break;
|
||||||
@ -3061,7 +3062,7 @@ outer:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Cursor getVirtualMailboxCursor(long mailboxId) {
|
private Cursor getVirtualMailboxCursor(long mailboxId) {
|
||||||
MatrixCursor mc = new MatrixCursor(UIProvider.FOLDERS_PROJECTION, 1);
|
MatrixCursor mc = new MatrixCursorWithCachedColumns(UIProvider.FOLDERS_PROJECTION, 1);
|
||||||
mc.addRow(getVirtualMailboxRow(getVirtualMailboxAccountId(mailboxId),
|
mc.addRow(getVirtualMailboxRow(getVirtualMailboxAccountId(mailboxId),
|
||||||
getVirtualMailboxType(mailboxId)));
|
getVirtualMailboxType(mailboxId)));
|
||||||
return mc;
|
return mc;
|
||||||
@ -3201,7 +3202,7 @@ outer:
|
|||||||
SQLiteDatabase db = getDatabase(context);
|
SQLiteDatabase db = getDatabase(context);
|
||||||
String id = uri.getPathSegments().get(1);
|
String id = uri.getPathSegments().get(1);
|
||||||
if (id.equals(COMBINED_ACCOUNT_ID_STRING)) {
|
if (id.equals(COMBINED_ACCOUNT_ID_STRING)) {
|
||||||
MatrixCursor mc = new MatrixCursor(UIProvider.FOLDERS_PROJECTION, 2);
|
MatrixCursor mc = new MatrixCursorWithCachedColumns(UIProvider.FOLDERS_PROJECTION, 2);
|
||||||
Object[] row = getVirtualMailboxRow(COMBINED_ACCOUNT_ID, Mailbox.TYPE_INBOX);
|
Object[] row = getVirtualMailboxRow(COMBINED_ACCOUNT_ID, Mailbox.TYPE_INBOX);
|
||||||
int numUnread = EmailContent.count(context, Message.CONTENT_URI,
|
int numUnread = EmailContent.count(context, Message.CONTENT_URI,
|
||||||
MessageColumns.MAILBOX_KEY + " IN (SELECT " + MailboxColumns.ID +
|
MessageColumns.MAILBOX_KEY + " IN (SELECT " + MailboxColumns.ID +
|
||||||
@ -3228,7 +3229,7 @@ outer:
|
|||||||
} else {
|
} else {
|
||||||
// Add starred virtual folder to the cursor
|
// Add starred virtual folder to the cursor
|
||||||
// Show number of messages as unread count (for backward compatibility)
|
// Show number of messages as unread count (for backward compatibility)
|
||||||
MatrixCursor starCursor = new MatrixCursor(uiProjection, 1);
|
MatrixCursor starCursor = new MatrixCursorWithCachedColumns(uiProjection, 1);
|
||||||
Object[] row = getVirtualMailboxRow(Long.parseLong(id), Mailbox.TYPE_STARRED);
|
Object[] row = getVirtualMailboxRow(Long.parseLong(id), Mailbox.TYPE_STARRED);
|
||||||
row[UIProvider.FOLDER_UNREAD_COUNT_COLUMN] = numStarred;
|
row[UIProvider.FOLDER_UNREAD_COUNT_COLUMN] = numStarred;
|
||||||
row[UIProvider.FOLDER_ICON_RES_ID_COLUMN] = R.drawable.ic_menu_star_holo_light;
|
row[UIProvider.FOLDER_ICON_RES_ID_COLUMN] = R.drawable.ic_menu_star_holo_light;
|
||||||
@ -3388,7 +3389,7 @@ outer:
|
|||||||
* folder capabilities.
|
* folder capabilities.
|
||||||
*/
|
*/
|
||||||
Cursor getFolderListCursor(SQLiteDatabase db, Cursor c, String[] uiProjection) {
|
Cursor getFolderListCursor(SQLiteDatabase db, Cursor c, String[] uiProjection) {
|
||||||
final MatrixCursor mc = new MatrixCursor(uiProjection);
|
final MatrixCursor mc = new MatrixCursorWithCachedColumns(uiProjection);
|
||||||
Object[] values = new Object[uiProjection.length];
|
Object[] values = new Object[uiProjection.length];
|
||||||
String[] args = new String[1];
|
String[] args = new String[1];
|
||||||
try {
|
try {
|
||||||
@ -3483,7 +3484,7 @@ outer:
|
|||||||
break;
|
break;
|
||||||
case UI_ACCOUNT:
|
case UI_ACCOUNT:
|
||||||
if (id.equals(COMBINED_ACCOUNT_ID_STRING)) {
|
if (id.equals(COMBINED_ACCOUNT_ID_STRING)) {
|
||||||
MatrixCursor mc = new MatrixCursor(uiProjection, 1);
|
MatrixCursor mc = new MatrixCursorWithCachedColumns(uiProjection, 1);
|
||||||
addCombinedAccountRow(mc);
|
addCombinedAccountRow(mc);
|
||||||
c = mc;
|
c = mc;
|
||||||
} else {
|
} else {
|
||||||
@ -4173,7 +4174,7 @@ outer:
|
|||||||
try {
|
try {
|
||||||
// TODO Always use this projection? Or what's passed in?
|
// TODO Always use this projection? Or what's passed in?
|
||||||
// Not sure if UI wants it, but I'm making a cursor of convo uri's
|
// Not sure if UI wants it, but I'm making a cursor of convo uri's
|
||||||
MatrixCursor c = new MatrixCursor(
|
MatrixCursor c = new MatrixCursorWithCachedColumns(
|
||||||
new String[] {UIProvider.ConversationColumns.URI},
|
new String[] {UIProvider.ConversationColumns.URI},
|
||||||
mLastSequenceOps.size());
|
mLastSequenceOps.size());
|
||||||
for (ContentProviderOperation op: mLastSequenceOps) {
|
for (ContentProviderOperation op: mLastSequenceOps) {
|
||||||
@ -4192,7 +4193,7 @@ outer:
|
|||||||
} catch (OperationApplicationException e) {
|
} catch (OperationApplicationException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new MatrixCursor(projection, 0);
|
return new MatrixCursorWithCachedColumns(projection, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyUIConversation(Uri uri) {
|
private void notifyUIConversation(Uri uri) {
|
||||||
|
@ -31,7 +31,7 @@ import java.util.Set;
|
|||||||
public class FolderPropertiesTests extends AndroidTestCase {
|
public class FolderPropertiesTests extends AndroidTestCase {
|
||||||
|
|
||||||
private static Cursor buildCursor(String[] columns, Object... values) {
|
private static Cursor buildCursor(String[] columns, Object... values) {
|
||||||
MatrixCursor c = new MatrixCursor(columns, 1);
|
MatrixCursor c = new MatrixCursorWithCachedColumns(columns, 1);
|
||||||
c.addRow(values);
|
c.addRow(values);
|
||||||
c.moveToFirst();
|
c.moveToFirst();
|
||||||
return c;
|
return c;
|
||||||
|
@ -78,7 +78,7 @@ public class AccountSelectorAdapterTest extends LoaderTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static AccountSelectorAdapter.CursorWithExtras createCursorWithExtras() {
|
private static AccountSelectorAdapter.CursorWithExtras createCursorWithExtras() {
|
||||||
final MatrixCursor m = new MatrixCursor(new String[] {"column"});
|
final MatrixCursor m = new MatrixCursorWithCachedColumns(new String[] {"column"});
|
||||||
return new AccountSelectorAdapter.CursorWithExtras(m.getColumnNames(), m);
|
return new AccountSelectorAdapter.CursorWithExtras(m.getColumnNames(), m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package com.android.email.activity;
|
package com.android.email.activity;
|
||||||
|
|
||||||
import com.android.email.activity.ContactStatusLoader.Result;
|
import com.android.email.activity.ContactStatusLoader.Result;
|
||||||
|
import com.android.mail.utils.MatrixCursorWithCachedColumns;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.ProviderInfo;
|
import android.content.pm.ProviderInfo;
|
||||||
@ -62,8 +63,8 @@ public class ContactStatusLoaderTest
|
|||||||
// Contact doesn't exist
|
// Contact doesn't exist
|
||||||
public void testContactNotFound() {
|
public void testContactNotFound() {
|
||||||
// Insert empty cursor
|
// Insert empty cursor
|
||||||
mProvider.mCursors.offer(
|
mProvider.mCursors.offer(new MatrixCursorWithCachedColumns(
|
||||||
new MatrixCursor(ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE));
|
ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE));
|
||||||
|
|
||||||
// Load!
|
// Load!
|
||||||
ContactStatusLoader l = new ContactStatusLoader(getMockContext(), EMAIL);
|
ContactStatusLoader l = new ContactStatusLoader(getMockContext(), EMAIL);
|
||||||
@ -95,12 +96,14 @@ public class ContactStatusLoaderTest
|
|||||||
// Contact exists, but no photo
|
// Contact exists, but no photo
|
||||||
public void testNoPhoto() {
|
public void testNoPhoto() {
|
||||||
// Result for the first query (the one for photo-id)
|
// Result for the first query (the one for photo-id)
|
||||||
MatrixCursor cursor1 = new MatrixCursor(ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE);
|
MatrixCursor cursor1 =
|
||||||
|
new MatrixCursorWithCachedColumns(ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE);
|
||||||
cursor1.addRow(new Object[]{12345, StatusUpdates.AWAY});
|
cursor1.addRow(new Object[]{12345, StatusUpdates.AWAY});
|
||||||
mProvider.mCursors.offer(cursor1);
|
mProvider.mCursors.offer(cursor1);
|
||||||
|
|
||||||
// Empty cursor for the second query
|
// Empty cursor for the second query
|
||||||
mProvider.mCursors.offer(new MatrixCursor(ContactStatusLoader.PHOTO_PROJECTION));
|
mProvider.mCursors.offer(
|
||||||
|
new MatrixCursorWithCachedColumns(ContactStatusLoader.PHOTO_PROJECTION));
|
||||||
|
|
||||||
// Load!
|
// Load!
|
||||||
ContactStatusLoader l = new ContactStatusLoader(getMockContext(), EMAIL);
|
ContactStatusLoader l = new ContactStatusLoader(getMockContext(), EMAIL);
|
||||||
@ -124,7 +127,8 @@ public class ContactStatusLoaderTest
|
|||||||
// Contact exists, but no photo (provider returns null for the second query)
|
// Contact exists, but no photo (provider returns null for the second query)
|
||||||
public void testNull2() {
|
public void testNull2() {
|
||||||
// Result for the first query (the one for photo-id)
|
// Result for the first query (the one for photo-id)
|
||||||
MatrixCursor cursor1 = new MatrixCursor(ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE);
|
MatrixCursor cursor1 =
|
||||||
|
new MatrixCursorWithCachedColumns(ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE);
|
||||||
cursor1.addRow(new Object[]{12345, StatusUpdates.AWAY});
|
cursor1.addRow(new Object[]{12345, StatusUpdates.AWAY});
|
||||||
mProvider.mCursors.offer(cursor1);
|
mProvider.mCursors.offer(cursor1);
|
||||||
|
|
||||||
@ -142,7 +146,8 @@ public class ContactStatusLoaderTest
|
|||||||
// Contact exists, with a photo
|
// Contact exists, with a photo
|
||||||
public void testWithPhoto() {
|
public void testWithPhoto() {
|
||||||
// Result for the first query (the one for photo-id)
|
// Result for the first query (the one for photo-id)
|
||||||
MatrixCursor cursor1 = new MatrixCursor(ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE);
|
MatrixCursor cursor1 =
|
||||||
|
new MatrixCursorWithCachedColumns(ContactStatusLoader.PROJECTION_PHOTO_ID_PRESENCE);
|
||||||
cursor1.addRow(new Object[]{12345, StatusUpdates.AWAY});
|
cursor1.addRow(new Object[]{12345, StatusUpdates.AWAY});
|
||||||
mProvider.mCursors.offer(cursor1);
|
mProvider.mCursors.offer(cursor1);
|
||||||
|
|
||||||
@ -168,7 +173,7 @@ public class ContactStatusLoaderTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MatrixCursor doesn't support getBlob, so use this...
|
// MatrixCursor doesn't support getBlob, so use this...
|
||||||
private static class PhotoCursor extends MatrixCursor {
|
private static class PhotoCursor extends MatrixCursorWithCachedColumns {
|
||||||
private final byte[] mBlob;
|
private final byte[] mBlob;
|
||||||
|
|
||||||
public PhotoCursor(byte[] blob) {
|
public PhotoCursor(byte[] blob) {
|
||||||
|
@ -196,7 +196,7 @@ public class ContentCacheTests extends ProviderTestCase2<EmailProvider> {
|
|||||||
private static final String[] SIMPLE_PROJECTION = new String[] {"Foo"};
|
private static final String[] SIMPLE_PROJECTION = new String[] {"Foo"};
|
||||||
private static final Object[] SIMPLE_ROW = new Object[] {"Bar"};
|
private static final Object[] SIMPLE_ROW = new Object[] {"Bar"};
|
||||||
private Cursor getOneRowCursor() {
|
private Cursor getOneRowCursor() {
|
||||||
MatrixCursor cursor = new MatrixCursor(SIMPLE_PROJECTION, 1);
|
MatrixCursor cursor = new MatrixCursorWithCachedColumns(SIMPLE_PROJECTION, 1);
|
||||||
cursor.addRow(SIMPLE_ROW);
|
cursor.addRow(SIMPLE_ROW);
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
@ -440,7 +440,7 @@ public class UtilityUnitTests extends AndroidTestCase {
|
|||||||
|
|
||||||
public void testDumpCursor() {
|
public void testDumpCursor() {
|
||||||
// Just make sure the method won't crash and returns non-empty string.
|
// Just make sure the method won't crash and returns non-empty string.
|
||||||
final Cursor c1 = new MatrixCursor(new String[] {"col"});
|
final Cursor c1 = new MatrixCursorWithCachedColumns(new String[] {"col"});
|
||||||
final Cursor c2 = new CursorWrapper(c1);
|
final Cursor c2 = new CursorWrapper(c1);
|
||||||
|
|
||||||
// Note it's a subclass of CursorWrapper.
|
// Note it's a subclass of CursorWrapper.
|
||||||
@ -461,7 +461,7 @@ public class UtilityUnitTests extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testCloseTraceCursorWrapper() {
|
public void testCloseTraceCursorWrapper() {
|
||||||
final Cursor org = new MatrixCursor(new String[] {"col"});
|
final Cursor org = new MatrixCursorWithCachedColumns(new String[] {"col"});
|
||||||
final Utility.CloseTraceCursorWrapper c =
|
final Utility.CloseTraceCursorWrapper c =
|
||||||
Utility.CloseTraceCursorWrapper.alwaysCreateForTest(org);
|
Utility.CloseTraceCursorWrapper.alwaysCreateForTest(org);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user