Skip to content

Commit

Permalink
实现短信黑名单功能
Browse files Browse the repository at this point in the history
  • Loading branch information
qwe7002 committed Apr 2, 2020
1 parent 506e417 commit d46c438
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d46c438

Please sign in to comment.