@Nullable
    public static Drawable getDrawable(@NonNull Context context, @DrawableRes int id) {
        if (Build.VERSION.SDK_INT >= 21) {
            return context.getDrawable(id);
        } else if (Build.VERSION.SDK_INT >= 16) {
            return context.getResources().getDrawable(id);
        } else {
            // Prior to JELLY_BEAN, Resources.getDrawable() would not correctly
            // retrieve the final configuration density when the resource ID
            // is a reference another Drawable resource. As a workaround, try
            // to resolve the drawable reference manually.
            final int resolvedId;
            synchronized (sLock) {
                if (sTempValue == null) {
                    sTempValue = new TypedValue();
                }
                context.getResources().getValue(id, sTempValue, true);
                resolvedId = sTempValue.resourceId;
            }
            return context.getResources().getDrawable(resolvedId);
        }
    }
Returns a drawable object associated with a particular resource ID.
<p>
Starting in {@link Build.VERSION_CODES#LOLLIPOP}, the
returned drawable will be styled for the specified Context's theme.

@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.
@return Drawable An object that can be used to draw this resource.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/ContextCompat.java