Add cacheKey to LottieCompositionFactory call
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java b/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java index 0ae8125..8d6fb95 100644 --- a/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java +++ b/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java
@@ -207,7 +207,7 @@ * * Pass null as the cache key to skip caching. */ - public static LottieTask<LottieComposition> fromRawRes(Context context, @RawRes final int rawRes, @Nullable String cacheKey) { + public static LottieTask<LottieComposition> fromRawRes(Context context, @RawRes final int rawRes, @Nullable final String cacheKey) { // Prevent accidentally leaking an Activity. final WeakReference<Context> contextRef = new WeakReference<>(context); final Context appContext = context.getApplicationContext(); @@ -216,7 +216,7 @@ public LottieResult<LottieComposition> call() { @Nullable Context originalContext = contextRef.get(); Context context = originalContext != null ? originalContext : appContext; - return fromRawResSync(context, rawRes); + return fromRawResSync(context, rawRes, cacheKey); } }); }