mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 16:47:50 +00:00
Fix processPayload
This commit is contained in:
parent
6bdc57cbe4
commit
6f77f190f2
@ -322,7 +322,8 @@ abstract class MagiskInstallImpl protected constructor(
|
||||
|
||||
val fd = Os.open(fifo.path, O_WRONLY, 0)
|
||||
try {
|
||||
val buf = ByteBuffer.allocate(1024 * 1024)
|
||||
val bufSize = 1024 * 1024
|
||||
val buf = ByteBuffer.allocate(bufSize)
|
||||
buf.position(input.read(buf.array()).coerceAtLeast(0)).flip()
|
||||
while (buf.hasRemaining()) {
|
||||
try {
|
||||
@ -334,6 +335,7 @@ abstract class MagiskInstallImpl protected constructor(
|
||||
break
|
||||
}
|
||||
if (!buf.hasRemaining()) {
|
||||
buf.limit(bufSize)
|
||||
buf.position(input.read(buf.array()).coerceAtLeast(0)).flip()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user