com.bumptech.glide.signature
Class MediaStoreSignature
java.lang.Object
com.bumptech.glide.signature.MediaStoreSignature
- All Implemented Interfaces:
- Key
public class MediaStoreSignature
- extends Object
- implements Key
A unique signature based on metadata data from the media store that detects common changes to media store files like
edits, rotations, and temporary file replacement.
MediaStoreSignature
public MediaStoreSignature(String mimeType,
long dateModified,
int orientation)
- Constructor for
MediaStoreSignature
.
- Parameters:
mimeType
- The mime type of the media store media. Ok to default to empty string "". See
MediaStore.MediaColumns.MIME_TYPE
or
MediaStore.MediaColumns.MIME_TYPE
.dateModified
- The date modified time of the media store media. Ok to default to 0. See
MediaStore.MediaColumns.DATE_MODIFIED
or
MediaStore.MediaColumns.DATE_MODIFIED
.orientation
- The orientation of the media store media. Ok to default to 0. See
MediaStore.Images.ImageColumns.ORIENTATION
.
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Key
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Key
- Overrides:
hashCode
in class Object
updateDiskCacheKey
public void updateDiskCacheKey(MessageDigest messageDigest)
throws UnsupportedEncodingException
- Description copied from interface:
Key
- Adds all uniquely identifying information to the given digest.
Note - Using MessageDigest.reset()
inside of this method will result in undefined
behavior.
- Specified by:
updateDiskCacheKey
in interface Key
- Throws:
UnsupportedEncodingException