Commit Graph

3184 Commits

Author SHA1 Message Date
Marc Blank
d694a20849 EAS implementation of "move to folder"
* Handle errors cases appropriately

Change-Id: I16060cc5c4fc648c299a2fa8f9f57d9aa5c37f56
2010-08-26 13:19:05 -07:00
Andrew Stadler
486761169d Merge "Finish delete account functionality" 2010-08-26 07:36:10 -07:00
Andrew Stadler
464d1f95b7 Finish delete account functionality
* Wire in delete account functionality
* Minor cleanups
* Update TODO list

Change-Id: Id9852eb833b0b4e4e8233620412e475815e537ef
2010-08-25 22:44:11 -07:00
Marc Blank
62d19789b7 Merge "Fix attachmentExists (recognize mContentBytes)" 2010-08-25 22:35:28 -07:00
Marc Blank
4dcb1c5fda Fix attachmentExists (recognize mContentBytes)
* Add unit test for attachmentExists

Bug: 2937856
Change-Id: I020f58740618c084676bbf1cdfad3795edb07688
2010-08-25 22:34:22 -07:00
Marc Blank
61bddf2519 Merge "Set HAS_ATTENDEE_DATA to 0 for exceptions" 2010-08-25 11:55:01 -07:00
Marc Blank
c2246b37ce Merge "Fix failing account backup/restore unit tests" 2010-08-25 11:08:07 -07:00
Marc Blank
5a53ad7286 Merge "Fix problem w/ forwarding already loaded attachments" 2010-08-25 11:07:32 -07:00
Marc Blank
1718115cd1 Set HAS_ATTENDEE_DATA to 0 for exceptions
Bug: 2891708
Change-Id: Ia38214dcb9d72e45c1e481bc93fc6521ea206d0f
2010-08-24 17:59:17 -07:00
Marc Blank
818214e31f Fix failing account backup/restore unit tests
* We can't run the AccountManager functionality of account backup
  and restore in the unit tests, because IsolatedContext doesn't
  mock the AccountManager; this leads to various NPE's when the
  test is run
* These problems started, by the way, when we added POP/IMAP
  account integration with AccountManager
* Since the AccountManager side of account backup/restore isn't
  tested, we'll skip that part of the process when running unit
  tests

Bug: 2873546

Change-Id: I94673913e66722ac70f3c49c51465122e98bf3d9
2010-08-24 17:50:55 -07:00
Makoto Onuki
c8502dd194 Highlight selected mailbox on mailbox list
* Use ListView's CHOICE_MODE_SINGLE mode to select list item.
* Added a view that implements Checkable to change background
  for selected item.

Change-Id: Id55999b3d024ad1852e2b8c6436cd22ef255cf95
2010-08-24 16:55:44 -07:00
Marc Blank
5fd986fca0 Fix problem w/ forwarding already loaded attachments
Bug: 2938562
Change-Id: I778623bf5ee56d25eab5a74d86e9f89206e7f348
2010-08-24 16:20:47 -07:00
Makoto Onuki
3299d4a0d9 Merge "Make isEasAccount always work." 2010-08-24 14:35:30 -07:00
Makoto Onuki
5247ab8cae Make isEasAccount always work.
isEasAccount now uses getProtocol(), so it works even if the hostauth
hasn't been restored yet.

Bug 2929896

Change-Id: Iee902c18ef59680d8a7d4622230489ec7946f38c
2010-08-24 14:27:10 -07:00
Makoto Onuki
5d1e32a7da Explicitly set theme to all activities.
The default theme change to Holo caused a crash in MessageCompose,
because Holo has actionbar, which MessageCompose doesn't expect at
this point.  Explicitly set theme to prevent crashes.

Bug 2945294.

Change-Id: Ic5f833690eeb1048e8c4c3ac7a42c2d454c61876
2010-08-24 14:23:50 -07:00
Marc Blank
bf37f67e6d Merge "Add utilities to retrieve Mailbox and Account from a message id" 2010-08-24 12:23:34 -07:00
Jean-Baptiste Queru
8bc85bde33 am d895ef1f: am 456208a6: merge -s ours from froyo-release so that upgrading to gingerbread is a git fast-forward
Merge commit 'd895ef1f9ccdd9d4c7011c56e844f73ddde688d1'

* commit 'd895ef1f9ccdd9d4c7011c56e844f73ddde688d1':
  Clear password related policies in PolicySet when p/w not required
  Release held mailboxes after policy refresh
  Handle inactivity timeout > maximum allowed properly
  Backport: Handle "Allow non-provisionable devices" properly
  Handle correction of rejected Ping heartbeat
  Explicitly verify certificate hostname on SSL connections
  Fix regression in Exchange calendar attendee response
2010-08-24 11:54:55 -07:00
Makoto Onuki
7fd307212f Restore list scroll position when necessary.
Bug 2769052.

Change-Id: I09b04311ad2a5bd0d41d37f78dddc500414323c1
2010-08-24 11:20:00 -07:00
Makoto Onuki
45f530ba55 Integrate Controller w/ AttachmentDownloadService
* Add ControllerService to Controller and call this from
  AttachmentDownloadService to handle attachment loading

(It's a redo of I3a6c2a40.  Submitting for mlbank, who had a trouble
with repo.)

Change-Id: I7c90761ec4e213d6dc331fc894c7b77e84ad43a6
2010-08-24 11:14:57 -07:00
Makoto Onuki
955aa5e26a Merge "Revert "Convert Controller to a full service"" 2010-08-24 11:14:51 -07:00
Makoto Onuki
bb822ca7cc Revert "Convert Controller to a full service"
This reverts commit 0e6d972641.

(It's a clean revert.  Submitting for mblank, who had troubles with
repo.)

Change-Id: I843169f5dc3aff528c249035b3413b56ca552923
2010-08-24 11:06:43 -07:00
Makoto Onuki
b913cd1fea Merge "Add shutdown() to providers." 2010-08-24 10:54:23 -07:00
Marc Blank
c184f36c2d Revert "Convert Controller to a full service"
This reverts commit 0e6d972641.

Change-Id: I005fc34152396806468edef919a3620961ddb4fe
2010-08-24 10:27:58 -07:00
Marc Blank
bca4e6e70b Add utilities to retrieve Mailbox and Account from a message id
Change-Id: Ice727f82b5c284617b831f19e2667078cd3da5dc
2010-08-24 09:24:21 -07:00
Marc Blank
2027b29d40 Change EAS request implementation to use LinkedBlockingQueue
* Make sure that requests added during sync() aren't missed

Change-Id: I20a7788f3695ef6a99642240230f0d004f034f44
2010-08-24 08:41:08 -07:00
Marc Blank
d055723958 Merge "Add moveMessage to the EmailService API" 2010-08-24 08:39:58 -07:00
Jean-Baptiste Queru
d895ef1f9c am 456208a6: merge -s ours from froyo-release so that upgrading to gingerbread is a git fast-forward
Merge commit '456208a6d9b0dddd6a00c77a28ce961cf92d47e7' into gingerbread-plus-aosp

* commit '456208a6d9b0dddd6a00c77a28ce961cf92d47e7':
  Clear password related policies in PolicySet when p/w not required
  Release held mailboxes after policy refresh
  Handle inactivity timeout > maximum allowed properly
  Backport: Handle "Allow non-provisionable devices" properly
  Handle correction of rejected Ping heartbeat
  Explicitly verify certificate hostname on SSL connections
  Fix regression in Exchange calendar attendee response
2010-08-23 23:36:41 -07:00
Marc Blank
64dcd7700e Add moveMessage to the EmailService API
Change-Id: Ia10f4a75b4c1288ec52dda8b925b9aee442b8e4a
2010-08-23 21:59:14 -07:00
Jean-Baptiste Queru
456208a6d9 merge -s ours from froyo-release so that upgrading to gingerbread is a git fast-forward
Change-Id: I9fcbbe3ac77b81576578ce4be87a51a8f198627f
2010-08-23 19:09:06 -07:00
Makoto Onuki
1abbc55a45 Merge "Temporarily disabling crashing test." 2010-08-23 12:39:09 -07:00
Makoto Onuki
d1a05e1cc3 Fix occasional fails of MailboxFinderTest.
Some of the tests run code on the UI thread but check the result
on the test thread, without synchronization, which is wrong.

Mark the fields volatile to fix it.

Change-Id: I917493f10fc9a15da57cfbc1e65e8d8e2cffd850
2010-08-23 12:38:23 -07:00
Makoto Onuki
6c36b4c613 Add shutdown() to providers.
They're needed for unit tests.
I was hoping this would solve some of the unit test issues, but it didn't look
like so.  But still they're nice to have.

Change-Id: Ibf6ae78055560d27aac5934d567a17084de99d84
2010-08-23 12:36:57 -07:00
Marc Blank
f19f9cf4d3 Simplify AttachmentDownloadService; add unit tests
* Changed our queue from a TreeMap to a TreeSet that uses an easily
  testable comparator
* Remove the ugly bit twiddling priority computation
* Test DownloadSet (the logic behind queue ordering, addition,
  removal, query, etc.)

Change-Id: Ia8427900b8f39a243a5407349775802d0a4fad4f
2010-08-23 11:42:40 -07:00
Makoto Onuki
567ed19f7b Follow up to I684ab2ed.
Catch RuntimeException so that it won't crash even with malformed URLs.

Change-Id: I58da906860ac30b5c9daf68bb672f19917ad0ece
2010-08-20 17:46:53 -07:00
Makoto Onuki
d755cdce13 Fix attaching from Gallery.
Fix the attachmentExists test, so that now it works with the content: URL.

Bug 2937846

Change-Id: I684ab2ed0e4fbe4784a165697084b868610bd274
2010-08-20 17:10:00 -07:00
Makoto Onuki
8852708238 Temporarily disabling crashing test.
The problem is that this test creates a partial account which will be
used by the activity, but the account is picked up by MailService too
(which is probably not intentional), which crashes because the account
is not properly constructed.  (empty address)

Bug 2938323

Change-Id: Ie9ba19ebf72431d086014c1dc191a0c71769dea4
2010-08-20 16:15:47 -07:00
Marc Blank
0e6d972641 Convert Controller to a full service
Change-Id: I2078fd047ff46f85936c8bf798a5edd3678bb5b4
2010-08-20 13:34:09 -07:00
Andrew Stadler
a14a24a5bc Add Add & Remove Account options to AccountSettingsXL
* Add account is a large (+) in the action bar
* Remove account is a new item at the bottom of the settings fragment
Note: Add account works, remove account just toasts for now.

Change-Id: I5b3b8ab8c7d328cb78d103c47b9eca866466f9df
2010-08-19 16:28:52 -07:00
Marc Blank
7894ee82b3 New attachment download support for Controller (IMAP/POP3)
* Supports download via AttachmentDownloadService

Change-Id: I66143a79b99dcdbd307524ba0b81227f09a00e4a
2010-08-19 15:44:44 -07:00
Marc Blank
09fd4d0a18 New asynchronous attachment loading code
* Create AttachmentDownloadService to manage all attachment downloads
  1) User requested
  2) Required for email forwarding
  3) Opportunistic downloads to enhance offline use
* New attachment related UI (pending UX approval, of course)
  1) MessageView (attachment actions, progress bar, etc.)
  2) MessageCompose (attachments for forwarded messages)
  3) Associated toasts, notifications, etc.

TODO:
* Unit tests
* Cache Management (separate CL)

Change-Id: I7864a5fb1c3f4f2be68d98341a971edc6cbacfe1
2010-08-19 14:01:08 -07:00
Eric Fischer
2f375d0c1f Merge "Import Romansh translations." 2010-08-19 12:01:05 -07:00
Makoto Onuki
d111cc70aa Add a debug parameter to Welcome to force 1-pane/2-pane
- Now Welcome takes an EXTRA_DEBUG_PANE_MODE to force the
  one-pane/two-pane mode.

Use this to open one-pane.
adb shell am start -a android.intent.action.MAIN \
  -n com.google.android.email/com.android.email.activity.Welcome \
  -e DEBUG_PANE_MODE 1

Use this to open two-pane.
adb shell am start -a android.intent.action.MAIN \
  -n com.google.android.email/com.android.email.activity.Welcome \
  -e DEBUG_PANE_MODE 2

Change-Id: I6e96f80f53f4488152935502c19d3dd8e0788150
2010-08-18 16:57:27 -07:00
Andrew Stadler
5122417625 Make AccountSettingsXL the main settings UI
* Connect to it from all call sites
* Remove 1-pane and 2-pane icons
* Leave a few more breadcrumbs for launching into specific account
* Update the long TODO list in AccountSettingsXL

Change-Id: I502eda9a622518e8d4a23d46989340ad400cdd34
2010-08-18 16:47:42 -07:00
Eric Fischer
c1ac3078f9 Import Romansh translations.
Change-Id: I506f625fc7a35d7af545306201d7db90330c1e1c
2010-08-18 16:26:08 -07:00
Makoto Onuki
5e06d1714d Fix crash when refreshing magic mailboxes.
bug 2929867

Change-Id: I95c4f4e31c1db2139c96b623f9b9c2df7916e5e1
2010-08-18 15:44:41 -07:00
Makoto Onuki
f52afae942 Make sure RefreshManager's callbacks are called on UI thread.
Fixed the bug where callbacks for sendPendingMessagesForAllAccounts
are called on a worker threaed.

Change-Id: I28f1424cf67e15abf37c09b68050d1385f9ac3ee
2010-08-18 14:49:46 -07:00
Makoto Onuki
e112bd7648 Merge "Show "Send outgoing mesasges" button in outbox." 2010-08-18 14:24:05 -07:00
Makoto Onuki
715a19be28 Show "Send outgoing mesasges" button in outbox.
It works for regular outboxes.  Unfortunately it doesn't for
Combined Outbox, due to a bug in RefreshManager, which I'll fix
in a separate CL.  (The fix might be rather large.)

Change-Id: Ib904e2c672801debe3dd64e4bb0a464564d098da
2010-08-18 14:23:09 -07:00
Marc Blank
d14229872a Fix NPE in MailService
Bug: 2873538
Change-Id: Ida9135d3c8090abb63424cc2b2cb1b848785d571
2010-08-18 13:17:21 -07:00
Marc Blank
25dd2081a5 Merge "Remove db access in MailboxAlarmReceiver" 2010-08-18 13:15:37 -07:00