mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-24 13:48:55 +03:00
Fix update notification not allowing installations on some ROMs (like MIUI)
This commit is contained in:
parent
ba2a8c82f8
commit
b837424f29
1 changed files with 4 additions and 1 deletions
|
@ -106,15 +106,18 @@ class UpdateDownloaderService : IntentService(UpdateDownloaderService::class.jav
|
||||||
throw Exception("Unsuccessful response")
|
throw Exception("Unsuccessful response")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val installIntent = UpdateNotificationReceiver.installApkIntent(ctx, apkFile.absolutePath)
|
||||||
|
|
||||||
// Prompt the user to install the new update.
|
// Prompt the user to install the new update.
|
||||||
NotificationCompat.Builder(this).update {
|
NotificationCompat.Builder(this).update {
|
||||||
setContentTitle(getString(R.string.app_name))
|
setContentTitle(getString(R.string.app_name))
|
||||||
setContentText(getString(R.string.update_check_notification_download_complete))
|
setContentText(getString(R.string.update_check_notification_download_complete))
|
||||||
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
||||||
// Install action
|
// Install action
|
||||||
|
setContentIntent(installIntent)
|
||||||
addAction(R.drawable.ic_system_update_grey_24dp_img,
|
addAction(R.drawable.ic_system_update_grey_24dp_img,
|
||||||
getString(R.string.action_install),
|
getString(R.string.action_install),
|
||||||
UpdateNotificationReceiver.installApkIntent(ctx, apkFile.absolutePath))
|
installIntent)
|
||||||
// Cancel action
|
// Cancel action
|
||||||
addAction(R.drawable.ic_clear_grey_24dp_img,
|
addAction(R.drawable.ic_clear_grey_24dp_img,
|
||||||
getString(R.string.action_cancel),
|
getString(R.string.action_cancel),
|
||||||
|
|
Loading…
Reference in a new issue