package com.ifpdos.videopresenter.view.gestureview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.ifpdos.videopresenter.view.h;

/* JADX INFO: loaded from: classes.dex */
public class ExhibitionRoom extends FrameLayout {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private Context f2415c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private a f2416d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private h f2417e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private com.ifpdos.videopresenter.e.b f2418f;

    public ExhibitionRoom(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.f2415c = context;
        d();
    }

    private void c() {
        a aVar = new a(this.f2415c);
        this.f2416d = aVar;
        aVar.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
    }

    private void d() {
        c();
        this.f2417e = new h(this.f2415c.getApplicationContext(), this);
        a();
        setWillNotDraw(false);
    }

    public void a() {
        if (this.f2416d.getParent() == null) {
            addView(this.f2416d);
        }
        if (this.f2417e.getParent() == null) {
            addView(this.f2417e, new ViewGroup.LayoutParams(-1, -1));
        }
    }

    public void b() {
        com.ifpdos.videopresenter.e.b bVar = new com.ifpdos.videopresenter.e.b();
        this.f2418f = bVar;
        bVar.d(this.f2416d);
    }

    @Override // android.view.ViewGroup, android.view.View
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        this.f2417e.g();
        com.ifpdos.videopresenter.e.b bVar = this.f2418f;
        if (bVar != null) {
            bVar.k();
        }
    }
}
