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

Commit 3d65baa6 authored by Wenyi Wang's avatar Wenyi Wang Committed by android-build-merger
Browse files

Check if menu item is null before adding assistant new badge

am: 1da57d88

Change-Id: I498bc54f068becd3b985f1a2fb4cf953c046976d
parents a6f95d36 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) {