From 4721d92e7909fd00619a02571916c438ec5b395b Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 7 Mar 2012 21:40:41 +0100 Subject: [PATCH] Avoid some instances of autoboxing This will hopefully allow us to compile with "Android Java IDE". --- src/com/fsck/k9/activity/MessageCompose.java | 10 +++++----- src/com/fsck/k9/controller/MessagingController.java | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageCompose.java b/src/com/fsck/k9/activity/MessageCompose.java index 8ecc78a08..e14c34c8e 100644 --- a/src/com/fsck/k9/activity/MessageCompose.java +++ b/src/com/fsck/k9/activity/MessageCompose.java @@ -2427,19 +2427,19 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc updateFrom(); Integer bodyLength = k9identity.get(IdentityField.LENGTH) != null - ? Integer.parseInt(k9identity.get(IdentityField.LENGTH)) + ? Integer.valueOf(k9identity.get(IdentityField.LENGTH)) : 0; Integer bodyOffset = k9identity.get(IdentityField.OFFSET) != null - ? Integer.parseInt(k9identity.get(IdentityField.OFFSET)) + ? Integer.valueOf(k9identity.get(IdentityField.OFFSET)) : 0; Integer bodyFooterOffset = k9identity.get(IdentityField.FOOTER_OFFSET) != null - ? Integer.parseInt(k9identity.get(IdentityField.FOOTER_OFFSET)) + ? Integer.valueOf(k9identity.get(IdentityField.FOOTER_OFFSET)) : null; Integer bodyPlainLength = k9identity.get(IdentityField.PLAIN_LENGTH) != null - ? Integer.parseInt(k9identity.get(IdentityField.PLAIN_LENGTH)) + ? Integer.valueOf(k9identity.get(IdentityField.PLAIN_LENGTH)) : null; Integer bodyPlainOffset = k9identity.get(IdentityField.PLAIN_OFFSET) != null - ? Integer.parseInt(k9identity.get(IdentityField.PLAIN_OFFSET)) + ? Integer.valueOf(k9identity.get(IdentityField.PLAIN_OFFSET)) : null; mQuoteStyle = k9identity.get(IdentityField.QUOTE_STYLE) != null ? QuoteStyle.valueOf(k9identity.get(IdentityField.QUOTE_STYLE)) diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 023d19f60..250e3fb3d 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -629,7 +629,7 @@ public class MessagingController implements Runnable { Log.i(K9.LOG_TAG, "searchLocalMessages (" + "accountUuids=" + Utility.combine(accountUuids, ',') + ", folderNames = " + Utility.combine(folderNames, ',') - + ", messages.size() = " + (messages != null ? messages.length : null) + + ", messages.size() = " + (messages != null ? messages.length : -1) + ", query = " + query + ", integrate = " + integrate + ", requiredFlags = " + Utility.combine(requiredFlags, ',') @@ -4182,7 +4182,13 @@ public class MessagingController implements Runnable { NotificationSetting n = account.getNotificationSetting(); - configureNotification(notif, (n.shouldRing() ? n.getRingtone() : null), (n.shouldVibrate() ? n.getVibration() : null), (n.isLed() ? n.getLedColor() : null), K9.NOTIFICATION_LED_BLINK_SLOW, ringAndVibrate); + configureNotification( + notif, + (n.shouldRing()) ? n.getRingtone() : null, + (n.shouldVibrate()) ? n.getVibration() : null, + (n.isLed()) ? Integer.valueOf(n.getLedColor()) : null, + K9.NOTIFICATION_LED_BLINK_SLOW, + ringAndVibrate); notifMgr.notify(account.getAccountNumber(), notif); }