Remove old download progress update system

This commit is contained in:
topjohnwu
2019-07-29 00:42:53 -07:00
parent 0e9b71e7a9
commit debaec32af
7 changed files with 10 additions and 149 deletions
@@ -12,7 +12,7 @@ import com.topjohnwu.magisk.extensions.get
import com.topjohnwu.magisk.extensions.writeTo
import com.topjohnwu.magisk.model.entity.internal.DownloadSubject
import com.topjohnwu.magisk.model.entity.internal.DownloadSubject.*
import com.topjohnwu.magisk.utils.ProgInputStream
import com.topjohnwu.magisk.utils.ProgressInputStream
import com.topjohnwu.magisk.view.Notifications
import com.topjohnwu.superuser.ShellUtils
import io.reactivex.Single
@@ -100,7 +100,7 @@ abstract class RemoteFileService : NotificationService() {
val maxRaw = contentLength()
val max = maxRaw / 1_000_000f
return ProgInputStream(byteStream()) {
return ProgressInputStream(byteStream()) {
val progress = it / 1_000_000f
update(id) { notification ->
notification