forked from upstream-mirrors/quik
Add parts before creating SMIL document
This commit is contained in:
@@ -157,8 +157,11 @@ class Transaction @JvmOverloads constructor(private val context: Context, settin
|
|||||||
req.date = System.currentTimeMillis() / 1000
|
req.date = System.currentTimeMillis() / 1000
|
||||||
req.body = PduBody()
|
req.body = PduBody()
|
||||||
|
|
||||||
|
// Parts
|
||||||
|
parts.map(this::partToPduPart).forEach { req.body.addPart(it) }
|
||||||
|
|
||||||
// SMIL document for compatibility
|
// SMIL document for compatibility
|
||||||
req.body.addPart(PduPart().apply {
|
req.body.addPart(0, PduPart().apply {
|
||||||
contentId = "smil".toByteArray()
|
contentId = "smil".toByteArray()
|
||||||
contentLocation = "smil.xml".toByteArray()
|
contentLocation = "smil.xml".toByteArray()
|
||||||
contentType = ContentType.APP_SMIL.toByteArray()
|
contentType = ContentType.APP_SMIL.toByteArray()
|
||||||
@@ -167,9 +170,6 @@ class Transaction @JvmOverloads constructor(private val context: Context, settin
|
|||||||
.toByteArray()
|
.toByteArray()
|
||||||
})
|
})
|
||||||
|
|
||||||
// Parts
|
|
||||||
parts.map(this::partToPduPart).forEach { req.body.addPart(it) }
|
|
||||||
|
|
||||||
req.messageSize = parts.mapNotNull { it.data?.size }.sum().toLong()
|
req.messageSize = parts.mapNotNull { it.data?.size }.sum().toLong()
|
||||||
req.messageClass = PduHeaders.MESSAGE_CLASS_PERSONAL_STR.toByteArray()
|
req.messageClass = PduHeaders.MESSAGE_CLASS_PERSONAL_STR.toByteArray()
|
||||||
req.expiry = DEFAULT_EXPIRY_TIME
|
req.expiry = DEFAULT_EXPIRY_TIME
|
||||||
|
|||||||
Reference in New Issue
Block a user