diff options
author | Tyler Gunn <tgunn@google.com> | 2014-05-12 10:52:32 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2014-05-12 10:52:32 -0700 |
commit | d0715acdfc1aee0c20950741dc15d30abd18d2f2 (patch) | |
tree | 57b790a13a5242850c6e464aa866689486d87d33 /tests/src | |
parent | 861fd2a2737051843582c4261567342016853868 (diff) |
Removing highlighting of missed calls and voicemails in the call log.
Also fixing some broken unit tests.
Bug: 13962594
Change-Id: I3ca2d72b3013b6324da19717dbc984f3e7e576e2
Diffstat (limited to 'tests/src')
3 files changed, 27 insertions, 28 deletions
diff --git a/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java b/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java index 626ff1686..30fd0e2a7 100644 --- a/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java +++ b/tests/src/com/android/dialer/PhoneCallDetailsHelperTest.java @@ -22,7 +22,6 @@ import android.provider.CallLog.Calls; import android.test.AndroidTestCase; import android.text.Html; import android.text.Spanned; -import android.util.Log; import android.view.View; import android.widget.TextView; @@ -293,8 +292,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(number, presentation, formattedNumber, TEST_COUNTRY_ISO, TEST_GEOCODE, - new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION), - true); + new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION) + ); } /** Sets the phone call details with default values and the given number. */ @@ -303,8 +302,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(number, Calls.PRESENTATION_ALLOWED, formattedNumber, TEST_COUNTRY_ISO, geocodedLocation, - new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION), - true); + new int[]{ Calls.VOICEMAIL_TYPE }, TEST_DATE, TEST_DURATION) + ); } /** Sets the phone call details with default values and the given date. */ @@ -312,8 +311,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, TEST_FORMATTED_NUMBER, TEST_COUNTRY_ISO, TEST_GEOCODE, - new int[]{ Calls.INCOMING_TYPE }, date, TEST_DURATION), - false); + new int[]{ Calls.INCOMING_TYPE }, date, TEST_DURATION) + ); } /** Sets the phone call details with default values and the given call types using icons. */ @@ -321,8 +320,8 @@ public class PhoneCallDetailsHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, TEST_FORMATTED_NUMBER, TEST_COUNTRY_ISO, TEST_GEOCODE, - callTypes, TEST_DATE, TEST_DURATION), - false); + callTypes, TEST_DATE, TEST_DURATION) + ); } private void setCallDetailsHeaderWithNumber(String number, int presentation) { diff --git a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java index a423cde21..2c0fe0e23 100644 --- a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java @@ -182,7 +182,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme mCursor.moveToFirst(); insertPrivate(NOW, 0); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); } @MediumTest @@ -198,7 +198,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme mCursor.moveToFirst(); insert(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, NOW, 0, Calls.INCOMING_TYPE); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertNameIs(views, TEST_NUMBER); @@ -212,7 +212,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme values[CallLogQuery.CACHED_FORMATTED_NUMBER] = TEST_FORMATTED_NUMBER; insertValues(values); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertNameIs(views, TEST_FORMATTED_NUMBER); @@ -226,7 +226,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme insertWithCachedValues(TEST_NUMBER, NOW, 0, Calls.INCOMING_TYPE, "John Doe", Phone.TYPE_HOME, TEST_DEFAULT_CUSTOM_LABEL); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertNameIs(views, "John Doe"); @@ -239,7 +239,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme insertWithCachedValues("sip:johndoe@gmail.com", NOW, 0, Calls.INCOMING_TYPE, "John Doe", Phone.TYPE_HOME, TEST_DEFAULT_CUSTOM_LABEL); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertNameIs(views, "John Doe"); @@ -254,7 +254,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme insertWithCachedValues(TEST_NUMBER, NOW, 0, Calls.INCOMING_TYPE, "John Doe", Phone.TYPE_HOME, TEST_DEFAULT_CUSTOM_LABEL); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertNameIs(views, "John Doe"); @@ -269,7 +269,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme insertWithCachedValues(TEST_NUMBER, NOW, 0, Calls.INCOMING_TYPE, "John Doe", Phone.TYPE_WORK, TEST_DEFAULT_CUSTOM_LABEL); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertNameIs(views, "John Doe"); @@ -283,7 +283,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme insertWithCachedValues(TEST_NUMBER, NOW, 0, Calls.INCOMING_TYPE, "John Doe", Phone.TYPE_CUSTOM, numberLabel); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertNameIs(views, "John Doe"); @@ -296,7 +296,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme insertWithCachedValues(TEST_NUMBER, NOW, 0, Calls.INCOMING_TYPE, "John Doe", Phone.TYPE_HOME, ""); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertTrue(views.quickContactView.isEnabled()); @@ -307,7 +307,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme mCursor.moveToFirst(); insert(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, NOW, 0, Calls.INCOMING_TYPE); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); assertFalse(views.quickContactView.isEnabled()); @@ -318,7 +318,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme mCursor.moveToFirst(); insert(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, NOW, 0, Calls.INCOMING_TYPE); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); @@ -339,7 +339,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme mCursor.moveToFirst(); insertVoicemail(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, NOW, 0); View view = mAdapter.newStandAloneView(getActivity(), mParentView); - mAdapter.bindStandAloneView(view, getActivity(), mCursor); + mAdapter.bindViewForTest(view, getActivity(), mCursor); CallLogListItemViews views = (CallLogListItemViews) view.getTag(); IntentProvider intentProvider = (IntentProvider) views.voicemailButtonView.getTag(); @@ -439,7 +439,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme if (null == mList[i]) { mList[i] = mAdapter.newStandAloneView(mActivity, mParentView); } - mAdapter.bindStandAloneView(mList[i], mActivity, mCursor); + mAdapter.bindViewForTest(mList[i], mActivity, mCursor); mCursor.moveToPrevious(); i++; } diff --git a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java index 15c16767c..96eefbc5d 100644 --- a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java @@ -333,8 +333,8 @@ public class CallLogListItemHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(number, presentation, formattedNumber, TEST_COUNTRY_ISO, TEST_GEOCODE, - new int[]{ callType }, TEST_DATE, TEST_DURATION), - false); + new int[]{ callType }, TEST_DATE, TEST_DURATION) + ); } /** Sets the details of a phone call using the specified call type. */ @@ -342,8 +342,8 @@ public class CallLogListItemHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, TEST_FORMATTED_NUMBER, TEST_COUNTRY_ISO, TEST_GEOCODE, - types, TEST_DATE, TEST_DURATION), - false); + types, TEST_DATE, TEST_DURATION) + ); } /** Sets the details of an unread phone call using the specified call type. */ @@ -351,7 +351,7 @@ public class CallLogListItemHelperTest extends AndroidTestCase { mHelper.setPhoneCallDetails(mViews, new PhoneCallDetails(TEST_NUMBER, Calls.PRESENTATION_ALLOWED, TEST_FORMATTED_NUMBER, TEST_COUNTRY_ISO, TEST_GEOCODE, - types, TEST_DATE, TEST_DURATION), - true); + types, TEST_DATE, TEST_DURATION) + ); } } |