From c71f9f1d78fc249e70f6c25673ae34245d024f0e Mon Sep 17 00:00:00 2001 From: xynngh Date: Thu, 28 May 2020 23:19:20 +0400 Subject: [PATCH] Don't show reviews notification action for contacts --- .../yetanothercallblocker/NotificationHelper.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java b/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java index 14910c5..dad54df 100644 --- a/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java +++ b/app/src/main/java/dummydomain/yetanothercallblocker/NotificationHelper.java @@ -200,9 +200,12 @@ public class NotificationHelper { private static void addCallNotificationIntents(Context context, NotificationCompat.Builder builder, NumberInfo numberInfo) { - builder.setContentIntent(createInfoIntent(context, numberInfo)) - .addAction(0, context.getString(R.string.online_reviews), - createReviewsIntent(context, numberInfo)); + builder.setContentIntent(createInfoIntent(context, numberInfo)); + + if (numberInfo.contactItem == null) { + builder.addAction(0, context.getString(R.string.online_reviews), + createReviewsIntent(context, numberInfo)); + } } private static PendingIntent createInfoIntent(Context context, NumberInfo numberInfo) {