@IdRes
    @RequiresApi(23)
    @DrawableRes
    private static int getResId(@NonNull Icon icon) {
        if (Build.VERSION.SDK_INT >= 28) {
            return icon.getResId();
        }
        try {
            return (int) icon.getClass().getMethod("getResId").invoke(icon);
        } catch (IllegalAccessException e) {
            Log.e(TAG, "Unable to get icon resource", e);
            return 0;
        } catch (InvocationTargetException e) {
            Log.e(TAG, "Unable to get icon resource", e);
            return 0;
        } catch (NoSuchMethodException e) {
            Log.e(TAG, "Unable to get icon resource", e);
            return 0;
        }
    }
Gets the resource used to create this icon.
<p>
Only valid for icons of type TYPE_RESOURCE.
Note: This resource may not be available if the application changes at all, and it is
up to the caller to ensure safety if this resource is re-used and/or persisted.
Returns {@code 0} if the id cannot be gotten.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/IconCompat.java