package com.bytedance.adsdk.ugeno.ef.ro;

import android.content.Context;
import android.graphics.Canvas;
import android.view.MotionEvent;
import android.widget.FrameLayout;
import com.bytedance.adsdk.ugeno.core.dsz;
import com.bytedance.adsdk.ugeno.yz;
import java.util.Map;

/* JADX INFO: loaded from: classes.dex */
public class fm extends FrameLayout {
    private yz fm;
    private Map<Integer, dsz> ro;

    public fm(Context context) {
        super(context);
    }

    public void fm(yz yzVar) {
        this.fm = yzVar;
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        yz yzVar = this.fm;
        if (yzVar != null) {
            yzVar.wsy();
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        yz yzVar = this.fm;
        if (yzVar != null) {
            yzVar.wu();
        }
    }

    @Override // android.view.View
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
    }

    @Override // android.view.ViewGroup
    public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        Map<Integer, dsz> map = this.ro;
        if (map == null || !map.containsKey(4)) {
            return super.onInterceptTouchEvent(motionEvent);
        }
        return true;
    }

    @Override // android.widget.FrameLayout, android.view.ViewGroup, android.view.View
    public void onLayout(boolean z10, int i10, int i11, int i12, int i13) {
        yz yzVar = this.fm;
        if (yzVar != null) {
            yzVar.ajl();
        }
        super.onLayout(z10, i10, i11, i12, i13);
        yz yzVar2 = this.fm;
        if (yzVar2 != null) {
            yzVar2.fm(i10, i11, i12, i13);
        }
    }

    @Override // android.widget.FrameLayout, android.view.View
    public void onMeasure(int i10, int i11) {
        yz yzVar = this.fm;
        if (yzVar != null) {
            int[] iArrFm = yzVar.fm(i10, i11);
            super.onMeasure(iArrFm[0], iArrFm[1]);
        } else {
            super.onMeasure(i10, i11);
        }
        yz yzVar2 = this.fm;
        if (yzVar2 != null) {
            yzVar2.jnr();
        }
    }

    @Override // android.view.View
    public void onSizeChanged(int i10, int i11, int i12, int i13) {
        super.onSizeChanged(i10, i11, i12, i13);
        yz yzVar = this.fm;
        if (yzVar != null) {
            yzVar.ro(i10, i11, i12, i13);
        }
    }

    @Override // android.view.View
    public void onWindowFocusChanged(boolean z10) {
        super.onWindowFocusChanged(z10);
    }

    public void setEventMap(Map<Integer, dsz> map) {
        this.ro = map;
    }
}
