code: public static int getThemeResource(int themeTag, boolean applyModifier) {
          if (themeTag >= _START_RESOURCES_ID) {
              return themeTag;
          }
          themeTag = prepareFlags(themeTag, applyModifier);
          if (ThemeManager.sThemeGetters != null) {
              int getterResource;
              final ThemeTag tag = new ThemeTag(themeTag);
              for (int i = ThemeManager.sThemeGetters.size() - 1; i >= 0; i--) {
                  getterResource = ThemeManager.sThemeGetters.get(i).getThemeResource(tag);
                  if (getterResource != 0) {
                      return getterResource;
                  }
              }
          }
          final int i = _THEMES_MAP.get(themeTag, -1);
          if (i == -1) {
              return _THEMES_MAP.get(_DEFAULT_THEME, R.style.Holo_Theme);
          } else {
              return i;
          }
      }
docs: Resolve theme resource id by flags