diff --git a/app/src/main/java/com/qwe7002/telegram_sms_compat/main_activity.java b/app/src/main/java/com/qwe7002/telegram_sms_compat/main_activity.java index a085b01..ba6cd02 100644 --- a/app/src/main/java/com/qwe7002/telegram_sms_compat/main_activity.java +++ b/app/src/main/java/com/qwe7002/telegram_sms_compat/main_activity.java @@ -442,11 +442,9 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) { case R.id.set_notify: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) { if (!public_func.is_notify_listener(context)) { - Intent setting_intent; + Intent setting_intent = new Intent("android.settings.NOTIFICATION_LISTENER_SETTINGS"); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP_MR1) { setting_intent = new Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS); - } else { - setting_intent = new Intent("android.settings.NOTIFICATION_LISTENER_SETTINGS"); } setting_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(setting_intent);