@Nullable
    @SuppressWarnings("deprecation")
    public static ColorStateList getColorStateList(@NonNull Resources res, @ColorRes int id,
                                                   @Nullable Theme theme) throws NotFoundException {
        if (SDK_INT >= 23) {
            return res.getColorStateList(id, theme);
        } else {
            return res.getColorStateList(id);
        }
    }
Returns a themed color state list associated with a particular resource
ID. The resource may contain either a single raw color value or a
complex {@link ColorStateList} holding multiple possible colors.
<p>
Prior to API level 23, the theme will not be applied and this method
calls through to {@link Resources#getColorStateList(int)}.

@param id    The desired resource identifier of a {@link ColorStateList},
             as generated by the aapt tool. This integer encodes the
             package, type, and resource entry. The value 0 is an invalid
             identifier.
@param theme The theme used to style the color attributes, may be
             {@code null}.
@return A themed ColorStateList object containing either a single solid
color or multiple colors that can be selected based on a state.
@throws NotFoundException Throws NotFoundException if the given ID does
                          not exist.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/ResourcesCompat.java