mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
Settings: cleanup the code to open the app's notification settings
This commit is contained in:
parent
5261d428e0
commit
101e7e2559
@ -66,10 +66,10 @@ class AppSettingsActivity : BaseActivity() {
|
||||
addPreferencesFromResource(R.xml.settings_app)
|
||||
|
||||
findPreference("notification_settings").apply {
|
||||
if (Build.VERSION.SDK_INT >= 26)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||
startActivity(Intent(android.provider.Settings.ACTION_APP_NOTIFICATION_SETTINGS).apply {
|
||||
putExtra(android.provider.Settings.EXTRA_APP_PACKAGE, BuildConfig.APPLICATION_ID)
|
||||
putExtra(android.provider.Settings.EXTRA_APP_PACKAGE, context.packageName)
|
||||
})
|
||||
false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user