Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
fix kotlin build problem
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDave committed Feb 2, 2021
1 parent 178dc2f commit 7ec782f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class ReceiveSharingIntentPlugin : FlutterPlugin, ActivityAware, MethodCallHandl
return when (intent.action) {
Intent.ACTION_SEND -> {
val uri = intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM)
val path = FileDirectory.getAbsolutePath(applicationContext, uri)
val path = FileDirectory.getAbsolutePath(applicationContext, uri!!)
if (path != null) {
val type = getMediaType(path)
val thumbnail = getThumbnail(path, type)
Expand Down Expand Up @@ -204,7 +204,7 @@ class ReceiveSharingIntentPlugin : FlutterPlugin, ActivityAware, MethodCallHandl
if (type != MediaType.VIDEO) return null // get duration for video only
val retriever = MediaMetadataRetriever()
retriever.setDataSource(path)
val duration = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION).toLongOrNull()
val duration = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)!!.toLongOrNull()
retriever.release()
return duration
}
Expand Down

0 comments on commit 7ec782f

Please sign in to comment.