mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
increased app update buffer size
This commit is contained in:
parent
19b2cae851
commit
329966732f
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,7 @@ class ApkInstaller(private val service: PackageInstallerService) {
|
||||||
|
|
||||||
session.openWrite(context.packageName, 0, size)
|
session.openWrite(context.packageName, 0, size)
|
||||||
.use { outputStream ->
|
.use { outputStream ->
|
||||||
val buffer = ByteArray(1024)
|
val buffer = ByteArray(4 * 1024)
|
||||||
var bytesRead = inputStream.read(buffer)
|
var bytesRead = inputStream.read(buffer)
|
||||||
|
|
||||||
while (bytesRead >= 0) {
|
while (bytesRead >= 0) {
|
||||||
|
@ -100,6 +100,7 @@ class ApkInstaller(private val service: PackageInstallerService) {
|
||||||
installProgress.invoke(bytesRead)
|
installProgress.invoke(bytesRead)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
session.fsync(outputStream)
|
||||||
inputStream.close()
|
inputStream.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue