From d46c438cd9503e956c629125ecf83d838c4791a6 Mon Sep 17 00:00:00 2001 From: qwe7002 Date: Thu, 2 Apr 2020 17:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=9F=AD=E4=BF=A1=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/qwe7002/telegram_sms_compat/main_activity.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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);