package o;

import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.google.android.gms.common.R;
import java.util.WeakHashMap;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class ZZ extends ConstraintLayout {
    public final RunnableC2108p1 B;
    public int C;
    public final C1092eO D;

    public ZZ(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, R.attr.materialClockStyle);
        LayoutInflater.from(context).inflate(R.layout.material_radial_view_group, this);
        C1092eO c1092eO = new C1092eO();
        this.D = c1092eO;
        O10 o10 = new O10(0.5f);
        M70 m70E = c1092eO.l.a.e();
        m70E.e = o10;
        m70E.f = o10;
        m70E.g = o10;
        m70E.h = o10;
        c1092eO.setShapeAppearanceModel(m70E.a());
        this.D.j(ColorStateList.valueOf(-1));
        C1092eO c1092eO2 = this.D;
        WeakHashMap weakHashMap = Oj0.a;
        setBackground(c1092eO2);
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, XZ.t, R.attr.materialClockStyle, 0);
        this.C = typedArrayObtainStyledAttributes.getDimensionPixelSize(0, 0);
        this.B = new RunnableC2108p1(17, this);
        typedArrayObtainStyledAttributes.recycle();
    }

    @Override // android.view.ViewGroup
    public final void addView(View view, int i, ViewGroup.LayoutParams layoutParams) {
        super.addView(view, i, layoutParams);
        if (view.getId() == -1) {
            WeakHashMap weakHashMap = Oj0.a;
            view.setId(View.generateViewId());
        }
        Handler handler = getHandler();
        if (handler != null) {
            RunnableC2108p1 runnableC2108p1 = this.B;
            handler.removeCallbacks(runnableC2108p1);
            handler.post(runnableC2108p1);
        }
    }

    public abstract void m();

    @Override // android.view.View
    public final void onFinishInflate() {
        super.onFinishInflate();
        m();
    }

    @Override // androidx.constraintlayout.widget.ConstraintLayout, android.view.ViewGroup
    public final void onViewRemoved(View view) {
        super.onViewRemoved(view);
        Handler handler = getHandler();
        if (handler != null) {
            RunnableC2108p1 runnableC2108p1 = this.B;
            handler.removeCallbacks(runnableC2108p1);
            handler.post(runnableC2108p1);
        }
    }

    @Override // android.view.View
    public final void setBackgroundColor(int i) {
        this.D.j(ColorStateList.valueOf(i));
    }
}
