code: private void obtainPreviewShape(@NonNull final TypedArray typedArray) {
          int defaultValue = getContext().getResources()
                  .getInteger(R.integer.color_picker_preference_default_preview_shape);
          setPreviewShape(PreviewShape.fromValue(typedArray
                  .getInteger(R.styleable.AbstractColorPickerPreference_previewShape, defaultValue)));
      }
docs: Obtains the shape of the preview of the preference's color from a specific typed array.
  
  @param typedArray
  The typed array, the shape should be obtained from, as an instance of the class
  {@link TypedArray}. The typed array may not be null