package androidx.appcompat.widget;

import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.FrameLayout;
import o.C1156f1;
import o.C1444i1;
import o.C1698kk0;
import o.CO;
import o.H7;
import o.InterfaceC0352Np;
import o.InterfaceC1701km;
import o.S7;
import o.Vf0;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public class ContentFrameLayout extends FrameLayout {
    public TypedValue l;
    public TypedValue m;
    public TypedValue n;

    /* renamed from: o, reason: collision with root package name */
    public TypedValue f4o;
    public TypedValue p;
    public TypedValue q;
    public final Rect r;
    public InterfaceC1701km s;

    public ContentFrameLayout(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, 0);
        this.r = new Rect();
    }

    public TypedValue getFixedHeightMajor() {
        if (this.p == null) {
            this.p = new TypedValue();
        }
        return this.p;
    }

    public TypedValue getFixedHeightMinor() {
        if (this.q == null) {
            this.q = new TypedValue();
        }
        return this.q;
    }

    public TypedValue getFixedWidthMajor() {
        if (this.n == null) {
            this.n = new TypedValue();
        }
        return this.n;
    }

    public TypedValue getFixedWidthMinor() {
        if (this.f4o == null) {
            this.f4o = new TypedValue();
        }
        return this.f4o;
    }

    public TypedValue getMinWidthMajor() {
        if (this.l == null) {
            this.l = new TypedValue();
        }
        return this.l;
    }

    public TypedValue getMinWidthMinor() {
        if (this.m == null) {
            this.m = new TypedValue();
        }
        return this.m;
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void onAttachedToWindow() {
        super.onAttachedToWindow();
        InterfaceC1701km interfaceC1701km = this.s;
        if (interfaceC1701km != null) {
            interfaceC1701km.getClass();
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void onDetachedFromWindow() {
        C1444i1 c1444i1;
        super.onDetachedFromWindow();
        InterfaceC1701km interfaceC1701km = this.s;
        if (interfaceC1701km != null) {
            S7 s7 = ((H7) interfaceC1701km).m;
            InterfaceC0352Np interfaceC0352Np = s7.C;
            if (interfaceC0352Np != null) {
                ActionBarOverlayLayout actionBarOverlayLayout = (ActionBarOverlayLayout) interfaceC0352Np;
                actionBarOverlayLayout.k();
                ActionMenuView actionMenuView = ((Vf0) actionBarOverlayLayout.p).a.l;
                if (actionMenuView != null && (c1444i1 = actionMenuView.E) != null) {
                    c1444i1.e();
                    C1156f1 c1156f1 = c1444i1.E;
                    if (c1156f1 != null && c1156f1.b()) {
                        c1156f1.i.dismiss();
                    }
                }
            }
            if (s7.H != null) {
                s7.w.getDecorView().removeCallbacks(s7.I);
                if (s7.H.isShowing()) {
                    try {
                        s7.H.dismiss();
                    } catch (IllegalArgumentException unused) {
                    }
                }
                s7.H = null;
            }
            C1698kk0 c1698kk0 = s7.J;
            if (c1698kk0 != null) {
                c1698kk0.b();
            }
            CO co = s7.z(0).h;
            if (co != null) {
                co.c(true);
            }
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:21:0x004e  */
    /* JADX WARN: Removed duplicated region for block: B:22:0x0062  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x008a  */
    /* JADX WARN: Removed duplicated region for block: B:38:0x009d  */
    /* JADX WARN: Removed duplicated region for block: B:55:0x00d1  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x00d9  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x00de  */
    @Override // android.widget.FrameLayout, android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void onMeasure(int r17, int r18) {
        /*
            Method dump skipped, instructions count: 229
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.appcompat.widget.ContentFrameLayout.onMeasure(int, int):void");
    }

    public void setAttachListener(InterfaceC1701km interfaceC1701km) {
        this.s = interfaceC1701km;
    }
}
