Loading src/com/android/dialer/calllog/GroupingListAdapter.java +0 −14 Original line number Diff line number Diff line Loading @@ -253,7 +253,6 @@ abstract class GroupingListAdapter extends RecyclerView.Adapter { * corresponding cursor position. */ public void obtainPositionMetadata(PositionMetadata metadata, int position) { // If the description object already contains requested information, just return if (metadata.listPosition == position) { return; Loading Loading @@ -433,17 +432,4 @@ abstract class GroupingListAdapter extends RecyclerView.Adapter { return -1; } } /** * Used for setting the cursor without triggering a UI thread update. */ @NeededForTesting public void setCursorForTesting(Cursor cursor) { if (cursor != null) { mCursor = cursor; cursor.registerContentObserver(mChangeObserver); cursor.registerDataSetObserver(mDataSetObserver); mRowIdColumnIndex = cursor.getColumnIndexOrThrow("_id"); } } } tests/src/com/android/dialer/calllog/CallLogFragmentTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,14 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme mAdapter.pauseCache(); mParentView = new FrameLayout(mActivity); mCursor = new MatrixCursor(CallLogQuery._PROJECTION); mAdapter.setCursorForTesting(mCursor); getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { mAdapter.changeCursor(mCursor); } }); getInstrumentation().waitForIdleSync(); } /** Loading Loading @@ -316,7 +323,6 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme public void testBindView_CallButton() { mCursor.moveToFirst(); insert(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, NOW, 0, Calls.INCOMING_TYPE); mAdapter.changeCursor(mCursor); CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) mAdapter.onCreateViewHolder(mParentView, /* viewType */ 0); bindViewForTest(viewHolder); Loading Loading
src/com/android/dialer/calllog/GroupingListAdapter.java +0 −14 Original line number Diff line number Diff line Loading @@ -253,7 +253,6 @@ abstract class GroupingListAdapter extends RecyclerView.Adapter { * corresponding cursor position. */ public void obtainPositionMetadata(PositionMetadata metadata, int position) { // If the description object already contains requested information, just return if (metadata.listPosition == position) { return; Loading Loading @@ -433,17 +432,4 @@ abstract class GroupingListAdapter extends RecyclerView.Adapter { return -1; } } /** * Used for setting the cursor without triggering a UI thread update. */ @NeededForTesting public void setCursorForTesting(Cursor cursor) { if (cursor != null) { mCursor = cursor; cursor.registerContentObserver(mChangeObserver); cursor.registerDataSetObserver(mDataSetObserver); mRowIdColumnIndex = cursor.getColumnIndexOrThrow("_id"); } } }
tests/src/com/android/dialer/calllog/CallLogFragmentTest.java +8 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,14 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme mAdapter.pauseCache(); mParentView = new FrameLayout(mActivity); mCursor = new MatrixCursor(CallLogQuery._PROJECTION); mAdapter.setCursorForTesting(mCursor); getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { mAdapter.changeCursor(mCursor); } }); getInstrumentation().waitForIdleSync(); } /** Loading Loading @@ -316,7 +323,6 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme public void testBindView_CallButton() { mCursor.moveToFirst(); insert(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, NOW, 0, Calls.INCOMING_TYPE); mAdapter.changeCursor(mCursor); CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) mAdapter.onCreateViewHolder(mParentView, /* viewType */ 0); bindViewForTest(viewHolder); Loading