From 08581f6538b78f24d53e186a24917fbae52f30a7 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 15 Jul 2010 03:42:01 +0000 Subject: [PATCH] isRing -> shouldRing so that the code reads sanely --- src/com/fsck/k9/Account.java | 2 +- src/com/fsck/k9/activity/setup/AccountSettings.java | 4 ++-- src/com/fsck/k9/controller/MessagingController.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index 87a1c6934..b9586efab 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -1049,7 +1049,7 @@ public class Account implements BaseAccount return oldMaxPushFolders != maxPushFolders; } - public synchronized boolean isRing() + public synchronized boolean shouldRing() { return mRing; } diff --git a/src/com/fsck/k9/activity/setup/AccountSettings.java b/src/com/fsck/k9/activity/setup/AccountSettings.java index 0ae0bcdcd..cb7ea1b6c 100644 --- a/src/com/fsck/k9/activity/setup/AccountSettings.java +++ b/src/com/fsck/k9/activity/setup/AccountSettings.java @@ -386,7 +386,7 @@ public class AccountSettings extends K9PreferenceActivity // XXX: The following two lines act as a workaround for the RingtonePreference // which does not let us set/get the value programmatically SharedPreferences prefs = mAccountRingtone.getPreferenceManager().getSharedPreferences(); - String currentRingtone = (!mAccount.isRing() ? null : mAccount.getRingtone()); + String currentRingtone = (!mAccount.shouldRing() ? null : mAccount.getRingtone()); prefs.edit().putString(PREFERENCE_RINGTONE, currentRingtone).commit(); mAccountVibrate = (CheckBoxPreference) findPreference(PREFERENCE_VIBRATE); @@ -565,7 +565,7 @@ public class AccountSettings extends K9PreferenceActivity } else { - if (mAccount.isRing()) + if (mAccount.shouldRing()) { mAccount.setRingtone(null); } diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 6bb631336..0368e8a45 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -4621,7 +4621,7 @@ public class MessagingController implements Runnable if (!account.isRingNotified()) { account.setRingNotified(true); - if (account.isRing()) + if (account.shouldRing()) { String ringtone = account.getRingtone(); notif.sound = TextUtils.isEmpty(ringtone) ? null : Uri.parse(ringtone);