mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
fix #909, rely on date_time_original before date_time
This commit is contained in:
parent
88d4cba636
commit
7fc8d4a3d8
2 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:4.6.13'
|
||||
implementation 'com.simplemobiletools:commons:4.6.14'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
|
|
|
@ -295,7 +295,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||
val mediumDao = activity.galleryDB.MediumDao()
|
||||
val paths = getSelectedPaths()
|
||||
for (path in paths) {
|
||||
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME) ?: continue
|
||||
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL)
|
||||
?: ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME)
|
||||
val format = "yyyy:MM:dd kk:mm:ss"
|
||||
val formatter = SimpleDateFormat(format, Locale.getDefault())
|
||||
val timestamp = formatter.parse(dateTime).time
|
||||
|
|
Loading…
Reference in a new issue