From 014ffe1d515841a065ae946596d743558d28d8f0 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Mon, 5 Feb 2018 15:59:47 -0800 Subject: Missed calls now go to MainActivity if you have the component enabled. This CL has a few changes of varying relevance: Most Relevance: - MissedCallNotifications will open MainActivity if the component is enabled (Meaning the launcher is in their app drawer and the flag is flipped). - Implemented show tab intent (open MainActivity directly to a specific tab) - Tests Some Relevance: - Implemented checking for ACTION_DIAL intents (dialpad will open immediately) - Tests Not Relevant but nice QoL changes: - Added tests for missed calls being marked as read - Makes espresso tests more horizontal to reduce timeouts - Bug: 72525550,72525615 Test: implemented PiperOrigin-RevId: 184600627 Change-Id: If96a44ce252e97c022ebc1b58fa783b3326035e7 --- java/com/android/dialer/app/calllog/CallLogAdapter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'java/com/android/dialer/app/calllog/CallLogAdapter.java') diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index b8ec168f6..51df70219 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -85,6 +85,7 @@ import com.android.dialer.logging.ContactSource; import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; import com.android.dialer.logging.UiAction; +import com.android.dialer.main.MainActivityPeer; import com.android.dialer.performancereport.PerformanceReport; import com.android.dialer.phonenumbercache.CallLogQuery; import com.android.dialer.phonenumbercache.ContactInfo; @@ -382,10 +383,11 @@ public class CallLogAdapter extends GroupingListAdapter if (activityType == ACTIVITY_TYPE_DIALTACTS) { if (v.getContext() instanceof CallLogFragmentListener) { ((CallLogFragmentListener) v.getContext()).updateTabUnreadCounts(); - } else if (v.getContext() instanceof FragmentUtilListener) { + } else if (v.getContext() instanceof MainActivityPeer.PeerSupplier) { // This is really bad, but we must do this to prevent a dependency cycle, enforce // best practices in new code, and avoid refactoring DialtactsActivity. - ((FragmentUtilListener) v.getContext()) + ((FragmentUtilListener) + ((MainActivityPeer.PeerSupplier) v.getContext()).getPeer()) .getImpl(CallLogFragmentListener.class) .updateTabUnreadCounts(); } else { -- cgit v1.2.3