private boolean hasRuntimeVisibleAnnotation(HasAttribute element) {
    Attribute att = element.getAttributes().findFirst(AttRuntimeVisibleAnnotations.ATTRIBUTE_NAME);
    return (att != null && ((AttRuntimeVisibleAnnotations) att).getAnnotations().size() > 0);
  }
Keep classes annotated with runtime annotations.
android/android_framework/dex-maker/src/main/java/com/android/multidex/MainDexListBuilder.java