removing a redundant function

This commit is contained in:
tibbi 2019-01-13 22:22:44 +01:00
parent c0e4176779
commit 1935e3147b
1 changed files with 0 additions and 10 deletions

View File

@ -1,6 +1,5 @@
package com.simplemobiletools.gallery.pro.adapters package com.simplemobiletools.gallery.pro.adapters
import android.media.MediaMetadataRetriever
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
import android.view.Menu import android.view.Menu
@ -486,13 +485,4 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
thumbnail_section.setTextColor(textColor) 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 ""
}
} }