@Nullable
    @SuppressWarnings("deprecation")
    public static Drawable getDrawableForDensity(@NonNull Resources res, @DrawableRes int id,
                                                 int density, @Nullable Theme theme) throws NotFoundException {
        if (SDK_INT >= 21) {
            return res.getDrawableForDensity(id, density, theme);
        } else if (SDK_INT >= 15) {
            return res.getDrawableForDensity(id, density);
        } else {
            return res.getDrawable(id);
        }
    }
Return a drawable object associated with a particular resource ID for
the given screen density in DPI and styled for the specified theme.
<p>
Prior to API level 15, the theme and density will not be applied and
this method simply calls through to {@link Resources#getDrawable(int)}.
<p>
Prior to API level 21, the theme will not be applied and this method
calls through to Resources#getDrawableForDensity(int, int).

@param id      The desired resource identifier, as generated by the aapt
               tool. This integer encodes the package, type, and resource
               entry. The value 0 is an invalid identifier.
@param density The desired screen density indicated by the resource as
               found in {@link android.util.DisplayMetrics}.
@param theme   The theme used to style the drawable attributes, may be
               {@code null}.
@return Drawable An object that can be used to draw this resource.
@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