private static boolean getBoolean(Context context, String key, boolean defaultValue) {
    return context
        .getSharedPreferences(IMAGE_FORMAT_PREFS, Context.MODE_PRIVATE)
        .getBoolean(key, defaultValue);
  }
Helper class to add custom decoders and drawable factories if enabled.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/CustomImageFormatConfigurator.java