removing a redundant function
This commit is contained in:
parent
c0e4176779
commit
1935e3147b
|
@ -1,6 +1,5 @@
|
|||
package com.simplemobiletools.gallery.pro.adapters
|
||||
|
||||
import android.media.MediaMetadataRetriever
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.Menu
|
||||
|
@ -486,13 +485,4 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||
thumbnail_section.setTextColor(textColor)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getFormattedVideoLength(medium: Medium): String {
|
||||
if (medium.isVideo()) {
|
||||
val retriever = MediaMetadataRetriever()
|
||||
retriever.setDataSource(medium.path)
|
||||
return Math.round(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION).toInt() / 1000f).getFormattedDuration()
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue