diff options
author | Andrew Lee <anwlee@google.com> | 2015-06-12 16:22:59 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-06-12 16:22:59 -0700 |
commit | b0b57a10fbb9bec5c80d7adad8f65750a2f96e1b (patch) | |
tree | 1116c4e16c191b85eaa47959b822df2a10e33c29 /tests/src | |
parent | 44919b041bd28792e18cfa65ea6868da3d8b9f52 (diff) |
Convert to primary action button on call log items.
+ This is the call button on the standard call log list item, but
will be play on voicemail call log list items.
+ Add call "list" action for voicemail call log list items.
Change-Id: I4b115b96738b77c8a19c1071d5290e65f93395ac
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/dialer/calllog/CallLogFragmentTest.java | 14 | ||||
-rw-r--r-- | tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java index df6719c38..a739b16d2 100644 --- a/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogFragmentTest.java @@ -326,13 +326,14 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) mAdapter.onCreateViewHolder(mParentView, /* viewType */ 0); bindViewForTest(viewHolder); - viewHolder.updateCallButton(); + viewHolder.updatePrimaryActionButton(); // The primaryActionView tag is set in the // {@link com.android.dialer.calllog.CallLogAdapter#bindView} method. If it is possible // to place a call to the phone number, a call intent will have been created for the // primaryActionView. - IntentProvider intentProvider = (IntentProvider) viewHolder.callActionView.getTag(); + IntentProvider intentProvider = + (IntentProvider) viewHolder.primaryActionButtonView.getTag(); Intent intent = intentProvider.getIntent(mActivity); // Starts a call. assertEquals(TestConstants.CALL_INTENT_ACTION, intent.getAction()); @@ -375,12 +376,13 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme if (presentation == Calls.PRESENTATION_RESTRICTED || presentation == Calls.PRESENTATION_UNKNOWN) { //If number is not callable, the primary action view should have a null tag. - assertNull(mItem.callActionView.getTag()); + assertNull(mItem.primaryActionButtonView.getTag()); } else { //If the number is callable, the primary action view should have a non-null tag. - assertNotNull(mItem.callActionView.getTag()); + assertNotNull(mItem.primaryActionButtonView.getTag()); - IntentProvider intentProvider = (IntentProvider)mItem.callActionView.getTag(); + IntentProvider intentProvider = + (IntentProvider) mItem.primaryActionButtonView.getTag(); Intent callIntent = intentProvider.getIntent(mActivity); //The intent should be to make the call @@ -457,7 +459,7 @@ public class CallLogFragmentTest extends ActivityInstrumentationTestCase2<Fragme } }); getInstrumentation().waitForIdleSync(); - viewHolder.updateCallButton(); + viewHolder.updatePrimaryActionButton(); } private void bindViewForTest(CallLogListItemViewHolder viewHolder) { diff --git a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java index 091065b91..8ee85a436 100644 --- a/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java +++ b/tests/src/com/android/dialer/calllog/CallLogListItemHelperTest.java @@ -78,7 +78,7 @@ public class CallLogListItemHelperTest extends AndroidTestCase { public void testSetPhoneCallDetails() { setPhoneCallDetailsWithNumber("12125551234", Calls.PRESENTATION_ALLOWED, "1-212-555-1234"); - assertEquals(View.VISIBLE, mViewHolder.callActionView.getVisibility()); + assertEquals(View.VISIBLE, mViewHolder.primaryActionButtonView.getVisibility()); } public void testSetPhoneCallDetails_Unknown() { |