mirror of
https://github.com/etesync/android
synced 2025-08-03 12:28:04 +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)
|
addPreferencesFromResource(R.xml.settings_app)
|
||||||
|
|
||||||
findPreference("notification_settings").apply {
|
findPreference("notification_settings").apply {
|
||||||
if (Build.VERSION.SDK_INT >= 26)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||||
onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||||
startActivity(Intent(android.provider.Settings.ACTION_APP_NOTIFICATION_SETTINGS).apply {
|
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
|
false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user