package X6FRs_4.KQgRr5e_0.YghfZG_14.XnFJ5_9;

import X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1;
import X6FRs_4.KQgRr5e_0.YghfZG_14.XnFJ5_9.LGe8pk_15;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.Log;
import android.view.ActionProvider;
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewDebug;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.wang.avi.BuildConfig;
/* compiled from: MenuItemImpl.java */
/* loaded from: classes.dex */
public final class XnFJ5_9 implements X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1 {
    public char KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final int f951KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 f952KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public FSaI4_7 f953KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public ZzDuCHW_20 f954KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Intent f955KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Drawable f958KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public ContextMenu.ContextMenuInfo f959KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public MenuItem.OnActionExpandListener f960KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public MenuItem.OnMenuItemClickListener f961KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public View f962KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public CharSequence f963KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Runnable f964KQgRr5e_0;

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public final int f3214Mqv2r_3;

    /* renamed from: Mqv2r_3  reason: collision with other field name */
    public CharSequence f966Mqv2r_3;
    public final int PGPF6hQ_2;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public CharSequence f968PGPF6hQ_2;
    public char QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public final int f970QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public CharSequence f971QxJ9d_1;

    /* renamed from: Xgtqvk_8  reason: collision with root package name */
    public int f3216Xgtqvk_8;

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public int f3215X6FRs_4 = RecyclerView.WGk6X_27.FLAG_APPEARED_IN_PRE_LAYOUT;

    /* renamed from: IFxWkV_5  reason: collision with root package name */
    public int f3212IFxWkV_5 = RecyclerView.WGk6X_27.FLAG_APPEARED_IN_PRE_LAYOUT;

    /* renamed from: IMuAHx_6  reason: collision with root package name */
    public int f3213IMuAHx_6 = 0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public ColorStateList f956KQgRr5e_0 = null;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public PorterDuff.Mode f957KQgRr5e_0 = null;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public boolean f965KQgRr5e_0 = false;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public boolean f972QxJ9d_1 = false;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public boolean f969PGPF6hQ_2 = false;

    /* renamed from: FSaI4_7  reason: collision with root package name */
    public int f3211FSaI4_7 = 16;

    /* renamed from: Mqv2r_3  reason: collision with other field name */
    public boolean f967Mqv2r_3 = false;

    /* compiled from: MenuItemImpl.java */
    /* loaded from: classes.dex */
    public class KQgRr5e_0 implements QxJ9d_1.InterfaceC0037QxJ9d_1 {
        public KQgRr5e_0() {
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1.InterfaceC0037QxJ9d_1
        public void onActionProviderVisibilityChanged(boolean z) {
            XnFJ5_9 xnFJ5_9 = XnFJ5_9.this;
            xnFJ5_9.f953KQgRr5e_0.onItemVisibleChanged(xnFJ5_9);
        }
    }

    public XnFJ5_9(FSaI4_7 fSaI4_7, int i, int i2, int i3, int i4, CharSequence charSequence, int i5) {
        this.f3216Xgtqvk_8 = 0;
        this.f953KQgRr5e_0 = fSaI4_7;
        this.f951KQgRr5e_0 = i2;
        this.f970QxJ9d_1 = i;
        this.PGPF6hQ_2 = i3;
        this.f3214Mqv2r_3 = i4;
        this.f963KQgRr5e_0 = charSequence;
        this.f3216Xgtqvk_8 = i5;
    }

    public boolean FSaI4_7() {
        return this.f953KQgRr5e_0.isShortcutsVisible() && KQgRr5e_0() != 0;
    }

    public boolean IFxWkV_5() {
        return (this.f3216Xgtqvk_8 & 2) == 2;
    }

    public boolean IMuAHx_6() {
        return this.f953KQgRr5e_0.getOptionalIconsVisible();
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public int KQgRr5e_0() {
        return this.f3214Mqv2r_3;
    }

    public boolean Mqv2r_3() {
        return (this.f3211FSaI4_7 & 4) != 0;
    }

    public void PGPF6hQ_2(boolean z) {
        this.f3211FSaI4_7 = (z ? 4 : 0) | (this.f3211FSaI4_7 & (-5));
    }

    public boolean QxJ9d_1() {
        MenuItem.OnMenuItemClickListener onMenuItemClickListener = this.f961KQgRr5e_0;
        if (onMenuItemClickListener == null || !onMenuItemClickListener.onMenuItemClick(this)) {
            FSaI4_7 fSaI4_7 = this.f953KQgRr5e_0;
            if (fSaI4_7.dispatchMenuItemSelected(fSaI4_7, this)) {
                return true;
            }
            Runnable runnable = this.f964KQgRr5e_0;
            if (runnable != null) {
                runnable.run();
                return true;
            }
            if (this.f955KQgRr5e_0 != null) {
                try {
                    this.f953KQgRr5e_0.getContext().startActivity(this.f955KQgRr5e_0);
                    return true;
                } catch (ActivityNotFoundException e) {
                    Log.e("MenuItemImpl", "Can't find activity to handle intent; ignoring", e);
                }
            }
            X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 qxJ9d_1 = this.f952KQgRr5e_0;
            return qxJ9d_1 != null && qxJ9d_1.PGPF6hQ_2();
        }
        return true;
    }

    public boolean X6FRs_4() {
        return (this.f3216Xgtqvk_8 & 1) == 1;
    }

    public boolean Xgtqvk_8() {
        return (this.f3216Xgtqvk_8 & 4) == 4;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public boolean collapseActionView() {
        if ((this.f3216Xgtqvk_8 & 8) == 0) {
            return false;
        }
        if (this.f962KQgRr5e_0 == null) {
            return true;
        }
        MenuItem.OnActionExpandListener onActionExpandListener = this.f960KQgRr5e_0;
        if (onActionExpandListener == null || onActionExpandListener.onMenuItemActionCollapse(this)) {
            return this.f953KQgRr5e_0.collapseItemActionView(this);
        }
        return false;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public boolean expandActionView() {
        if (KQgRr5e_0()) {
            MenuItem.OnActionExpandListener onActionExpandListener = this.f960KQgRr5e_0;
            if (onActionExpandListener == null || onActionExpandListener.onMenuItemActionExpand(this)) {
                return this.f953KQgRr5e_0.expandItemActionView(this);
            }
            return false;
        }
        return false;
    }

    @Override // android.view.MenuItem
    public ActionProvider getActionProvider() {
        throw new UnsupportedOperationException("This is not supported, use MenuItemCompat.getActionProvider()");
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public View getActionView() {
        View view = this.f962KQgRr5e_0;
        if (view != null) {
            return view;
        }
        X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 qxJ9d_1 = this.f952KQgRr5e_0;
        if (qxJ9d_1 != null) {
            View KQgRr5e_02 = qxJ9d_1.KQgRr5e_0(this);
            this.f962KQgRr5e_0 = KQgRr5e_02;
            return KQgRr5e_02;
        }
        return null;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public int getAlphabeticModifiers() {
        return this.f3212IFxWkV_5;
    }

    @Override // android.view.MenuItem
    public char getAlphabeticShortcut() {
        return this.QxJ9d_1;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public CharSequence getContentDescription() {
        return this.f968PGPF6hQ_2;
    }

    @Override // android.view.MenuItem
    public int getGroupId() {
        return this.f970QxJ9d_1;
    }

    @Override // android.view.MenuItem
    public Drawable getIcon() {
        Drawable drawable = this.f958KQgRr5e_0;
        if (drawable != null) {
            return KQgRr5e_0(drawable);
        }
        if (this.f3213IMuAHx_6 != 0) {
            Drawable m380KQgRr5e_0 = X6FRs_4.KQgRr5e_0.KNBe_11.KQgRr5e_0.KQgRr5e_0.m380KQgRr5e_0(this.f953KQgRr5e_0.getContext(), this.f3213IMuAHx_6);
            this.f3213IMuAHx_6 = 0;
            this.f958KQgRr5e_0 = m380KQgRr5e_0;
            return KQgRr5e_0(m380KQgRr5e_0);
        }
        return null;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public ColorStateList getIconTintList() {
        return this.f956KQgRr5e_0;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public PorterDuff.Mode getIconTintMode() {
        return this.f957KQgRr5e_0;
    }

    @Override // android.view.MenuItem
    public Intent getIntent() {
        return this.f955KQgRr5e_0;
    }

    @Override // android.view.MenuItem
    @ViewDebug.CapturedViewProperty
    public int getItemId() {
        return this.f951KQgRr5e_0;
    }

    @Override // android.view.MenuItem
    public ContextMenu.ContextMenuInfo getMenuInfo() {
        return this.f959KQgRr5e_0;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public int getNumericModifiers() {
        return this.f3215X6FRs_4;
    }

    @Override // android.view.MenuItem
    public char getNumericShortcut() {
        return this.KQgRr5e_0;
    }

    @Override // android.view.MenuItem
    public int getOrder() {
        return this.PGPF6hQ_2;
    }

    @Override // android.view.MenuItem
    public SubMenu getSubMenu() {
        return this.f954KQgRr5e_0;
    }

    @Override // android.view.MenuItem
    @ViewDebug.CapturedViewProperty
    public CharSequence getTitle() {
        return this.f963KQgRr5e_0;
    }

    @Override // android.view.MenuItem
    public CharSequence getTitleCondensed() {
        CharSequence charSequence = this.f971QxJ9d_1;
        if (charSequence == null) {
            charSequence = this.f963KQgRr5e_0;
        }
        return (Build.VERSION.SDK_INT >= 18 || charSequence == null || (charSequence instanceof String)) ? charSequence : charSequence.toString();
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public CharSequence getTooltipText() {
        return this.f966Mqv2r_3;
    }

    @Override // android.view.MenuItem
    public boolean hasSubMenu() {
        return this.f954KQgRr5e_0 != null;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public boolean isActionViewExpanded() {
        return this.f967Mqv2r_3;
    }

    @Override // android.view.MenuItem
    public boolean isCheckable() {
        return (this.f3211FSaI4_7 & 1) == 1;
    }

    @Override // android.view.MenuItem
    public boolean isChecked() {
        return (this.f3211FSaI4_7 & 2) == 2;
    }

    @Override // android.view.MenuItem
    public boolean isEnabled() {
        return (this.f3211FSaI4_7 & 16) != 0;
    }

    @Override // android.view.MenuItem
    public boolean isVisible() {
        X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 qxJ9d_1 = this.f952KQgRr5e_0;
        return (qxJ9d_1 == null || !qxJ9d_1.Mqv2r_3()) ? (this.f3211FSaI4_7 & 8) == 0 : (this.f3211FSaI4_7 & 8) == 0 && this.f952KQgRr5e_0.QxJ9d_1();
    }

    @Override // android.view.MenuItem
    public MenuItem setActionProvider(ActionProvider actionProvider) {
        throw new UnsupportedOperationException("This is not supported, use MenuItemCompat.setActionProvider()");
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public /* bridge */ /* synthetic */ MenuItem setActionView(int i) {
        KQgRr5e_0(i);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setAlphabeticShortcut(char c) {
        if (this.QxJ9d_1 == c) {
            return this;
        }
        this.QxJ9d_1 = Character.toLowerCase(c);
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setCheckable(boolean z) {
        int i = this.f3211FSaI4_7;
        int i2 = (z ? 1 : 0) | (i & (-2));
        this.f3211FSaI4_7 = i2;
        if (i != i2) {
            this.f953KQgRr5e_0.onItemsChanged(false);
        }
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setChecked(boolean z) {
        if ((this.f3211FSaI4_7 & 4) != 0) {
            this.f953KQgRr5e_0.setExclusiveItemChecked(this);
        } else {
            QxJ9d_1(z);
        }
        return this;
    }

    @Override // android.view.MenuItem
    public /* bridge */ /* synthetic */ MenuItem setContentDescription(CharSequence charSequence) {
        QxJ9d_1(charSequence);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setEnabled(boolean z) {
        if (z) {
            this.f3211FSaI4_7 |= 16;
        } else {
            this.f3211FSaI4_7 &= -17;
        }
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setIcon(Drawable drawable) {
        this.f3213IMuAHx_6 = 0;
        this.f958KQgRr5e_0 = drawable;
        this.f969PGPF6hQ_2 = true;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public MenuItem setIconTintList(ColorStateList colorStateList) {
        this.f956KQgRr5e_0 = colorStateList;
        this.f965KQgRr5e_0 = true;
        this.f969PGPF6hQ_2 = true;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public MenuItem setIconTintMode(PorterDuff.Mode mode) {
        this.f957KQgRr5e_0 = mode;
        this.f972QxJ9d_1 = true;
        this.f969PGPF6hQ_2 = true;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setIntent(Intent intent) {
        this.f955KQgRr5e_0 = intent;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setNumericShortcut(char c) {
        if (this.KQgRr5e_0 == c) {
            return this;
        }
        this.KQgRr5e_0 = c;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setOnActionExpandListener(MenuItem.OnActionExpandListener onActionExpandListener) {
        this.f960KQgRr5e_0 = onActionExpandListener;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener onMenuItemClickListener) {
        this.f961KQgRr5e_0 = onMenuItemClickListener;
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setShortcut(char c, char c2) {
        this.KQgRr5e_0 = c;
        this.QxJ9d_1 = Character.toLowerCase(c2);
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public void setShowAsAction(int i) {
        int i2 = i & 3;
        if (i2 != 0 && i2 != 1 && i2 != 2) {
            throw new IllegalArgumentException("SHOW_AS_ACTION_ALWAYS, SHOW_AS_ACTION_IF_ROOM, and SHOW_AS_ACTION_NEVER are mutually exclusive.");
        }
        this.f3216Xgtqvk_8 = i;
        this.f953KQgRr5e_0.onItemActionRequestChanged(this);
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public /* bridge */ /* synthetic */ MenuItem setShowAsActionFlags(int i) {
        QxJ9d_1(i);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setTitle(CharSequence charSequence) {
        this.f963KQgRr5e_0 = charSequence;
        this.f953KQgRr5e_0.onItemsChanged(false);
        ZzDuCHW_20 zzDuCHW_20 = this.f954KQgRr5e_0;
        if (zzDuCHW_20 != null) {
            zzDuCHW_20.setHeaderTitle(charSequence);
        }
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setTitleCondensed(CharSequence charSequence) {
        this.f971QxJ9d_1 = charSequence;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // android.view.MenuItem
    public /* bridge */ /* synthetic */ MenuItem setTooltipText(CharSequence charSequence) {
        KQgRr5e_0(charSequence);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setVisible(boolean z) {
        if (m481KQgRr5e_0(z)) {
            this.f953KQgRr5e_0.onItemVisibleChanged(this);
        }
        return this;
    }

    public String toString() {
        CharSequence charSequence = this.f963KQgRr5e_0;
        if (charSequence != null) {
            return charSequence.toString();
        }
        return null;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public char KQgRr5e_0() {
        return this.f953KQgRr5e_0.isQwertyMode() ? this.QxJ9d_1 : this.KQgRr5e_0;
    }

    public void Mqv2r_3(boolean z) {
        if (z) {
            this.f3211FSaI4_7 |= 32;
        } else {
            this.f3211FSaI4_7 &= -33;
        }
    }

    public boolean PGPF6hQ_2() {
        return (this.f3211FSaI4_7 & 32) == 32;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public /* bridge */ /* synthetic */ MenuItem setActionView(View view) {
        KQgRr5e_0(view);
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public String KQgRr5e_0() {
        char KQgRr5e_02 = KQgRr5e_0();
        if (KQgRr5e_02 == 0) {
            return BuildConfig.FLAVOR;
        }
        Resources resources = this.f953KQgRr5e_0.getContext().getResources();
        StringBuilder sb = new StringBuilder();
        if (ViewConfiguration.get(this.f953KQgRr5e_0.getContext()).hasPermanentMenuKey()) {
            sb.append(resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_prepend_shortcut_label));
        }
        int i = this.f953KQgRr5e_0.isQwertyMode() ? this.f3212IFxWkV_5 : this.f3215X6FRs_4;
        KQgRr5e_0(sb, i, 65536, resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_meta_shortcut_label));
        KQgRr5e_0(sb, i, RecyclerView.WGk6X_27.FLAG_APPEARED_IN_PRE_LAYOUT, resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_ctrl_shortcut_label));
        KQgRr5e_0(sb, i, 2, resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_alt_shortcut_label));
        KQgRr5e_0(sb, i, 1, resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_shift_shortcut_label));
        KQgRr5e_0(sb, i, 4, resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_sym_shortcut_label));
        KQgRr5e_0(sb, i, 8, resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_function_shortcut_label));
        if (KQgRr5e_02 == '\b') {
            sb.append(resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_delete_shortcut_label));
        } else if (KQgRr5e_02 == '\n') {
            sb.append(resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_enter_shortcut_label));
        } else if (KQgRr5e_02 != ' ') {
            sb.append(KQgRr5e_02);
        } else {
            sb.append(resources.getString(X6FRs_4.KQgRr5e_0.FSaI4_7.abc_menu_space_shortcut_label));
        }
        return sb.toString();
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public MenuItem setAlphabeticShortcut(char c, int i) {
        if (this.QxJ9d_1 == c && this.f3212IFxWkV_5 == i) {
            return this;
        }
        this.QxJ9d_1 = Character.toLowerCase(c);
        this.f3212IFxWkV_5 = KeyEvent.normalizeMetaState(i);
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public MenuItem setNumericShortcut(char c, int i) {
        if (this.KQgRr5e_0 == c && this.f3215X6FRs_4 == i) {
            return this;
        }
        this.KQgRr5e_0 = c;
        this.f3215X6FRs_4 = KeyEvent.normalizeMetaState(i);
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1, android.view.MenuItem
    public MenuItem setShortcut(char c, char c2, int i, int i2) {
        this.KQgRr5e_0 = c;
        this.f3215X6FRs_4 = KeyEvent.normalizeMetaState(i);
        this.QxJ9d_1 = Character.toLowerCase(c2);
        this.f3212IFxWkV_5 = KeyEvent.normalizeMetaState(i2);
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setIcon(int i) {
        this.f958KQgRr5e_0 = null;
        this.f3213IMuAHx_6 = i;
        this.f969PGPF6hQ_2 = true;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    @Override // android.view.MenuItem
    public MenuItem setTitle(int i) {
        setTitle(this.f953KQgRr5e_0.getContext().getString(i));
        return this;
    }

    public void QxJ9d_1(boolean z) {
        int i = this.f3211FSaI4_7;
        int i2 = (z ? 2 : 0) | (i & (-3));
        this.f3211FSaI4_7 = i2;
        if (i != i2) {
            this.f953KQgRr5e_0.onItemsChanged(false);
        }
    }

    public X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1 QxJ9d_1(int i) {
        setShowAsAction(i);
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1 QxJ9d_1(CharSequence charSequence) {
        this.f968PGPF6hQ_2 = charSequence;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }

    public static void KQgRr5e_0(StringBuilder sb, int i, int i2, String str) {
        if ((i & i2) == i2) {
            sb.append(str);
        }
    }

    public void KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20) {
        this.f954KQgRr5e_0 = zzDuCHW_20;
        zzDuCHW_20.setHeaderTitle(getTitle());
    }

    public CharSequence KQgRr5e_0(LGe8pk_15.KQgRr5e_0 kQgRr5e_0) {
        if (kQgRr5e_0 != null && kQgRr5e_0.prefersCondensedTitle()) {
            return getTitleCondensed();
        }
        return getTitle();
    }

    public final Drawable KQgRr5e_0(Drawable drawable) {
        if (drawable != null && this.f969PGPF6hQ_2 && (this.f965KQgRr5e_0 || this.f972QxJ9d_1)) {
            drawable = X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.KQgRr5e_0.m295QxJ9d_1(drawable).mutate();
            if (this.f965KQgRr5e_0) {
                X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.KQgRr5e_0.KQgRr5e_0(drawable, this.f956KQgRr5e_0);
            }
            if (this.f972QxJ9d_1) {
                X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.KQgRr5e_0.KQgRr5e_0(drawable, this.f957KQgRr5e_0);
            }
            this.f969PGPF6hQ_2 = false;
        }
        return drawable;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public boolean m481KQgRr5e_0(boolean z) {
        int i = this.f3211FSaI4_7;
        int i2 = (z ? 0 : 8) | (i & (-9));
        this.f3211FSaI4_7 = i2;
        return i != i2;
    }

    public void KQgRr5e_0(ContextMenu.ContextMenuInfo contextMenuInfo) {
        this.f959KQgRr5e_0 = contextMenuInfo;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public void KQgRr5e_0() {
        this.f953KQgRr5e_0.onItemActionRequestChanged(this);
    }

    public X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1 KQgRr5e_0(View view) {
        int i;
        this.f962KQgRr5e_0 = view;
        this.f952KQgRr5e_0 = null;
        if (view != null && view.getId() == -1 && (i = this.f951KQgRr5e_0) > 0) {
            view.setId(i);
        }
        this.f953KQgRr5e_0.onItemActionRequestChanged(this);
        return this;
    }

    public X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1 KQgRr5e_0(int i) {
        Context context = this.f953KQgRr5e_0.getContext();
        KQgRr5e_0(LayoutInflater.from(context).inflate(i, (ViewGroup) new LinearLayout(context), false));
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 KQgRr5e_0() {
        return this.f952KQgRr5e_0;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1 KQgRr5e_0(X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 qxJ9d_1) {
        X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 qxJ9d_12 = this.f952KQgRr5e_0;
        if (qxJ9d_12 != null) {
            qxJ9d_12.m241KQgRr5e_0();
        }
        this.f962KQgRr5e_0 = null;
        this.f952KQgRr5e_0 = qxJ9d_1;
        this.f953KQgRr5e_0.onItemsChanged(true);
        X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 qxJ9d_13 = this.f952KQgRr5e_0;
        if (qxJ9d_13 != null) {
            qxJ9d_13.KQgRr5e_0(new KQgRr5e_0());
        }
        return this;
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public boolean KQgRr5e_0() {
        X6FRs_4.IMuAHx_6.EuDEkJe_12.QxJ9d_1 qxJ9d_1;
        if ((this.f3216Xgtqvk_8 & 8) != 0) {
            if (this.f962KQgRr5e_0 == null && (qxJ9d_1 = this.f952KQgRr5e_0) != null) {
                this.f962KQgRr5e_0 = qxJ9d_1.KQgRr5e_0(this);
            }
            return this.f962KQgRr5e_0 != null;
        }
        return false;
    }

    public void KQgRr5e_0(boolean z) {
        this.f967Mqv2r_3 = z;
        this.f953KQgRr5e_0.onItemsChanged(false);
    }

    @Override // X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1
    public X6FRs_4.IMuAHx_6.IMuAHx_6.KQgRr5e_0.QxJ9d_1 KQgRr5e_0(CharSequence charSequence) {
        this.f966Mqv2r_3 = charSequence;
        this.f953KQgRr5e_0.onItemsChanged(false);
        return this;
    }
}
