Commit Graph

377 Commits

Author SHA1 Message Date
Makoto Onuki 91237e9dcb Adding script for building Email app without exchange.
remove-exchange-support.sh makes it possible to build the email app without
exchange support.

This script:
- removes all packages under com.android.exchange.
- removes all lines surrounded by EXCHANGE-REMOVE-SECTION-START and
  EXCHANGE-REMOVE-SECTION-END

And the resulting source should still build and run fine.

Bug: 2369784
2010-02-03 11:39:46 -08:00
Andrew Stadler 8bb0ee3b92 Fix auto-discover / account verification logic
New behavior:
 * There are two primary paths through this activity:
 *   Edit existing:
 *     Load existing values from account into fields
 *     When user clicks 'next':
 *       Confirm not a duplicate account
 *       Try new values (check settings)
 *       If new values are OK:
 *         Write new values (save to provider)
 *         finish() (pop to previous)
 *
 *   Creating New:
 *     Try Auto-discover to get details from server
 *     If Auto-discover reports an authentication failure:
 *       finish() (pop to previous, to re-enter username & password)
 *     If Auto-discover succeeds:
 *       write server's account details into account
 *     Load values from account into fields
 *     Confirm not a duplicate account
 *     Try new values (check settings)
 *     If new values are OK:
 *       Write new values (save to provider)
 *       Proceed to options screen
 *       finish() (removes self from back stack)
* Added unit test for new loadFields method

Bug: 2412300
2010-02-03 10:38:27 -08:00
Makoto Onuki 9fe51f6329 Gather common exchange related methods into one place
So that it'll be easier to remove exchange dependency.
2010-02-02 13:36:45 -08:00
Makoto Onuki 049509d10e Merge "Move Eas.ACCOUNT_MANAGER_TYPE out of the package." 2010-02-02 13:34:04 -08:00
Andrew Stadler ecb1af8041 Finish up IMAP ID implementation
* scrub all external strings to keep them compliant for IMAP protocol
* move Build.MODEL to x-android-device-model
* send x-android-mobile-net-operator
* send AGUID
* unit tests for above
* retrieve providers from VendorPolicyLoader

Bug: 2332183
2010-02-01 15:53:46 -08:00
Makoto Onuki faed6178b1 Move Eas.ACCOUNT_MANAGER_TYPE out of the package.
Moved Eas.ACCOUNT_MANAGER_TYPE to Email.EXCHANGE_ACCOUNT_MANAGER_TYPE.

This constant is not related to the exchange protocol, and referred in
a lot of different places.  Moving it out of the package will make it a lot
simpler when removing exchange dependency.
2010-02-01 15:38:15 -08:00
Makoto Onuki e5c3c98e9a Fix confusing setup screen title.
Change the title of the screen for adding an exchange account from "Set up email" to "Add an Exchange account".

Bug: 2159019
2010-02-01 14:24:38 -08:00
Makoto Onuki e853286713 Merge "Move non-exchange specific classes to com.android.email.service." 2010-01-29 16:22:23 -08:00
Makoto Onuki 8ee17c7012 Unifying dupe code in Debug.java and Email.java. 2010-01-29 15:44:56 -08:00
Makoto Onuki bb9b5163c1 Move non-exchange specific classes to com.android.email.service. 2010-01-29 10:37:39 -08:00
Marc Blank f3fcb8929e Implement Exchange calendar sync support
What should be working:
* Events sync down from server and appear in calendar
* Recurrences and exceptions appear in calendar
* Changed events on server should be reflected in calendar
* Deletions on server should be reflected in calendar
* Push of new/changed/deleted events should work
* Changes on device are NOT synced back to server
* New, single events on device are synced back to server
  (no time zone, attendee, or recurrence support)
* Checkbox for syncing calendar added to setup flow
* System sync glue in manifest, etc.
* Bugs are to be expected
* A few unit tests; needs more

Change-Id: I7ca262eaba562ccb9d1af5b0cd948c6bac30e5dd
2010-01-28 09:18:48 -08:00
Mihai Preda b4e7a85eaa Merge "MessageCompose: properly remove quoted text from saved draft." 2010-01-28 03:48:20 -08:00
Makoto Onuki f613489663 Add "vendor policy" loader, and alternate exchange descriptive text.
- Dynamically switch to the alternate exchange strings to substitute overlays.
- Added the mechanism to load the "vendor policy", which tells you when the
  alternate strings should be used.

Bug: 2382710
2010-01-27 17:40:56 -08:00
Marc Blank 46199c65a3 Fix #2382368 (NPE in AccountSetupExchangeTests)
* AccountSetupExchange defaultly tries using EAS AutoDiscover, which isn't
  appropriate in the unit test setting
* Add an Intent extra to disable AutoDiscover and use it in unit tests

Bug: 2382368
Change-Id: I3d4e8d7194b02da44ad583da0cf2fe60ffb19311
2010-01-27 13:57:20 -08:00
Marc Blank 5de54008e5 Handle Exchange meeting invitation responses
* Includes some refactoring of internal "request" code in SyncManager
* Adds Message flags to tag meeting invites and cancellations
* Adds meetingResponse method in EmailService
* Hooks into Controller and MessageView UI included

Change-Id: I4c5e10bccc4b41956b94d9dfa55925e5af030939
2010-01-26 09:08:52 -08:00
Mihai Preda e3e65ed919 MessageCompose: properly remove quoted text from saved draft.
Bug 2363249.
2010-01-26 17:19:49 +01:00
Mihai Preda f9623b9e78 MessageCompose: show account name in title.
Bug 2338152.
2010-01-21 14:47:18 +01:00
Andrew Stadler d612717340 Backup/Restore accounts - bugfix
* Followup to 5e91cccd
* Workaround for (HTC bug: 2275383) & (Moto bug: 2226582)
* Restores mSyncKey as null instead of empty string, which is how
  a new account is initialized.  Bug: 2385980
* Cleanup synchronized logic in backup & restore
* Minor cleanups & improved comments
2010-01-20 16:52:12 -08:00
Andrew Stadler 5e91cccd4b Quick backup/restore of accounts
* Workaround for (HTC bug 2275383) & (Moto bug 2226582)
* Adds checkpoints for backing up and restoring accounts
* Uses legacy Account / prefs to back up accounts - this is because
  some of this code will be reused for legacy account migration
* Unit tests of Account & LegacyConversions
* Unit tests of backup & restore
* Not done:  testing of EAS/Account Manager interface (this will require
  deeper dependency injection, to avoid the embedded calls to the Account
  Manager and other system services.)
2010-01-20 01:36:01 -08:00
Satoshi Kataoka 950f6c65dd Merge "Fix bugs rerated to updateMailboxRefreshTime" 2010-01-19 14:42:26 -08:00
Marc Blank 0b8b68cbeb Fix account creation race condition
* Due to the order in which account creation occurs in the Provider
  and in AccountManager, and the fact that there are data observers
  on each that initiate account reconciliation, a race condition exists
  that can cause either of these accounts to appear to be orphaned,
  and thereby get deleted
* We add an "incomplete" flag to the Account in EmailProvider and
  set/clear it during account creation.  The various reconciliation
  methods will ignore accounts marked as incomplete.

Bug: 2353755
Change-Id: I13fb144dd857f839eb3471b01f271f3a0d4d8159
2010-01-19 13:07:49 -08:00
Marc Blank 74724af62c Fix autodiscover when attempted with Exchange 2003 server
* Make sure 403 error in autodiscover isn't treated as an auth error
  (401 is used for that)
* Make non-auth errors in autodiscover fail silently (and move user
  to manual setup)

Bug: 2374302
Change-Id: I4699bff70cf5ec4a513e6443e4817543c2ab2cef
2010-01-15 15:36:34 -08:00
satok 0f4efcd483 Fix bugs rerated to updateMailboxRefreshTime
BUG: 2131243

- change the parameter updateMailboxRefreshTime in MailboxList
- add updateMailboxRefreshTime to MailboxList
2010-01-16 04:36:11 +09:00
Marc Blank 17da1767e3 Implement Autodiscover for Exchange servers
* Autodiscover allows complete configuration using only email address
  and password
* Code handles the two standard autodiscover addresses and redirect
* Autodiscover process starts when the user chooses "Exchange" as the
  account type.  If the account is created via the AccountManager,
  autodiscover begins upon tapping "Next" for the first time
* If autodiscover fails due to anything other than auth failure for
  autodiscover-capable servers, the user is placed into the standard manual
  configuration screen

Bug: 2366019
Change-Id: I936712b924833d9a133e8da04e11c3ba45d92f92
2010-01-13 17:11:49 -08:00
Makoto Onuki f39e5f38eb Unbundling: Get rid of the reference to the hidden field.
Remove the reference to CursorAdapter.mDataValid.
2010-01-04 17:13:09 -08:00
Marc Blank 86919853f7 am e83d0d64: am bb12286f: Merge change Ie25ac73d into eclair-mr2
Merge commit 'e83d0d640e9964500097571d9dea4993e5609123'

* commit 'e83d0d640e9964500097571d9dea4993e5609123':
  Fix "back key" flow for Email account setup
2009-12-22 11:25:58 -08:00
Android (Google) Code Review bb12286f28 Merge change Ie25ac73d into eclair-mr2
* changes:
  Fix "back key" flow for Email account setup
2009-12-22 11:21:15 -08:00
Mihai Preda 0de7377985 am 78f609db: am af1bf487: MessageView: upon delete move to older instead of newer.
Merge commit '78f609db56500c01f75ea2d8742468907255f7ba'

* commit '78f609db56500c01f75ea2d8742468907255f7ba':
  MessageView: upon delete move to older instead of newer.
2009-12-22 10:15:58 -08:00
Mihai Preda 1e1bb40062 am 9d024a5b: am 2b6dfc97: Merge change I55f52567 into eclair-mr2
Merge commit '9d024a5b4f42d9d7687d06e5f86f9c68f22fccf8'

* commit '9d024a5b4f42d9d7687d06e5f86f9c68f22fccf8':
  MessageCompose: fix NPE cased by WebView set to null in onDestroy().
2009-12-22 10:15:53 -08:00
Mihai Preda af1bf48773 MessageView: upon delete move to older instead of newer.
Bug 2233586
2009-12-22 15:16:14 +01:00
Makoto Onuki ec82f9d7c0 email unbundling: get rid of the write access to the CursorAdapter.mDataValid.
MessageListAdapter.doRequery() is supporsed to do the same thing as CursorAdapter.onContentChanged() does.  So the entire method body can be replaced with super.onContentChanged().
2009-12-21 15:30:42 -08:00
Marc Blank f1efd65a5e Fix "back key" flow for Email account setup
* The existing flow is badly broken; every "back" causes the user
  to leave the setup flow and therefore have to start from scratch.
  This is a very bad user experience, as previously entered data is
  lost and must be re-entered.
* The fix corrects these problems, allowing the user to back up
  through screens UNTIL the account is successfully created.
* After account creation, the user is returned to the proper screen,
  depending on whether we're in "eas flow mode" or not

Bug: 2337511
Change-Id: Ie25ac73dfcd8a1dca36e1b31c75ffb22359840d1
2009-12-21 11:28:53 -08:00
Makoto Onuki 425fd30a9c Email unbundling: Use accessor for CursorAdapter.mCursor and ListActivity.getListView().
Also added a todo for ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS.
2009-12-18 13:26:04 -08:00
Mihai Preda 55f5256761 MessageCompose: fix NPE cased by WebView set to null in onDestroy().
Bug 2329276.
2009-12-16 18:12:34 +01:00
satok 9151d86e68 Check null pointer in MessageList
BUG: 2299971
2009-12-16 16:26:20 +09:00
satok 3d00377b35 Fix MessageListUnitTests
This is supperement of change,33265

* Move custom cursor to inner static class
* Change public to /* package */
* Move PROJECTION to a package
2009-12-08 13:36:32 +09:00
satok 4cb25d93a2 Save the state of checkboxes when orientation is changed
BUG: 2239516

* Add tests for save/restore Instance State
2009-12-01 15:41:10 +09:00
Marc Blank 6ba40085d7 am 863e6c40: Handle "send outgoing messages" properly for combined Outbox
Merge commit '863e6c40202fe804d92a263809da74ec1e904e66' into eclair-mr2

* commit '863e6c40202fe804d92a263809da74ec1e904e66':
  Handle "send outgoing messages" properly for combined Outbox
2009-11-20 09:56:03 -08:00
Marc Blank 863e6c4020 Handle "send outgoing messages" properly for combined Outbox
* The "send outgoing messages" button doesn't work in the combined
  inbox (the case wasn't handled)
* Add code to loop through accounts, calling the Controller for each
  in this case
* Fixes (partially or completely) #2274389

Change-Id: I94e984247d43f93a4d6546b8c10f6ce149b091be
2009-11-20 09:46:35 -08:00
Dan Egnor 2da2e4632d Change android.text.util.Regex to com.android.common.Patterns 2009-11-18 12:11:55 -08:00
Marc Blank 83b67e6198 Fix #2251837; better response w/ security req'd. DO NOT MERGE
* Currently, we validate EAS accounts using a command that will
  succeed even if we do not support required security policies.
* This causes a confusing "invalid username or password" error
  when trying to sync with a validated account in the case that
  there are, in fact, required policies
* The fix is to send a sync command after validating the user name
  and password; a 403 error indicates the requirement for
  security policies.
* When we see the 403 error, we put up a message that is appropriate
  to the situation.

Change-Id: I74e132cb81f021cbb697cc9ee146405bf3ebc0ba
2009-11-11 14:40:35 -08:00
Marc Blank 29935abb1c Fix #2251837; better response when provisioning is required.
* Currently, we validate EAS accounts using a command that will
  succeed even if we do not support required security policies.
* This causes a confusing "invalid username or password" error
  when trying to sync with a validated account in the case that
  there are, in fact, required policies
* The fix is to send a sync command after validating the user name
  and password; a 403 error indicates the requirement for
  security policies.
* When we see the 403 error, we put up a message that is appropriate
  to the situation.

Change-Id: Ic40820253dca1f357297b2355ad987bc39d0775f
2009-11-10 16:29:10 -08:00
Mihai Preda 6bb7c7248a MessageView: disable reply&forward for Trash messages.
Bug 2170118
2009-10-29 14:11:10 +01:00
satok 3045bb967f Add view of all counts in AccountFolderList
BUG: 2201097
2009-10-21 07:19:10 +09:00
satok 4bc81bb286 Fix build breakage 2009-10-20 04:19:21 +09:00
satok fa368b50d6 Clean up appearance of unread counters
BUG: 2161746
2009-10-20 03:18:27 +09:00
Mihai Preda 3afd66cda8 MessageCompose: disable "save as draft" button logic.
Bug 2184404
Disable "save as draft" button when there are no changes to be saved.
2009-10-15 12:09:38 +02:00
satok 347a44af56 Fix the bug that the count of draft and trash icons are wrong.
BUG: 2159565

* Currently only the number of unread messages is shown.
* Fixed to show the number of all messages
2009-10-15 10:01:13 +09:00
Andrew Stadler b7c67a0124 am 754240bc: Fix race condition in testMultiple()
Merge commit '754240bcf3ccc8492a50ba9ee8056b34f6e4e8d0' into eclair-mr2

* commit '754240bcf3ccc8492a50ba9ee8056b34f6e4e8d0':
  Fix race condition in testMultiple()
2009-10-13 12:43:20 -07:00
Andrew Stadler 754240bcf3 Fix race condition in testMultiple()
* If we close the activity while a requeryList() is pending in the
  handler queue, we'll eventually try to operate on a closed cursor
  when we get to testMultiple().
* The fix: Return immediately if the cursor is not available.

Fixes bug http://b/2180416
Followup for bug http://b/2149083
2009-10-13 12:02:46 -07:00