content: package androidx.constraintlayout.widget;
  
  import android.content.Context;
  import android.content.res.TypedArray;
  import android.os.Build;
  import android.util.AttributeSet;
  import android.view.View;
  import android.view.ViewParent;
  
  public abstract class VirtualLayout extends ConstraintHelper {
      private boolean mApplyElevationOnAttach;
      private boolean mApplyVisibilityOnAttach;
  
      public VirtualLayout(Context context) {
          super(context);
      }
  
      public VirtualLayout(Context context, AttributeSet attrs) {
          super(context, attrs);
      }
  
      public VirtualLayout(Context context, AttributeSet attrs, int defStyleAttr) {
          super(context, attrs, defStyleAttr);
      }
  
      /* access modifiers changed from: protected */
      public void applyLayoutFeaturesInConstraintSet(ConstraintLayout container) {
          applyLayoutFeatures(container);
      }
  
      /* access modifiers changed from: protected */
      public void init(AttributeSet attrs) {
          super.init(attrs);
          if (attrs != null) {
              TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attrs, R.styleable.ConstraintLayout_Layout);
              int indexCount = obtainStyledAttributes.getIndexCount();
              for (int i = 0; i < indexCount; i++) {
                  int index = obtainStyledAttributes.getIndex(i);
                  if (index == R.styleable.ConstraintLayout_Layout_android_visibility) {
                      this.mApplyVisibilityOnAttach = true;
                  } else if (index == R.styleable.ConstraintLayout_Layout_android_elevation) {
                      this.mApplyElevationOnAttach = true;
                  }
              }
              obtainStyledAttributes.recycle();
          }
      }
  
      public void onAttachedToWindow() {
          super.onAttachedToWindow();
          if (this.mApplyVisibilityOnAttach || this.mApplyElevationOnAttach) {
              ViewParent parent = getParent();
              if (parent instanceof ConstraintLayout) {
                  ConstraintLayout constraintLayout = (ConstraintLayout) parent;
                  int visibility = getVisibility();
                  float f = 0.0f;
                  if (Build.VERSION.SDK_INT >= 21) {
                      f = getElevation();
                  }
                  for (int i = 0; i < this.mCount; i++) {
                      View viewById = constraintLayout.getViewById(this.mIds[i]);
                      if (viewById != null) {
                          if (this.mApplyVisibilityOnAttach) {
                              viewById.setVisibility(visibility);
                          }
                          if (this.mApplyElevationOnAttach && f > 0.0f && Build.VERSION.SDK_INT >= 21) {
                              viewById.setTranslationZ(viewById.getTranslationZ() + f);
                          }
                      }
                  }
              }
          }
      }
  
      public void onMeasure(androidx.constraintlayout.core.widgets.VirtualLayout layout, int widthMeasureSpec, int heightMeasureSpec) {
      }
  
      public void setElevation(float elevation) {
          super.setElevation(elevation);
          applyLayoutFeatures();
      }
  
      public void setVisibility(int visibility) {
          super.setVisibility(visibility);
          applyLayoutFeatures();
      }
  }
  