Sonar Fresco plugin: Progress
@@ -11,6 +11,8 @@ package com.facebook.cache.common;
import javax.annotation.Nullable;
+import android.net.Uri;
+
/**
* Extension of {@link SimpleCacheKey} which adds the ability to hold a caller context. This can be
* of use for debugging and has no bearing on equality.
@@ -18,14 +20,23 @@ import javax.annotation.Nullable;
public class DebuggingCacheKey extends SimpleCacheKey {
private final Object mCallerContext;
+ private final Uri mSourceUri;
- public DebuggingCacheKey(String key, @Nullable Object callerContext) {
+ public DebuggingCacheKey(String key, @Nullable Object callerContext, Uri sourceUri) {
super(key);
mCallerContext = callerContext;
+ mSourceUri = sourceUri;
}
@Nullable
public Object getCallerContext() {
return mCallerContext;
}
+
+ /**
+ * Original URI the image was fetched from.
+ */
+ public Uri getSourceUri() {
+ return mSourceUri;
+ }
}
