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 --- tests/src/com/android/dialer/calllog/BlockReportSpamListenerTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/src') diff --git a/tests/src/com/android/dialer/calllog/BlockReportSpamListenerTest.java b/tests/src/com/android/dialer/calllog/BlockReportSpamListenerTest.java index f505818e9..c63027d6b 100644 --- a/tests/src/com/android/dialer/calllog/BlockReportSpamListenerTest.java +++ b/tests/src/com/android/dialer/calllog/BlockReportSpamListenerTest.java @@ -1,5 +1,6 @@ package com.android.dialer.calllog; +import android.app.Activity; import android.support.v7.widget.RecyclerView; import android.test.ActivityInstrumentationTestCase2; @@ -37,7 +38,8 @@ public class BlockReportSpamListenerTest extends ActivityInstrumentationTestCase MockitoAnnotations.initMocks(this); - blockReportSpamListener = new BlockReportSpamListener(getActivity(), adapter, + blockReportSpamListener = new BlockReportSpamListener( + ((Activity) getActivity()).getFragmentManager(), adapter, extendedCallInfoService, filteredNumberAsyncQueryHandler); } -- cgit v1.2.3