Obtains the icon of the dialog, which is shown by the preference, from a specific typed
array.

@param typedArray
The typed array, the icon should be obtained from, as an instance of the class {@link
TypedArray}. The typed array may not be null
492472
private void obtainDialogIcon(@NonNull final TypedArray typedArray) {
        int resourceId =
                typedArray.getResourceId(R.styleable.DialogPreference_android_dialogIcon, -1);

        if (resourceId != -1) {
            setDialogIcon(resourceId);
        }
    }
1129113
@NonNull
    public IconicsDrawable icon(@NonNull Character icon) {
        return iconText(icon.toString(), null);
    }
149718
private Icon getEnabledIcon(AbstractButton b, Icon defaultIcon) {
        if (defaultIcon == null) {
            defaultIcon = getSynthIcon(b, SynthConstants.ENABLED);
        }

        return defaultIcon;
    }
1276898
public static Class getTypeClass(Type type)
    {
        Class typeClassClass = null;

        if (type instanceof Class) {
            typeClassClass = (Class) type;
        } else if (type instanceof ParameterizedType) {
            typeClassClass = (Class) ((ParameterizedType) type).getRawType();
        } else if (type instanceof GenericArrayType) {
            Class<?> arrrayParameter = getTypeClass(((GenericArrayType) type).getGenericComponentType());
            if (arrrayParameter != null) {
                typeClassClass = Array.newInstance(arrrayParameter, 0).getClass();
            }
        }

        return typeClassClass;
    }
1300932
public Type[] getArrayIndexTypes() throws IntrospectionException {
        if (!mCheckedForArrayLookup) {
            checkForArrayLookup();
        }

        return mArrayIndexTypes == null ? null :
            (Type[])mArrayIndexTypes.clone();
    }
1185585
public Object getIcon(int iIconType)
    {
        if (iIconType == CalendarConstants.END_ICON)
            return m_iconEnd;
        else if (iIconType == CalendarConstants.START_ICON)
            return m_iconStart;
        else
            return null;
    }
665891
private void obtainEntries(@NonNull final TypedArray typedArray) {
        CharSequence[] obtainedEntries =
                typedArray.getTextArray(R.styleable.AbstractListPreference_android_entries);

        if (obtainedEntries != null) {
            setEntries(obtainedEntries);
        }
    }
369325
@Override
	public Icon getIcon(EnumFacing side)
	{
		if (side == null || side.getIndex() > sideIcons.length)
			return defaultIcon;

		return ObjectUtils.firstNonNull(sideIcons[side.getIndex()], defaultIcon);
	}
715997
protected ArrayBufferView getTypedArray(Buffer buffer, int type, int byteSize) {
    if (!(buffer instanceof HasArrayBufferView)) {
      throw new RuntimeException("Native buffer required " + buffer);
    }
    HasArrayBufferView arrayHolder = (HasArrayBufferView) buffer;
    int bufferElementSize = arrayHolder.getElementSize();

    ArrayBufferView webGLArray = arrayHolder.getTypedArray();
    if (byteSize == -1) {
      byteSize = buffer.remaining() * bufferElementSize;
    }
    if (byteSize == buffer.capacity() * bufferElementSize && type == arrayHolder.getElementType()) {
      return webGLArray;
    }

    int byteOffset = webGLArray.byteOffset() + buffer.position() * bufferElementSize;

    switch (type) {
    case FLOAT:
      return TypedArrays.createFloat32Array(webGLArray.buffer(), byteOffset, byteSize / 4);
    case UNSIGNED_BYTE:
      return TypedArrays.createUint8Array(webGLArray.buffer(), byteOffset, byteSize);
    case UNSIGNED_SHORT:
      return TypedArrays.createUint16Array(webGLArray.buffer(), byteOffset, byteSize / 2);
    case INT:
      return TypedArrays.createInt32Array(webGLArray.buffer(), byteOffset, byteSize / 4);
    case SHORT:
      return TypedArrays.createInt16Array(webGLArray.buffer(), byteOffset, byteSize / 2);
    case BYTE:
      return TypedArrays.createInt8Array(webGLArray.buffer(), byteOffset, byteSize);
    default:
      throw new IllegalArgumentException("Type: " + type);
    }
  }
823931
public TypeDescription getArrayType() {

        Class<?> c = getTeaToolsUtils().getArrayType(mType);      
        if (mType == c) {
            return this;
        }

        return getTeaToolsUtils().createTypeDescription(c);
    }
351983
@NonNull
    public IconicsDrawable icon(@NonNull Character icon, @Nullable Typeface typeface) {
        return iconText(icon.toString(), typeface);
    }
329727
private void obtainShadowOrientation(@NonNull final TypedArray typedArray) {
        int defaultValue = getResources()
                .getInteger(R.integer.elevation_shadow_view_shadow_orientation_default_value);
        orientation = Orientation.fromValue(typedArray
                .getInteger(R.styleable.ElevationShadowView_shadowOrientation, defaultValue));
    }
1204525
private void obtainHeaderIcon(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
                new int[]{R.attr.materialDialogHeaderIcon});
        int resourceId = typedArray.getResourceId(0, 0);

        if (resourceId != 0) {
            setHeaderIcon(resourceId);
        }
    }
465649
protected Icon getSizingIcon(AbstractButton b) {
        // NOTE: this is slightly different than BasicButtonUI, where it
        // would just use getIcon, but this should be ok.
        Icon icon = (b.isEnabled() || b.getDisabledIcon() == null) ? b.getIcon() : b.getDisabledIcon();

        if (icon == null) {
            icon = getDefaultIcon(b);
        }

        return icon;
    }
1076017
private Icon getPressedIcon(AbstractButton b, Icon defaultIcon) {
        return getIcon(b, b.getPressedIcon(), defaultIcon, SynthConstants.PRESSED);
    }
578625
private void obtainDialogMaxWidth(@NonNull final TypedArray typedArray) {
        try {
            int maxWidth = typedArray
                    .getDimensionPixelSize(R.styleable.DialogPreference_dialogMaxWidth, -1);

            if (maxWidth != -1) {
                setDialogMaxWidth(maxWidth);
            }
        } catch (Resources.NotFoundException | UnsupportedOperationException e) {
            // No need to handle
        }
    }
147078
public IconType<FacesConfigManagedPropertyType<T>> getOrCreateIcon()
   {
      List<Node> nodeList = childNode.get("icon");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new IconTypeImpl<FacesConfigManagedPropertyType<T>>(this, "icon", childNode, nodeList.get(0));
      }
      return createIcon();
   }