Package com.bumptech.glide.signature
Class MediaStoreSignature
java.lang.Object
com.bumptech.glide.signature.MediaStoreSignature
- All Implemented Interfaces:
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.
-
Field Summary
Fields inherited from interface com.bumptech.glide.load.Key
CHARSET, STRING_CHARSET_NAME -
Constructor Summary
ConstructorsConstructorDescriptionMediaStoreSignature(String mimeType, long dateModified, int orientation) Constructor forMediaStoreSignature. -
Method Summary
Modifier and TypeMethodDescriptionbooleanFor caching to work correctly, implementations must implement this method andKey.hashCode().inthashCode()For caching to work correctly, implementations must implement this method andKey.equals(Object).voidupdateDiskCacheKey(MessageDigest messageDigest) Adds all uniquely identifying information to the given digest.
-
Constructor Details
-
MediaStoreSignature
Constructor forMediaStoreSignature.- Parameters:
mimeType- The mime type of the media store media. Ok to default to empty string "". SeeMediaStore.MediaColumns.MIME_TYPEorMediaStore.MediaColumns.MIME_TYPE.dateModified- The date modified time of the media store media. Ok to default to 0. SeeMediaStore.MediaColumns.DATE_MODIFIEDorMediaStore.MediaColumns.DATE_MODIFIED.orientation- The orientation of the media store media. Ok to default to 0. SeeMediaStore.MediaColumns.ORIENTATION.
-
-
Method Details
-
equals
Description copied from interface:KeyFor caching to work correctly, implementations must implement this method andKey.hashCode(). -
hashCode
public int hashCode()Description copied from interface:KeyFor caching to work correctly, implementations must implement this method andKey.equals(Object). -
updateDiskCacheKey
Description copied from interface:KeyAdds all uniquely identifying information to the given digest.Note - Using
MessageDigest.reset()inside of this method will result in undefined behavior.- Specified by:
updateDiskCacheKeyin interfaceKey
-