Loading k9mail/src/main/java/com/fsck/k9/K9.java +10 −10 Original line number Diff line number Diff line Loading @@ -571,20 +571,21 @@ public class K9 extends Application { intent.putExtra(K9.Intents.EmailReceived.EXTRA_SUBJECT, message.getSubject()); intent.putExtra(K9.Intents.EmailReceived.EXTRA_FROM_SELF, account.isAnIdentity(message.getFrom())); K9.this.sendBroadcast(intent); if (K9.DEBUG) Timber.d("Broadcasted: action=%s account=%s folder=%s message uid=%s", action, account.getDescription(), folder, message.getUid()); action, account.getDescription(), folder, message.getUid()); } private void updateUnreadWidget() { try { UnreadWidgetProvider.updateUnreadCount(K9.this); } catch (Exception e) { if (K9.DEBUG) { Timber.e(e, "Error while updating unread widget(s)"); } } } private void updateMailListWidget() { try { Loading @@ -592,7 +593,7 @@ public class K9 extends Application { } catch (RuntimeException e) { if (BuildConfig.DEBUG) { throw e; } else if (K9.DEBUG) { } else { Timber.e(e, "Error while updating message list widget"); } } Loading Loading @@ -802,9 +803,8 @@ public class K9 extends Application { protected void notifyObservers() { synchronized (observers) { for (final ApplicationAware aware : observers) { if (K9.DEBUG) { Timber.v("Initializing observer: %s", aware); } try { aware.initializeComponent(this); } catch (Exception e) { Loading k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java +11 −21 Original line number Diff line number Diff line Loading @@ -792,9 +792,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, private void onAccountChosen(Account account, Identity identity) { if (!this.account.equals(account)) { if (K9.DEBUG) { Timber.v("Switching account from %s to %s", this.account, account); } // on draft edit, make sure we don't keep previous message UID if (action == Action.EDIT_DRAFT) { Loading @@ -812,15 +810,12 @@ public class MessageCompose extends K9Activity implements OnClickListener, // actual account switch this.account = account; if (K9.DEBUG) { Timber.v("Account switch, saving new draft in new account"); } checkToSaveDraftImplicitly(); if (previousDraftId != INVALID_DRAFT_ID) { if (K9.DEBUG) { Timber.v("Account switch, deleting draft from previous account: %d", previousDraftId); } MessagingController.getInstance(getApplication()).deleteDraft(previousAccount, previousDraftId); } Loading Loading @@ -1199,10 +1194,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, } } else { if (K9.DEBUG) { Timber.d("could not get Message-ID."); } } // Quote the message and setup the UI. quotedMessagePresenter.initFromReplyToMessage(messageViewInfo, action); Loading Loading @@ -1235,10 +1228,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, repliedToMessageId = message.getMessageId(); referencedMessageIds = repliedToMessageId; } else { if (K9.DEBUG) { Timber.d("could not get Message-ID."); } } // Quote the message and setup the UI. quotedMessagePresenter.processMessageToForward(messageViewInfo); Loading Loading @@ -1369,12 +1360,11 @@ public class MessageCompose extends K9Activity implements OnClickListener, **/ private void updateReferencedMessage() { if (messageReference != null && messageReference.getFlag() != null) { if (K9.DEBUG) { Timber.d("Setting referenced message (%s, %s) flag to %s", messageReference.getFolderName(), messageReference.getUid(), messageReference.getFlag()); } final Account account = Preferences.getPreferences(context) .getAccount(messageReference.getAccountUuid()); final String folderName = messageReference.getFolderName(); Loading k9mail/src/main/java/com/fsck/k9/activity/MessageList.java +1 −2 Original line number Diff line number Diff line Loading @@ -757,7 +757,6 @@ public class MessageList extends K9Activity implements MessageListFragmentListen // Swallow these events too to avoid the audible notification of a volume change if (K9.useVolumeKeysForListNavigationEnabled()) { if ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)) { if (K9.DEBUG) Timber.v("Swallowed key up."); return true; } Loading k9mail/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java +1 −3 Original line number Diff line number Diff line Loading @@ -58,9 +58,7 @@ public class AttachmentContentLoader extends AsyncTaskLoader<Attachment> { File file = File.createTempFile(FILENAME_PREFIX, null, context.getCacheDir()); file.deleteOnExit(); if (K9.DEBUG) { Timber.v("Saving attachment to %s", file.getAbsolutePath()); } SafeContentResolver safeContentResolver = SafeContentResolverCompat.newInstance(context); InputStream in = safeContentResolver.openInputStream(sourceAttachment.uri); Loading k9mail/src/main/java/com/fsck/k9/cache/TemporaryAttachmentStore.java +1 −3 Original line number Diff line number Diff line Loading @@ -53,9 +53,7 @@ public class TemporaryAttachmentStore { for (File file : files) { if (file.lastModified() < cutOffTime) { if (file.delete()) { if (K9.DEBUG) { Timber.d("Deleted from temporary attachment store: %s", file.getName()); } } else { Timber.w("Couldn't delete from temporary attachment store: %s", file.getName()); } Loading Loading
k9mail/src/main/java/com/fsck/k9/K9.java +10 −10 Original line number Diff line number Diff line Loading @@ -571,20 +571,21 @@ public class K9 extends Application { intent.putExtra(K9.Intents.EmailReceived.EXTRA_SUBJECT, message.getSubject()); intent.putExtra(K9.Intents.EmailReceived.EXTRA_FROM_SELF, account.isAnIdentity(message.getFrom())); K9.this.sendBroadcast(intent); if (K9.DEBUG) Timber.d("Broadcasted: action=%s account=%s folder=%s message uid=%s", action, account.getDescription(), folder, message.getUid()); action, account.getDescription(), folder, message.getUid()); } private void updateUnreadWidget() { try { UnreadWidgetProvider.updateUnreadCount(K9.this); } catch (Exception e) { if (K9.DEBUG) { Timber.e(e, "Error while updating unread widget(s)"); } } } private void updateMailListWidget() { try { Loading @@ -592,7 +593,7 @@ public class K9 extends Application { } catch (RuntimeException e) { if (BuildConfig.DEBUG) { throw e; } else if (K9.DEBUG) { } else { Timber.e(e, "Error while updating message list widget"); } } Loading Loading @@ -802,9 +803,8 @@ public class K9 extends Application { protected void notifyObservers() { synchronized (observers) { for (final ApplicationAware aware : observers) { if (K9.DEBUG) { Timber.v("Initializing observer: %s", aware); } try { aware.initializeComponent(this); } catch (Exception e) { Loading
k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java +11 −21 Original line number Diff line number Diff line Loading @@ -792,9 +792,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, private void onAccountChosen(Account account, Identity identity) { if (!this.account.equals(account)) { if (K9.DEBUG) { Timber.v("Switching account from %s to %s", this.account, account); } // on draft edit, make sure we don't keep previous message UID if (action == Action.EDIT_DRAFT) { Loading @@ -812,15 +810,12 @@ public class MessageCompose extends K9Activity implements OnClickListener, // actual account switch this.account = account; if (K9.DEBUG) { Timber.v("Account switch, saving new draft in new account"); } checkToSaveDraftImplicitly(); if (previousDraftId != INVALID_DRAFT_ID) { if (K9.DEBUG) { Timber.v("Account switch, deleting draft from previous account: %d", previousDraftId); } MessagingController.getInstance(getApplication()).deleteDraft(previousAccount, previousDraftId); } Loading Loading @@ -1199,10 +1194,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, } } else { if (K9.DEBUG) { Timber.d("could not get Message-ID."); } } // Quote the message and setup the UI. quotedMessagePresenter.initFromReplyToMessage(messageViewInfo, action); Loading Loading @@ -1235,10 +1228,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, repliedToMessageId = message.getMessageId(); referencedMessageIds = repliedToMessageId; } else { if (K9.DEBUG) { Timber.d("could not get Message-ID."); } } // Quote the message and setup the UI. quotedMessagePresenter.processMessageToForward(messageViewInfo); Loading Loading @@ -1369,12 +1360,11 @@ public class MessageCompose extends K9Activity implements OnClickListener, **/ private void updateReferencedMessage() { if (messageReference != null && messageReference.getFlag() != null) { if (K9.DEBUG) { Timber.d("Setting referenced message (%s, %s) flag to %s", messageReference.getFolderName(), messageReference.getUid(), messageReference.getFlag()); } final Account account = Preferences.getPreferences(context) .getAccount(messageReference.getAccountUuid()); final String folderName = messageReference.getFolderName(); Loading
k9mail/src/main/java/com/fsck/k9/activity/MessageList.java +1 −2 Original line number Diff line number Diff line Loading @@ -757,7 +757,6 @@ public class MessageList extends K9Activity implements MessageListFragmentListen // Swallow these events too to avoid the audible notification of a volume change if (K9.useVolumeKeysForListNavigationEnabled()) { if ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)) { if (K9.DEBUG) Timber.v("Swallowed key up."); return true; } Loading
k9mail/src/main/java/com/fsck/k9/activity/loader/AttachmentContentLoader.java +1 −3 Original line number Diff line number Diff line Loading @@ -58,9 +58,7 @@ public class AttachmentContentLoader extends AsyncTaskLoader<Attachment> { File file = File.createTempFile(FILENAME_PREFIX, null, context.getCacheDir()); file.deleteOnExit(); if (K9.DEBUG) { Timber.v("Saving attachment to %s", file.getAbsolutePath()); } SafeContentResolver safeContentResolver = SafeContentResolverCompat.newInstance(context); InputStream in = safeContentResolver.openInputStream(sourceAttachment.uri); Loading
k9mail/src/main/java/com/fsck/k9/cache/TemporaryAttachmentStore.java +1 −3 Original line number Diff line number Diff line Loading @@ -53,9 +53,7 @@ public class TemporaryAttachmentStore { for (File file : files) { if (file.lastModified() < cutOffTime) { if (file.delete()) { if (K9.DEBUG) { Timber.d("Deleted from temporary attachment store: %s", file.getName()); } } else { Timber.w("Couldn't delete from temporary attachment store: %s", file.getName()); } Loading