Commit Graph

47 Commits

Author SHA1 Message Date
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 f5eb6e03af astyle 2010-12-01 06:32:29 +00:00
Jesse Vincent c79ea226a5 Remove "throws" declarations that didn't actually get thrown. Remove a
couple of try blocks that only caught throws we didn't throw. IntelliJ
optimization.
2010-12-01 03:02:13 +00:00
Jesse Vincent 580f47998d Remove subject from messageinfoholder 2010-11-27 04:03:06 +00:00
Jesse Vincent 60a538e071 Remove "preview" form messageinfoholder 2010-11-27 04:03:02 +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 64c102dd14 notification that the dataset changed needs to happen on the UI thread. 2010-10-21 20:49:48 +00:00
Fiouz 9db44bf4a9 MessageProvider: making sure exposed cursor gets dereferenced on close (and closed on finalization) to prevent memory leak 2010-10-11 20:41:59 +00:00
Jesse Vincent 5fc78b4219 astyle 2010-10-11 00:08:54 +00:00
Fiouz 296ab4f2be Update issue 1623
Message retrieval:
- Use the given projection for the cursor result instead of always using a predefined projection. Extraction logic is now in dedicated classes for easy extension.
- Added BaseColumns._ID & BaseColumns._COUNT columns.
- Deprecated "id" column since it's not a reliable identifier (it's an incremential value generated at query() time)
2010-10-09 09:19:24 +00:00
Jesse Vincent 7881039cbf astyle 2010-10-08 05:34:46 +00:00
Fiouz 6feb483f36 Update issue 1623
Restored accidently dropped content resolver notification code (dropped during r2397 refactoring)
First pass at documenting exposed fields
2010-10-06 20:14:33 +00:00
Fiouz f858c72482 Added @Override compile check 2010-10-06 17:51:35 +00:00
Fiouz 548e6e7c77 Update issue 1623
Don't export the formatted date through the content provider: now exported as the raw Epoch value - date formatting is a UI concern. That makes MessageInfoHolder lighter.
2010-10-05 22:33:20 +00:00
Fiouz 58c80ad096 Update issue 1623
Added semaphore to prevent third party content resolver from exhausting K-9 resources: it won't allow more than 1 cursor to be active at the same time. Concurrent threads (other content resolver invocations) will be suspended until the previous cursor gets released.
2010-10-05 20:23:07 +00:00
Jesse Vincent 6061c42ea9 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs 2010-10-05 06:04:28 +00:00
Fiouz 4d24101e13 MessageProvider:
- Prevented from handling queries while K-9 isn't ready
- Added more log output
2010-10-05 05:09:17 +00:00
Fiouz f1d413ce77 Optimization: extracted populate() outside MessageInfoHolder in order to properly cache DateFormat (avoid useless DateFormat costly lookup at each population) 2010-10-03 10:56:16 +00:00
Fiouz 71dbdf3417 Update issue 1623
Removed dependency from K9 to MessageProvider (and added ability for components to register themselve for being notified when K9 instance is ready)
Moved Intent broadcast code from MessageProvider to K9
Made query() easily extensible using strategy pattern, the discriminant still being the Uri path
2010-10-01 19:41:39 +00:00
Fiouz 01f961c058 Update issue 1623
Fixed severe design flaw where the message provider would accumulate messages, causing an OutOfMemoryError even when the message provider isn't explicitely invoked.
query() is now synchronized with message retrieval
2010-09-26 16:01:41 +00:00
Fiouz 4cb2d52c9c Refactored message sorting code by extracting the sort code from the sorted object (this was a bad design, worsened by the MessageProvider patch). Ideally, new Comparator classes should get promoted to top-level classes and not be enclosed in MessageList.
Subject stripper backported from issue258 branch (Utility.java)
The result is a cleaner MessageInfoHolder class.
2010-09-21 22:12:45 +00:00
Fiouz 5aa56e1569 Code cleaning: remove unused imports/variables 2010-09-04 06:57:25 +00:00
Fiouz de31886f44 Fixes issue 2230
Owner: fiouzy
Synchronize access to designated list to prevent concurrency issue
2010-09-03 20:32:12 +00:00
Jesse Vincent e0447e32cc astyle 2010-08-29 16:57:13 +00:00
Marcus Wolschon 00d30f1b8a NullPointerException and TODO-Marker on a strange code-line 2010-08-18 14:27:39 +00:00
Jesse Vincent 0b62640eac Provisional initial commit of MessagingProvider code by
stephane.lajeunesse and koxx33

We're going to try it out in the 3.1 dev series. if it ends up looking
good, it'll be in 3.2
2010-08-18 02:49:13 +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