fix #938, fix a glitch at fixing Date Taken value
This commit is contained in:
parent
46b47896a5
commit
d80f703af7
1 changed files with 1 additions and 1 deletions
|
@ -296,7 +296,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
||||||
val paths = getSelectedPaths()
|
val paths = getSelectedPaths()
|
||||||
for (path in paths) {
|
for (path in paths) {
|
||||||
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL)
|
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL)
|
||||||
?: ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME)
|
?: ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME) ?: continue
|
||||||
val format = "yyyy:MM:dd kk:mm:ss"
|
val format = "yyyy:MM:dd kk:mm:ss"
|
||||||
val formatter = SimpleDateFormat(format, Locale.getDefault())
|
val formatter = SimpleDateFormat(format, Locale.getDefault())
|
||||||
val timestamp = formatter.parse(dateTime).time
|
val timestamp = formatter.parse(dateTime).time
|
||||||
|
|
Loading…
Reference in a new issue