File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
app/src/main/java/eu/kanade/presentation/more/settings/screen Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package eu.kanade.presentation.more.settings.screen
33import android.annotation.SuppressLint
44import android.content.ActivityNotFoundException
55import android.content.Intent
6+ import android.os.Build
67import android.provider.Settings
78import android.webkit.WebStorage
89import android.webkit.WebView
@@ -147,9 +148,18 @@ object SettingsAdvancedScreen : SearchableSettings {
147148 Preference .PreferenceItem .TextPreference (
148149 title = stringResource(MR .strings.pref_manage_notifications),
149150 onClick = {
150- val intent = Intent (Settings .ACTION_APP_NOTIFICATION_SETTINGS ).apply {
151- putExtra(Settings .EXTRA_APP_PACKAGE , context.packageName)
151+ // SY -->
152+ val intent = Intent ().apply {
153+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
154+ setAction(Settings .ACTION_APP_NOTIFICATION_SETTINGS )
155+ putExtra(Settings .EXTRA_APP_PACKAGE , context.packageName)
156+ } else {
157+ setAction(" android.settings.APP_NOTIFICATION_SETTINGS" )
158+ putExtra(" app_package" , context.packageName)
159+ putExtra(" app_uid" , context.applicationInfo.uid)
160+ }
152161 }
162+ // SY <--
153163 context.startActivity(intent)
154164 },
155165 ),
You can’t perform that action at this time.
0 commit comments