From b837424f294e8ae0082c8aca54a4baf8f733437f Mon Sep 17 00:00:00 2001 From: len Date: Sun, 6 Nov 2016 20:14:13 +0100 Subject: [PATCH] Fix update notification not allowing installations on some ROMs (like MIUI) --- .../kanade/tachiyomi/data/updater/UpdateDownloaderService.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateDownloaderService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateDownloaderService.kt index 562277a30b..77ca655822 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateDownloaderService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/UpdateDownloaderService.kt @@ -106,15 +106,18 @@ class UpdateDownloaderService : IntentService(UpdateDownloaderService::class.jav throw Exception("Unsuccessful response") } + val installIntent = UpdateNotificationReceiver.installApkIntent(ctx, apkFile.absolutePath) + // Prompt the user to install the new update. NotificationCompat.Builder(this).update { setContentTitle(getString(R.string.app_name)) setContentText(getString(R.string.update_check_notification_download_complete)) setSmallIcon(android.R.drawable.stat_sys_download_done) // Install action + setContentIntent(installIntent) addAction(R.drawable.ic_system_update_grey_24dp_img, getString(R.string.action_install), - UpdateNotificationReceiver.installApkIntent(ctx, apkFile.absolutePath)) + installIntent) // Cancel action addAction(R.drawable.ic_clear_grey_24dp_img, getString(R.string.action_cancel),