diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogAdapter.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index 51df70219..baca590b5 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -54,6 +54,7 @@ import android.view.ViewGroup; import com.android.contacts.common.ContactsUtils; import com.android.contacts.common.compat.PhoneNumberUtilsCompat; import com.android.contacts.common.preference.ContactsPreferences; +import com.android.dialer.app.DialtactsActivity; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogFragment.CallLogFragmentListener; import com.android.dialer.app.calllog.CallLogGroupBuilder.GroupCreator; @@ -381,9 +382,7 @@ public class CallLogAdapter extends GroupingListAdapter if (viewHolder.callType == CallLog.Calls.MISSED_TYPE) { CallLogAsyncTaskUtil.markCallAsRead(activity, viewHolder.callIds); if (activityType == ACTIVITY_TYPE_DIALTACTS) { - if (v.getContext() instanceof CallLogFragmentListener) { - ((CallLogFragmentListener) v.getContext()).updateTabUnreadCounts(); - } else if (v.getContext() instanceof MainActivityPeer.PeerSupplier) { + 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) @@ -391,8 +390,7 @@ public class CallLogAdapter extends GroupingListAdapter .getImpl(CallLogFragmentListener.class) .updateTabUnreadCounts(); } else { - throw Assert.createIllegalStateFailException( - "View parent does not implement CallLogFragmentListener"); + ((DialtactsActivity) v.getContext()).updateTabUnreadCounts(); } } } |