change according to Isira-Seneviratne suggestion
This commit is contained in:
parent
56eb8841bd
commit
a00c0b9e2b
1 changed files with 2 additions and 9 deletions
|
|
@ -461,14 +461,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val JSON_MIME_TYPE = getMimeType()
|
val JSON_MIME_TYPE = MimeTypeMap.getSingleton()
|
||||||
|
.getMimeTypeFromExtension("json") ?: "application/octet-stream"
|
||||||
private fun getMimeType(): String {
|
|
||||||
val mimeTypeJson = MimeTypeMap.getSingleton().getMimeTypeFromExtension("json")
|
|
||||||
return if (mimeTypeJson.isNullOrBlank())
|
|
||||||
"application/octet-stream"
|
|
||||||
else
|
|
||||||
mimeTypeJson
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue