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

Commit f1b3dc47 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check if menu item is null before adding assistant new badge" into ub-contactsdialer-h-dev

parents d4d7eb58 1da57d88
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -265,8 +265,12 @@ public abstract class ContactsDrawerActivity extends AppCompatContactsActivity i
        if (mNavigationView == null) {
            return;
        }
        final LinearLayout newBadgeFrame = (LinearLayout) MenuItemCompat.getActionView(
                mNavigationView.getMenu().findItem(R.id.nav_assistant));
        final MenuItem assistantMenu = mNavigationView.getMenu().findItem(R.id.nav_assistant);
        if (assistantMenu == null) {
            return;
        }
        final LinearLayout newBadgeFrame =
                (LinearLayout) MenuItemCompat.getActionView(assistantMenu);
        final boolean showWelcomeBadge = !SharedPreferenceUtil.isWelcomeCardDismissed(this);
        if (showWelcomeBadge && newBadgeFrame.getChildCount() == 0) {
            if (mAssistantNewBadge == null) {