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