package h; import android.content.Context; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import androidx.appcompat.view.menu.e; import androidx.appcompat.widget.ActionBarContextView; import h.b; import java.lang.ref.WeakReference; /* loaded from: classes.dex */ public class e extends b implements e.a { /* renamed from: c, reason: collision with root package name */ private Context f9877c; /* renamed from: d, reason: collision with root package name */ private ActionBarContextView f9878d; /* renamed from: e, reason: collision with root package name */ private b.a f9879e; /* renamed from: f, reason: collision with root package name */ private WeakReference f9880f; /* renamed from: g, reason: collision with root package name */ private boolean f9881g; /* renamed from: h, reason: collision with root package name */ private boolean f9882h; /* renamed from: i, reason: collision with root package name */ private androidx.appcompat.view.menu.e f9883i; public e(Context context, ActionBarContextView actionBarContextView, b.a aVar, boolean z10) { this.f9877c = context; this.f9878d = actionBarContextView; this.f9879e = aVar; androidx.appcompat.view.menu.e S = new androidx.appcompat.view.menu.e(actionBarContextView.getContext()).S(1); this.f9883i = S; S.R(this); this.f9882h = z10; } @Override // androidx.appcompat.view.menu.e.a public boolean a(androidx.appcompat.view.menu.e eVar, MenuItem menuItem) { return this.f9879e.c(this, menuItem); } @Override // androidx.appcompat.view.menu.e.a public void b(androidx.appcompat.view.menu.e eVar) { k(); this.f9878d.l(); } @Override // h.b public void c() { if (this.f9881g) { return; } this.f9881g = true; this.f9878d.sendAccessibilityEvent(32); this.f9879e.d(this); } @Override // h.b public View d() { WeakReference weakReference = this.f9880f; if (weakReference != null) { return (View) weakReference.get(); } return null; } @Override // h.b public Menu e() { return this.f9883i; } @Override // h.b public MenuInflater f() { return new g(this.f9878d.getContext()); } @Override // h.b public CharSequence g() { return this.f9878d.getSubtitle(); } @Override // h.b public CharSequence i() { return this.f9878d.getTitle(); } @Override // h.b public void k() { this.f9879e.b(this, this.f9883i); } @Override // h.b public boolean l() { return this.f9878d.j(); } @Override // h.b public void m(View view) { this.f9878d.setCustomView(view); this.f9880f = view != null ? new WeakReference(view) : null; } @Override // h.b public void n(int i10) { o(this.f9877c.getString(i10)); } @Override // h.b public void o(CharSequence charSequence) { this.f9878d.setSubtitle(charSequence); } @Override // h.b public void q(int i10) { r(this.f9877c.getString(i10)); } @Override // h.b public void r(CharSequence charSequence) { this.f9878d.setTitle(charSequence); } @Override // h.b public void s(boolean z10) { super.s(z10); this.f9878d.setTitleOptional(z10); } }