From d8d7d0b7979354889ab7c9fa12b81ed1a16ec321 Mon Sep 17 00:00:00 2001 From: Altynaika Date: Thu, 11 Feb 2021 12:40:12 +0600 Subject: [PATCH] [android] disabled notification's "rate the place" and "leave a review through authorization with the help of accounts in social networks" Signed-off-by: Altynaika --- .../maps/background/NotificationService.java | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/android/src/com/mapswithme/maps/background/NotificationService.java b/android/src/com/mapswithme/maps/background/NotificationService.java index 5c2dc8c6f1..1dc748f846 100644 --- a/android/src/com/mapswithme/maps/background/NotificationService.java +++ b/android/src/com/mapswithme/maps/background/NotificationService.java @@ -55,19 +55,17 @@ public class NotificationService extends JobIntentService final long lastEventTimestamp = prefs(this) .getLong(LAST_AUTH_NOTIFICATION_TIMESTAMP, 0); - if (System.currentTimeMillis() - lastEventTimestamp > MIN_AUTH_EVENT_DELTA_MILLIS) - { - LOGGER.d(TAG, "Authentication notification will be sent."); - - prefs(this).edit() - .putLong(LAST_AUTH_NOTIFICATION_TIMESTAMP, System.currentTimeMillis()) - .apply(); - - Notifier notifier = Notifier.from(getApplication()); - notifier.notifyAuthentication(); - - return true; - } +// if (System.currentTimeMillis() - lastEventTimestamp > MIN_AUTH_EVENT_DELTA_MILLIS) +// { +// LOGGER.d(TAG, "Authentication notification will be sent."); +// +// prefs(this).edit().putLong(LAST_AUTH_NOTIFICATION_TIMESTAMP, System.currentTimeMillis()).apply(); +// +// Notifier notifier = Notifier.from(getApplication()); +// notifier.notifyAuthentication(); +// +// return true; +// } LOGGER.d(TAG, "Authentication notification is rejected. Last event timestamp: " + lastEventTimestamp + "Current time milliseconds: " + System.currentTimeMillis()); return false; @@ -83,12 +81,12 @@ public class NotificationService extends JobIntentService if (candidate == null) return false; - if (candidate.getType() == NotificationCandidate.TYPE_UGC_REVIEW) - { - Notifier notifier = Notifier.from(getApplication()); - notifier.notifyLeaveReview((NotificationCandidate.UgcReview) candidate); - return true; - } +// if (candidate.getType() == NotificationCandidate.TYPE_UGC_REVIEW) +// { +// Notifier notifier = Notifier.from(getApplication()); +// notifier.notifyLeaveReview((NotificationCandidate.UgcReview) candidate); +// return true; +// } return false; }