code: 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);
          }
      }
docs: Obtains the icon of the dialog's header from a specific theme.
  
  @param themeResourceId
  The resource id of the theme, the icon should be obtained from, as an {@link Integer}
  value