Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2d5e7ca authored by calderwoodra's avatar calderwoodra Committed by Copybara-Service
Browse files

Clicking on a missed call in the call log no longer crashes the app.

Bug: 72956783
Test: DialtactsActivityIntegrationTest
PiperOrigin-RevId: 185404033
Change-Id: I486f7b1a6739bf49c6f19bba82227dd4d9794e1f
parent 86135a2f
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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();
                }
              }
            }