Rename DownloadManager to DownloadEngine

Also add some documentation
This commit is contained in:
topjohnwu
2024-02-06 17:54:15 -08:00
parent 4bf1c74164
commit 2aa923191e
16 changed files with 85 additions and 41 deletions
@@ -11,7 +11,7 @@ import androidx.core.content.getSystemService
import androidx.core.graphics.drawable.toIcon
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.core.di.AppContext
import com.topjohnwu.magisk.core.download.DownloadManager
import com.topjohnwu.magisk.core.download.DownloadEngine
import com.topjohnwu.magisk.core.download.Subject
import com.topjohnwu.magisk.core.ktx.getBitmap
import com.topjohnwu.magisk.core.ktx.selfLaunchIntent
@@ -67,7 +67,7 @@ object Notifications {
fun updateAvailable() {
AppContext.apply {
val intent = DownloadManager.getPendingIntent(this, Subject.App())
val intent = DownloadEngine.getPendingIntent(this, Subject.App())
val bitmap = getBitmap(R.drawable.ic_magisk_outline)
val builder = if (SDK_INT >= Build.VERSION_CODES.O) {
Notification.Builder(this, UPDATE_CHANNEL)