diff options
Diffstat (limited to 'java/com/android/dialer/app')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogAdapter.java | 17 | ||||
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java | 12 |
2 files changed, 25 insertions, 4 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index 216cae4a3..d7a27dfca 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -64,6 +64,7 @@ import com.android.dialer.app.voicemail.VoicemailPlaybackPresenter.OnVoicemailDe import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; import com.android.dialer.calldetails.CallDetailsEntries; import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry; +import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.calllogutils.PhoneAccountUtils; import com.android.dialer.calllogutils.PhoneCallDetails; import com.android.dialer.common.Assert; @@ -294,6 +295,11 @@ public class CallLogAdapter extends GroupingListAdapter } }; + @VisibleForTesting + public View.OnClickListener getExpandCollapseListener() { + return mExpandCollapseListener; + } + /** The OnClickListener used to expand or collapse the action buttons of a call log entry. */ private final View.OnClickListener mExpandCollapseListener = new View.OnClickListener() { @@ -362,6 +368,17 @@ public class CallLogAdapter extends GroupingListAdapter } } expandViewHolderActions(viewHolder); + + if (viewHolder.videoCallButtonView.getVisibility() == View.VISIBLE + && LightbringerComponent.get(mActivity) + .getLightbringer() + .getPackageName() + .equals( + ((IntentProvider) viewHolder.videoCallButtonView.getTag()) + .getIntent(mActivity) + .getPackage())) { + CallIntentBuilder.increaseLightbringerCallButtonAppearInExpandedCallLogItemCount(); + } } } }; diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index aaa56d453..2e61848d2 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -69,6 +69,7 @@ import com.android.dialer.blocking.FilteredNumbersUtil; import com.android.dialer.callcomposer.CallComposerActivity; import com.android.dialer.calldetails.CallDetailsActivity; import com.android.dialer.calldetails.CallDetailsEntries; +import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.compat.CompatUtils; @@ -345,11 +346,13 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder } public static CallLogListItemViewHolder createForTest(Context context) { - return createForTest(context, null); + return createForTest(context, null, null); } - static CallLogListItemViewHolder createForTest( - Context context, VoicemailPlaybackPresenter voicemailPlaybackPresenter) { + public static CallLogListItemViewHolder createForTest( + Context context, + View.OnClickListener expandCollapseListener, + VoicemailPlaybackPresenter voicemailPlaybackPresenter) { Resources resources = context.getResources(); CallLogCache callLogCache = CallLogCache.getCallLogCache(context); PhoneCallDetailsHelper phoneCallDetailsHelper = @@ -359,7 +362,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder new CallLogListItemViewHolder( context, null, - null /* expandCollapseListener */, + expandCollapseListener /* expandCollapseListener */, null, null, callLogCache, @@ -512,6 +515,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder boolean isVoicemailNumber = mCallLogCache.isVoicemailNumber(accountHandle, number); if (!isVoicemailNumber && showLightbringerPrimaryButton()) { + CallIntentBuilder.increaseLightbringerCallButtonAppearInCollapsedCallLogItemCount(); primaryActionButtonView.setTag(IntentProvider.getLightbringerIntentProvider(number)); primaryActionButtonView.setContentDescription( TextUtils.expandTemplate( |