use of com.android.inputmethod.latin.ContactsManager in project android_packages_inputmethods_LatinIME by CyanogenMod.
the class ContactsManagerTest method setUp.
@Before
@Override
public void setUp() throws Exception {
// Fake content provider
mFakeContactsContentProvider = new FakeContactsContentProvider();
mMatrixCursor = new MatrixCursor(ContactsDictionaryConstants.PROJECTION);
// Add the fake content provider to fake content resolver.
final MockContentResolver contentResolver = new MockContentResolver();
contentResolver.addProvider(ContactsContract.AUTHORITY, mFakeContactsContentProvider);
// Add the fake content resolver to a fake context.
final ContextWithMockContentResolver context = new ContextWithMockContentResolver(mContext);
context.setContentResolver(contentResolver);
mManager = new ContactsManager(context);
}
Aggregations