Commit Graph

247 Commits

Author SHA1 Message Date
Marc Blank 3a5c1fb274 Email split, part neuf: Setup, logging, attachment glue
* Make "Exchange" option in account setup depend upon availability of the
  Exchange EmailService
* Make presence of Exchange logging depend upon availability of the
  Exchange EmailService
* Make AttachmentDownloadService use service rather than ExchangeService
  class
* Move SSLUtils to emailcommon/utility
* Move account manager type defs to emailcommon/AccountManagerTypes
* Update proguard.flags
* This is the penultimate CL for the Email package itself; the next CL
  creates a clean, SDK-compatible Email application

Bug: 3442973
Change-Id: I9162cf5fa6b5a043ded0fdd1e25fd3ce5948ad8f
2011-02-14 16:08:55 -08:00
Marc Blank 31d9acbf06 Email split, part huit: Refactor constants, clean emailcommon
* There are three pieces to this CL (sorry):
  1) Move and/or rename some constants into emailcommon
  2) Move Utility to emailcommon, moving the few UI
     related utilities back into Email (FolderProperties
     and UiUtilities)
  3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
  the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
2011-02-14 12:18:10 -08:00
Marc Blank a7bc0319a7 Email split, part six: EmailContent
* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
2011-02-10 19:44:29 -08:00
Marc Blank 2193962ca2 Email split, part quatre: Move along, nothing to see here
* No code was harmed, er, changed in the making of this CL
* All that's happened is that code that is needed by both Email and
  Exchange have been moved into emailcommon
* This required import changes to many files, which explains the
  length of the CL

Change-Id: I4e12455ba057a4a8054fdbd0b578c73afa411c8a
2011-02-10 16:28:37 -08:00
Marc Blank 8a57469460 Email split, part trois: AccountService
* Create AccountService.aidl and AccountServiceProxy in emailcommon
* Implement AccountService in email
* Use AccountServiceProxy in Exchange for account reconciliation,
  notifications, etc.
* Move sync window constants into emailcommon
* Split attachment provider utilities and constants into emailcommon

Bug: 3442973
Change-Id: I89dce28b799b193243c07774dab65d830ae62775
2011-02-10 14:32:01 -08:00
Todd Kennedy 8cc2fc5101 Merge "Fix attachment mime type unit tests" 2011-02-08 14:32:22 -08:00
Makoto Onuki 314a51cb1d Refactoring widget
- Moved to com.android.email.widget
- Extracted nested classes to top-level classes
- Some small clean-ups.
- WidgetProvider and WidgetProvider$WidgetService are left in the original
  package to keep compatibility with honeycomb (3.0) release.

This CL is supposed to be pure-refactoring.  There should be no
functionality changes.

Change-Id: I37acaa24b6b488724750c0f33374b31fcc433f11
2011-02-08 13:10:42 -08:00
Todd Kennedy 8586532f3e Fix attachment mime type unit tests
Attachments with no extension and mime type of text/plain need to return the
mime type of "text/plain" instead of "application/octet-stream"

bug 3428076

Change-Id: I00452c908ac0672879d42f4ed9ee574e376eac9f
2011-02-08 09:51:16 -08:00
Marc Blank 433d500cb9 Merge "Show smart forward attachments in MessageCompose" 2011-02-07 10:11:36 -08:00
Todd Kennedy 5e39f90e9d Resolve build warnings; part 4
Fix unchecked warnings

Change-Id: I872740fca4e5050e6ed2922eabc7e46e5e97ff3c
2011-02-03 12:44:24 -08:00
Jesse Wilson 3aee641aab Use a field rather than a superclass for ContentCache's cache.
This makes it easier for cache experiments to swap out the
LinkedHashMap for another cache.

http://b/3184897
Change-Id: Iacdb266e41f5a98efd9bb30bc09ff8fff5a0a5a9
2011-02-02 12:11:17 -08:00
Todd Kennedy f1b510462f Fix ConcurrentAccessException in unit tests
The ContentCache is now an LRU cache. This means we must NOT access the cache
while using any iterator over the cache. In this case, we were calling get()
using an iterator of cache keys.

Change-Id: I2d1feabff7474b6f2a230b98f97df067ab7ccd9c
2011-01-31 17:39:44 -08:00
Andy Stadler 34512ba630 am 809cd769: am 0e3a0331: Widget: Max out message count at 999+
* commit '809cd769390aa503ad90e5b8bce1594f92a2479f':
  Widget: Max out message count at 999+
2011-01-30 12:53:16 -08:00
Andy Stadler 0e3a03317b Widget: Max out message count at 999+
Bug 3403158

Change-Id: I1daf0c62684bad83a69e19c39ffe1b8df899d077
2011-01-30 11:45:33 -08:00
Marc Blank a86265e8e5 am 9a09129d: am 1122e0f6: Merge "Remove cache statistics logging" into honeycomb
* commit '9a09129d0928712ad84a11027812ff0a63afed4a':
  Remove cache statistics logging
2011-01-28 16:22:14 -08:00
Marc Blank f40294e1aa Remove cache statistics logging
* Use static final flag to control this
* Set flag to false for all commits

Bug: 3403725
Change-Id: I70c89aaf2f0b226206e505a14e9a8f1ed2ebb51a
2011-01-28 14:54:52 -08:00
Marc Blank d07a2312b7 Merge "Make ContentCache LRU, rather than LRI" 2011-01-28 12:56:46 -08:00
Marc Blank 50c7d755a7 Make ContentCache LRU, rather than LRI
Bug: 3403111
Change-Id: I12993a8185db1bebe760f8bd1a8d22683bcdddc3
2011-01-28 12:37:09 -08:00
Marc Blank fe9db17831 Show smart forward attachments in MessageCompose
Bug: 3367188
Change-Id: I59dae9781be59eebe3a68769138e8253a24455e6
2011-01-27 10:13:25 -08:00
Todd Kennedy 6c5ee59c4f Add "tap to configure" text to widget
If there are no email accounts defined, the widget should show a single string
that allows the user to create a new account. Whenever there are changes to
the defined accounts, the widget(s) will update their headers to ensure they
are only displaying valid information.

bug 3296594

Change-Id: I156c20cfc90692174297a2aededd85775e0ea196
2011-01-26 17:58:51 -08:00
Todd Kennedy adbd22c9be Merge "Infer attachment's mime type if it's text/plain" into honeycomb 2011-01-25 10:36:36 -08:00
Todd Kennedy b3740d227e Merge "Only show loaded messages in widget" into honeycomb 2011-01-25 10:06:51 -08:00
Todd Kennedy 34212cc7df Infer attachment's mime type if it's text/plain
If the server reports an attachment's mime type as either text/plain or
application/octet-stream, we will try to infer the real mime type using
the attachment's extension. If one cannot be found, we either synthesize
it (if original mime type is application-octet-stream), or, we use the
server specified mime type (if the original is text/plain).

bug 3379416

Change-Id: I331e767ed36e4e17756025cc816bdb7b5a8f0868
2011-01-25 09:55:15 -08:00
Todd Kennedy 543953ad87 Only show loaded messages in widget
The various selection strings were missing a test to only show messages that
have been loaded. This is only important for POP3 accounts.

bug 3377041

Change-Id: I3efe366d09dd547878dc0bf57dff58f76de5cca9
2011-01-25 09:42:04 -08:00
Andy Stadler 9128217da1 Merge forward small bug found in password storage
While fixing bug 2981433 in Gingerbread, I discovered one additional
place where passwords were being trimmed.  This brings the fix forward
into honeycomb, as well as a new unit test for the fix.

Bug: 2981433
Change-Id: I566f5c0c6693ca7c0069bca9e74f320fca48e600
2011-01-24 20:13:11 -08:00
Todd Kennedy 751e4b2d95 Prevent auto-download of attachments not in an inbox
When creating the list of attachments to be automatically downloaded in the
background, exclude any attachments that are not in an inbox. Also added unit
tests to ensure the query URIs behave as expected.

NOTE: This is a partial fix for general background attachment downloading issues

bug 3373982

Change-Id: I13ef56cd280c028fa966ab9e655acce28b0b9b91
2011-01-24 13:43:14 -08:00
Makoto Onuki 6833fd5ab6 AttachmentProvider: Always return mime-types in lowercase
Intent-filter's mime-type matching is case-sensitive.  We should always use
lowercase letters.

Bug 3375709

Change-Id: Idd4abb41f94c816a5b9150aef5859dd75487a042
2011-01-21 14:56:01 -08:00
Todd Kennedy 02ba344cf2 Only show messages from inbox for account & unread views
Use a sub-selection to limit the messages from the inbox. Also add a unit
test to ensure the selections are working correctly.

bug 3368613

Change-Id: Ia24ef6028ded27c69f982ecbc6b67f35f84d1b6d
2011-01-20 13:20:12 -08:00
Todd Kennedy a33c0c74cc Revert string name change
to prevent churn for the translators, revert the string name change

Change-Id: I22710d810a5f3602ccd53a9cb4d2f31edca572f1
2011-01-19 16:23:42 -08:00
Makoto Onuki e539a1973e Merge "Dump widget state to bugreport" into honeycomb 2011-01-19 14:34:39 -08:00
Makoto Onuki dc200a44a9 Dump widget state to bugreport
This might be helpful someday...

Change-Id: I5a9e0a2948c7ea9fa5c9a7da61d143c10dda7d9a
2011-01-19 14:22:01 -08:00
Todd Kennedy 3db3e4b795 widget combined inbox view only shows messages in inbox
instead of showing all messages (e.g. messages in drafts, etc...) the "combined
inbox" view now only messages in the inbox folder. This is now identical to
the "combined inbox" view available in the full email UI.

bug 3368613

Change-Id: I0080b56cd2718a3dce82b279277c63c4f43e86dc
2011-01-19 11:27:41 -08:00
Todd Kennedy 290fb65595 Update widget colours / assets according to spec
* Modified font colours for read/un-read emails
* Add chip colours when viewing mail from multiple accounts
* Add calendar icon if message has an invite attachment
* Update background of read/un-read emails

bug 3351761

Change-Id: Id59573d25a6988e9e869335f95778aad28b43912
2011-01-19 09:23:58 -08:00
Winson Chung cb8a5544bf Updating widget due to API changes.
Change-Id: I8623c48e912330145cfd325c962574d322ccc6f0
2011-01-18 15:31:17 -08:00
Andy Stadler 946239e8a0 Add per-account preference for bkgnd attachments
* Add flag to Account record
* Add checkbox to Account Settings (IMAP & EAS)
* Add checkbox to Account Setup (IMAP & EAS)
* Add flag to backup/restore logic
* Update Account & AccountSetupOptions unit tests

Bug: 3360873
Change-Id: I0c407776ede4110f33716644f6f027938f21130a
2011-01-18 10:53:37 -08:00
Makoto Onuki d072f9905d Don't show trashed messages in Starred mailbox
Also show the *total* starred message count (excluding trashed starred)
in the mailbox list, not *per-account* starred count.

Bug 3346872
Bug 2149412

Change-Id: I2274f215f994b62280ac6138982b927cec22c677
2011-01-13 15:41:22 -08:00
Marc Blank 055dd6be86 Cleanup WidgetProvider
* Remove STOPSHIPs
* Don't use startService calls

Bug: 3341494
Bug: 3342662
Change-Id: I46fd60db40cf3476255f1af795da0b2a4bc34a7e
2011-01-12 16:12:07 -08:00
Makoto Onuki e5d9691ec5 Merge "Don't show starred mailbox, if account has no starred" into honeycomb 2011-01-12 10:01:14 -08:00
Marc Blank 1268bef712 Fix broken widget display (typo)
Bug: 3329906
Bug: 3342305
Change-Id: I1c1f2ae78ba86b28923d4fd9c7c390425de83af1
2011-01-11 18:44:39 -08:00
Makoto Onuki 9c0da8b84f Don't show starred mailbox, if account has no starred
Bug 3334963

Change-Id: I751e56731b990a6e94b8547a577a84c1a848cbc7
2011-01-11 16:45:05 -08:00
Andy Stadler 86753bc41c Update file type acceptance rules
* Open up all types for view/save rules
* Add anti-malware block list (based on extensions)
* Clean up code that shows/hides view & save buttons
* Redo handling of load/cancel 1sec timer
* Unit test for new little utility
* Allow larger items when on wifi

Bug: 3338984
Bug: 3334950
Bug: 3338988
Bug: 3340835

Change-Id: I991135636d507f2660e2860720dbed21bd1a955b
2011-01-11 14:40:41 -08:00
Marc Blank 3d87da33b8 Merge "Add logging for widget view switching" into honeycomb 2011-01-11 13:21:57 -08:00
Marc Blank 7fbe563f51 Add logging for widget view switching
Change-Id: I5e39ffffa0860fb43a503e4ec00ddad8003f5ef4
2011-01-11 13:21:21 -08:00
Marc Blank 26cf5639e0 Remove STOPSHIP from WidgetProvider
Bug: 3335070
Change-Id: I838d5eeb795759da30946fbdb00fa3f0e4dbdb12
2011-01-10 11:33:21 -08:00
Marc Blank d6ce2998f7 Merge "Fix widget view switching with > 1 account" into honeycomb 2011-01-07 16:01:49 -08:00
Marc Blank dc3f9f4d69 Fix widget view switching with > 1 account
* Add test case for view switching

Bug: 3329906
Change-Id: I738bad118d7d7a8d2839fbd2a9fdc00af2af3153
2011-01-07 13:20:48 -08:00
Andy Stadler 201a24f51e Harden MailService against half-created accounts
* Add simple sanity checks to scanned accounts, skip over if bad
* Fix existing unit tests and add new unit test for this change
* Also fixed minor bug in EmailContent that was never triggered in
  production code (only discovered it via a unit test).
* Also fixed minor bug in an existing unit test

Bug: 2937595
Change-Id: Id60bbb5d8bd923db043d46891c7f89d7debb0a11
2011-01-06 12:53:40 -08:00
Marc Blank d306ba3438 Handle query with an id of -1 more gracefully
* In query of an otherwise valid URI with -1 as an id, simply return
  an empty cursor
* Add unit test to verify proper handling of invalid uri's

Bug: 3183245
Bug: 3292080

Change-Id: Ia0c35cbd0f5dd0dc4a8fc794226399644cf1fe13
2010-12-30 15:02:43 -08:00
Marc Blank 1c1bd6a3eb Fix typo in debug code
Change-Id: Iffb3effa3fd659be3df3208bb587fea83bc9116e
2010-12-29 20:51:16 -08:00
Marc Blank 788408dee4 Fix synchronization issue w/ closing CachedCursor
Bug: 3306031

Change-Id: I3000cf92c27e93b2df94799492fb9960a3d795dc
2010-12-26 11:45:30 -08:00