From 8b842e270bdf84000b0ac8095fdafed3d8788024 Mon Sep 17 00:00:00 2001 From: Katie Dektar Date: Sat, 25 Oct 2025 08:46:45 -0700 Subject: [PATCH] Start using new key for notifications dialog Stop-gap to ensure all new viewers of the notifications dialog are noted --- .../a5calls/android/a5calls/model/AccountManager.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/5calls/app/src/main/java/org/a5calls/android/a5calls/model/AccountManager.java b/5calls/app/src/main/java/org/a5calls/android/a5calls/model/AccountManager.java index 841dc31d..407af9b6 100644 --- a/5calls/app/src/main/java/org/a5calls/android/a5calls/model/AccountManager.java +++ b/5calls/app/src/main/java/org/a5calls/android/a5calls/model/AccountManager.java @@ -31,7 +31,9 @@ public enum AccountManager { public static final String KEY_ALLOW_REMINDERS = "prefsKeyEnableReminders"; private static final String KEY_REMINDERS_INFO_SHOWN = "prefsKeyRemindersInfoShown"; public static final String KEY_NOTIFICATIONS = "prefsKeyNotifications"; - private static final String KEY_NOTIFICATION_DIALOG_SHOWN = "prefsKeyNotificationDialog"; + private static final String KEY_NOTIFICATION_DIALOG_SHOWN = "prefsKeyNotificationDialog2"; + // Used for the notification dialog through version 73 (2.3.15). + private static final String KEY_DEPRECATED_NOTIFICATION_DIALOG_SHOWN = "prefsKeyNotificationDialog"; private static final String KEY_CALLER_ID = "prefsKeyCallerID"; private static final String KEY_REVIEW_DIALOG_SHOWN = "prefsKeyReviewDialog"; private static final String KEY_NEWSLETTER_PROMPT_DONE = "prefsKeyNewsletterPrompt"; @@ -168,8 +170,11 @@ public String getNotificationPreference(Context context) { } public boolean isNotificationDialogShown(Context context) { + // TODO: Try to upgrade users who had KEY_DEPRECATED_NOTIFICATION_DIALOG_SHOWN set + // but not KEY_NOTIFICATION_DIALOG_SHOWN. return getSharedPrefs(context).getBoolean(KEY_NOTIFICATION_DIALOG_SHOWN, - /* not seen yet */ false); + /* not seen yet */ false) || + getSharedPrefs(context).getBoolean(KEY_DEPRECATED_NOTIFICATION_DIALOG_SHOWN, false); } public void setNotificationDialogShown(Context context, boolean shown) {