package d.r;

import android.view.View;
import android.view.ViewGroup;
import com.ifpdos.udi.service.core.pc.R;
import d.r.h;
import java.util.ArrayList;

/* JADX INFO: loaded from: classes.dex */
public class z extends k {
    public final /* synthetic */ ViewGroup a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ View f3425b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ View f3426c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ a0 f3427d;

    public z(a0 a0Var, ViewGroup viewGroup, View view, View view2) {
        this.f3427d = a0Var;
        this.a = viewGroup;
        this.f3425b = view;
        this.f3426c = view2;
    }

    @Override // d.r.k, d.r.h.d
    public void b(h hVar) {
        this.a.getOverlay().remove(this.f3425b);
    }

    @Override // d.r.h.d
    public void c(h hVar) {
        this.f3426c.setTag(R.id.save_overlay_view, null);
        this.a.getOverlay().remove(this.f3425b);
        hVar.y(this);
    }

    @Override // d.r.k, d.r.h.d
    public void e(h hVar) {
        if (this.f3425b.getParent() == null) {
            this.a.getOverlay().add(this.f3425b);
            return;
        }
        a0 a0Var = this.f3427d;
        int size = a0Var.A.size();
        while (true) {
            size--;
            if (size < 0) {
                break;
            } else {
                a0Var.A.get(size).cancel();
            }
        }
        ArrayList<h.d> arrayList = a0Var.E;
        if (arrayList == null || arrayList.size() <= 0) {
            return;
        }
        ArrayList arrayList2 = (ArrayList) a0Var.E.clone();
        int size2 = arrayList2.size();
        for (int i2 = 0; i2 < size2; i2++) {
            ((h.d) arrayList2.get(i2)).d(a0Var);
        }
    }
}
