1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-12 04:25:08 -05:00
Commit Graph

39 Commits

Author SHA1 Message Date
cketti
aae734c175 Don't Log.w() full stacktrace if file wasn't found
This happens regularly when AttachmentView tries to get a thumbnail for
attachments that haven't been downloaded yet.
2012-01-24 22:14:21 +01:00
cketti
4e5d116713 Delete attachment metadata and thumbnails when deleting attachments 2012-01-24 16:15:45 +01:00
cketti
c6696f632a Code cleanup, fixed some warnings, rearranged some stuff 2012-01-24 16:15:44 +01:00
cketti
7a3cadbf1c Refactored AttachmentProvider.openFile() 2012-01-24 16:15:44 +01:00
edpeur
daeedc2222 Close resources properly 2011-12-31 17:38:41 +00:00
Marcus Wolschon
b8f04b8a4f typo 2011-06-14 15:22:45 +02:00
Jesse Vincent
3d583da450 ant astyle 2011-06-01 16:03:56 -04:00
Marcus Wolschon
59399506df fixed very rare NullPointerException 2011-04-19 09:01:01 +02:00
cketti
0aa03ccdc4 Extract MIME type fixup code to method MimeUtility.getMimeTypeForViewing() 2011-03-25 00:37:53 +01:00
cketti
522634fba7 Extend AttachmentProvider to be able to get "raw" attachment
AttachmentProvider can now return an attachment with an unmodified
MIME type. However, when viewing attachments this is not desirable. So
we try hard to return a sensible MIME type (use extension to look up
a MIME type if it's originally "application/octet-stream"; or replace
with canonical MIME type if it's known to be wrong, e.g.
"image/jpg" -> "image/jpeg")
2011-03-24 23:36:59 +01:00
cketti
7c5c29e87e Move MIME type fixing to AttachmentProvider 2011-03-24 23:07:46 +01:00
Apoorv Khatreja
168f6277da Mime type rewriting must be done only when an attachment is viewed. Therefore, removed conflicting references to rewriting code from LocalStore. 2011-03-25 05:46:11 +08:00
Apoorv Khatreja
80d99baf29 Implemented table lookup for mime type replacement (issue 873 and similar), added javadocs, moved to MimeUtility.java. 2011-03-25 05:46:11 +08:00
Apoorv Khatreja
fa5901d404 Fixed issue 873 where JPEG images with the MIME type "image/jpg" failed to open on some Motorola phones. 2011-03-25 05:45:54 +08:00
Jesse Vincent
12d1097a24 Big, scary massive "ant astyle" to get us back to something
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00
cketti
8279092070 Fixed lots of warnings (unused imports/variables, missing annotations, etc.) 2011-01-18 23:54:49 +00:00
Jesse Vincent
9878b74379 astyle 2010-12-24 18:55:05 +00:00
Jesse Vincent
0778c8ea17 Provisional fix for Issue 2760 in k9mail: New NPE from market. showing up a lot on 3.400 2010-12-16 02:38:54 +00:00
Jesse Vincent
14055691a3 Merge branch 'mail-on-sd'
* mail-on-sd: (40 commits)
  Added more comments to explain how the locking mecanism works for LocalStore
  Fixed wrong method being called during experimental provider initialization (since provider isn't enabled, that didn't harm)
  Add more comments about how the various StorageProviders work and how they're enabled
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  French localization for storage related settings
  Remove unused SD card strings (replaced with storage indirection)
  Merge mail-on-sd branch from trunk
  Reset mail service on storage mount (even if no account uses the storage, to be improved)
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  Migraion -> Migration
  move the Storage location preference into preferences rather than the wizard.
  Made LocalStore log less verbose Added @Override compile checks
  Added ACTION_SHUTDOWN broadcast receiver to properly initiate shutdown sequence (not yet implemented) and cancel any scheduled Intent
  Be more consistent about which SQLiteDatabase variable is used (from instance variable to argument variable) to make code more refactoring-friendly (class is already big, code extraction should be easier if not referencing the instance variable).
  Added transaction timing logging
  Factorised storage lock/transaction handling code for regular operations.
  Use DB transactions to batch modifications (makes code more robust / could improve performances)
  Merge mail-on-sd branch from trunk
  Update issue 888 Added DB close on unmount / DB open on mount
  Update issue 888 Back to account list when underlying storage not available/unmounting in MessageView / MessageList
  ...
2010-11-13 21:40:56 +00:00
Jesse Vincent
80e134c03c astyle 2010-07-22 03:40:30 +00:00
Jesse Vincent
65e318a80e mark thumbnails as .tmp files that should be explicitly gced on start. 2010-07-19 05:32:45 +00:00
Jesse Vincent
7de3aeb740 Actually, clearing the tempdir from attachmentprovider stomps on our
binary download usage of the temp directory. Reverted!
2010-07-19 05:32:37 +00:00
Jesse Vincent
a75bf8668e K-9 wasn't properly clearing the thumbnail/tmpfile cache. We now
properly clear it up on start, which causes K-9 to leak less flash
memory AND
fixes the "Wrong thumbnail" bug.
2010-07-19 01:55:23 +00:00
Jesse Vincent
819692e025 refactor one of the versions of 'getAttachmentUri' in terms of one of
the others. less code == fewer chances to screw up
2010-07-19 01:54:09 +00:00
Jesse Vincent
cce6a95c2c start using the android API for "/sdcard" 2010-05-29 21:56:09 +00:00
Jesse Vincent
8af7f4a7b6 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-04-29 04:59:14 +00:00
cketti
57cc4cd735 Code cleanup. Fixed lots of warnings reported by Eclipse.
- Removed unused imports
- Removed unused variables/code
- Parametrized raw types
- Added @Override annotations
- Added hashCode() when equals() was overriden
2010-04-16 12:20:10 +00:00
Bao-Long Nguyen-Trong
6b5ea9feda Reverted the revered version of AttachmentProvider so that people who used the attachment on sd card can still get to their attachments 2010-02-20 20:15:21 +00:00
Jesse Vincent
f9d39e4814 Back out Attachments-on-SD support (it's on a feature branch now, while
Bao-Long makes it extra-awesome)

This commit should revert:
r1445
r1437
r1436
r1449
r1442
r1441
r1419
r1414
r1413
2010-02-18 03:28:31 +00:00
Bao-Long Nguyen-Trong
55dac7ee4e Added option to have attachments store on sd card
(this is still a rough implementation)
2010-02-06 15:22:59 +00:00
Bao-Long Nguyen-Trong
11b7157772 Guess mime type (when not specified) of attachments of received messages using file name extension so that we can open them 2010-01-12 02:06:46 +00:00
Jesse Vincent
1c5073039a Further debug/info/verbose logging cleanup 2010-01-03 01:50:41 +00:00
Jesse Vincent
f31b2702a4 Massive rename to K9, step 1.
Conflicts:

	src/com/android/email/Email.java
2009-12-15 02:50:53 +00:00
Jesse Vincent
eedfc0a839 step 1 of rename 2008-12-16 23:07:33 +00:00
Jesse Vincent
5491dee81b Damn it. Weird symlink-in-checkout bug. There goes our commit history. Sorry, all.
Guess I should go back to svk
2008-11-01 21:32:06 +00:00
Jesse Vincent
12c6e53141 bin directory should never have been checked in 2008-11-01 21:23:45 +00:00
Jesse Vincent
c7de66484d more renaming. 2008-10-28 02:14:16 +00:00
Jesse Vincent
c00ec35921 Grand insane rename, step 3 2008-10-28 01:22:17 +00:00
Jesse Vincent
7051cf8cc0 move step 2 2008-10-28 01:19:57 +00:00