package o;

import android.content.Context;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import androidx.appcompat.widget.ActionBarContextView;
import java.lang.ref.WeakReference;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.na0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1963na0 extends AbstractC1918n1 implements AO {
    public Context n;

    /* renamed from: o, reason: collision with root package name */
    public ActionBarContextView f650o;
    public Gm0 p;
    public WeakReference q;
    public boolean r;
    public CO s;

    @Override // o.AbstractC1918n1
    public final void a() {
        if (this.r) {
            return;
        }
        this.r = true;
        this.p.d(this);
    }

    @Override // o.AbstractC1918n1
    public final View b() {
        WeakReference weakReference = this.q;
        if (weakReference != null) {
            return (View) weakReference.get();
        }
        return null;
    }

    @Override // o.AbstractC1918n1
    public final CO c() {
        return this.s;
    }

    @Override // o.AbstractC1918n1
    public final MenuInflater d() {
        return new Db0(this.f650o.getContext());
    }

    @Override // o.AbstractC1918n1
    public final CharSequence e() {
        return this.f650o.getSubtitle();
    }

    @Override // o.AbstractC1918n1
    public final CharSequence f() {
        return this.f650o.getTitle();
    }

    @Override // o.AbstractC1918n1
    public final void g() {
        this.p.g(this, this.s);
    }

    @Override // o.AbstractC1918n1
    public final boolean h() {
        return this.f650o.D;
    }

    @Override // o.AbstractC1918n1
    public final void i(View view) {
        this.f650o.setCustomView(view);
        this.q = view != null ? new WeakReference(view) : null;
    }

    @Override // o.AbstractC1918n1
    public final void j(int i) {
        k(this.n.getString(i));
    }

    @Override // o.AbstractC1918n1
    public final void k(CharSequence charSequence) {
        this.f650o.setSubtitle(charSequence);
    }

    @Override // o.AO
    public final boolean l(CO co, MenuItem menuItem) {
        return ((InterfaceC1823m1) this.p.m).e(this, menuItem);
    }

    @Override // o.AbstractC1918n1
    public final void m(int i) {
        n(this.n.getString(i));
    }

    @Override // o.AbstractC1918n1
    public final void n(CharSequence charSequence) {
        this.f650o.setTitle(charSequence);
    }

    @Override // o.AbstractC1918n1
    public final void o(boolean z) {
        this.m = z;
        this.f650o.setTitleOptional(z);
    }

    @Override // o.AO
    public final void s(CO co) {
        g();
        C1444i1 c1444i1 = this.f650o.f2o;
        if (c1444i1 != null) {
            c1444i1.l();
        }
    }
}
