From b86e29447c861ad90874969d806a9bd1f8dd7348 Mon Sep 17 00:00:00 2001 From: Sarmad Hashmi Date: Wed, 13 Apr 2016 15:10:20 -0700 Subject: Refactor block/report dialogs and put into utility class. +Put all the dialog creation code in one place so they can be re-used +This is mainly for the after call notification because the same dialogs will be shown in an invisible activity +Create listener for determining whether a user checked the spam checkbox +Change to DialogFragments for easy reusing of dialogs Change-Id: I67e13bc0e61952299a4770c9184543ef8b63728a --- src/com/android/dialer/calllog/CallLogAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java') diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 36726e456..9cde0b65d 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -21,6 +21,7 @@ import com.android.dialer.service.ExtendedCallInfoService; import com.android.dialerbind.ObjectFactory; import com.google.common.annotations.VisibleForTesting; +import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -317,7 +318,8 @@ public class CallLogAdapter extends GroupingListAdapter maybeShowVoicemailPromoCard(); mExtendedCallInfoService = ObjectFactory.newExtendedCallInfoService(context); - mBlockReportSpamListener = new BlockReportSpamListener(mContext, this, + mBlockReportSpamListener = new BlockReportSpamListener( + ((Activity) mContext).getFragmentManager(), this, mExtendedCallInfoService, mFilteredNumberAsyncQueryHandler); setHasStableIds(true); } -- cgit v1.2.3