content: package com.google.android.material.timepicker;
  
  import android.content.Context;
  import android.content.res.ColorStateList;
  import android.content.res.TypedArray;
  import android.graphics.drawable.Drawable;
  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 androidx.constraintlayout.widget.ConstraintSet;
  import androidx.core.view.ViewCompat;
  import com.google.android.material.R;
  import com.google.android.material.shape.CornerSize;
  import com.google.android.material.shape.MaterialShapeDrawable;
  import com.google.android.material.shape.RelativeCornerSize;
  
  class RadialViewGroup extends ConstraintLayout {
      private static final String SKIP_TAG = "skip";
      private MaterialShapeDrawable background;
      private int radius;
      private final Runnable updateLayoutParametersRunnable;
  
      public RadialViewGroup(Context context) {
          this(context, (AttributeSet) null);
      }
  
      public RadialViewGroup(Context context, AttributeSet attrs) {
          this(context, attrs, 0);
      }
  
      public RadialViewGroup(Context context, AttributeSet attrs, int defStyleAttr) {
          super(context, attrs, defStyleAttr);
          LayoutInflater.from(context).inflate(R.layout.material_radial_view_group, this);
          ViewCompat.setBackground(this, createBackground());
          TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attrs, R.styleable.RadialViewGroup, defStyleAttr, 0);
          this.radius = obtainStyledAttributes.getDimensionPixelSize(R.styleable.RadialViewGroup_materialCircleRadius, 0);
          this.updateLayoutParametersRunnable = new Runnable() {
              public void run() {
                  RadialViewGroup.this.updateLayoutParams();
              }
          };
          obtainStyledAttributes.recycle();
      }
  
      private Drawable createBackground() {
          MaterialShapeDrawable materialShapeDrawable = new MaterialShapeDrawable();
          this.background = materialShapeDrawable;
          materialShapeDrawable.setCornerSize((CornerSize) new RelativeCornerSize(0.5f));
          this.background.setFillColor(ColorStateList.valueOf(-1));
          return this.background;
      }
  
      private static boolean shouldSkipView(View child) {
          return SKIP_TAG.equals(child.getTag());
      }
  
      private void updateLayoutParamsAsync() {
          Handler handler = getHandler();
          if (handler != null) {
              handler.removeCallbacks(this.updateLayoutParametersRunnable);
              handler.post(this.updateLayoutParametersRunnable);
          }
      }
  
      public void addView(View child, int index, ViewGroup.LayoutParams params) {
          super.addView(child, index, params);
          if (child.getId() == -1) {
              child.setId(ViewCompat.generateViewId());
          }
          updateLayoutParamsAsync();
      }
  
      public int getRadius() {
          return this.radius;
      }
  
      /* access modifiers changed from: protected */
      public void onFinishInflate() {
          super.onFinishInflate();
          updateLayoutParams();
      }
  
      public void onViewRemoved(View view) {
          super.onViewRemoved(view);
          updateLayoutParamsAsync();
      }
  
      public void setBackgroundColor(int color) {
          this.background.setFillColor(ColorStateList.valueOf(color));
      }
  
      public void setRadius(int radius2) {
          this.radius = radius2;
          updateLayoutParams();
      }
  
      /* access modifiers changed from: protected */
      public void updateLayoutParams() {
          int i = 1;
          int childCount = getChildCount();
          for (int i2 = 0; i2 < childCount; i2++) {
              if (shouldSkipView(getChildAt(i2))) {
                  i++;
              }
          }
          ConstraintSet constraintSet = new ConstraintSet();
          constraintSet.clone((ConstraintLayout) this);
          float f = 0.0f;
          for (int i3 = 0; i3 < childCount; i3++) {
              View childAt = getChildAt(i3);
              if (childAt.getId() != R.id.circle_center && !shouldSkipView(childAt)) {
                  constraintSet.constrainCircle(childAt.getId(), R.id.circle_center, this.radius, f);
                  f += 360.0f / ((float) (childCount - i));
              }
          }
          constraintSet.applyTo(this);
      }
  }
  