removing a redundant function

This commit is contained in:
tibbi 2019-01-13 22:22:44 +01:00
parent c0e4176779
commit 1935e3147b

View file

@ -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 ""
}
}