Our original plan was to disable both authenticators by default, and enable
one of then on boot. However, it turned out existing exchange accounts will
be removed if there's no enabled authenticators for the account type.
So, instead, in this patch we initially enable only the default one, and switch
to the other one on boot if the vendor policy indicates so.
(If a device has a vendor policy apk, it should also have the email app
preloaded, so changing the label at boot time isn't too late.)
Bug: 2382710
* Begin wiring into system DevicePolicyManager requirements
* Semi-real implementations of isSupported() & isActive()
* Added new API (placeholder) updatePolicies()
* Updated existing unit tests as needed
Bug: 2387961
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
- 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
This removes the word "account" to eliminate the need for translation and to simplify
the use of overlays for vendors that need to customize these strings.
* 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
* 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
* Removed obsolete "delete after 7 days" option from pop-up prefs
* Mark deleted message sentinels as "read" so they don't contribute
to unread counts.
Bug # 2157487 and Bug # 2159278
Change-Id: Ic3cbc51d6f5ede2eb923e2d0e5c0dfee377764f5
* New menu items in MessageList
* Show/hide menu item if anything is checked
* Clear the selected items map, redraw listview, hide button panel
Bug # 2116257
BUG: 2149171
* Change the string of combined inbox
* Change the string of combined starred folder
* Change the icon for combined inbox
* Change the icon for combined starred folder
* Add "Accept all certificates" modes to incoming/outgoing secure choices
* Change URI scheme slightly to make "trust" a flag, not part of the
protocol.
* Change Stores to know about new URI scheme
* Slightly rework Transport API to make "trust" an independent flag
* Adapt HostAuth to handle new Uri scheme
* Remove the old ambiguous "optional" code, which was allowing
some unsigned certificates, but was *also* allowing TLS to
optionally start (though not SSL, despite the UI strings.)
* Add a few unit tests to EmailContent
* Add logging and a bunch of comments to TrustManagerFactory, and a bit
of simple cleanup to make it more readable.
* Add missing conversion of SSLException->CertificateValidationException
in TLS so we get the correct certificate errors from TLS too.
* Re-enable TLS for mac.com accounts (which had a certificate problem)
Fixes bug http://b/2119755, http://b/1374780, and probably a raft of
earlier and/or external bugs about certificate problems.
Change-Id: Iaf99a8da3eaadaa4cdeec224737838b5d6813e55
* Get rid of old Account.getxxxFolderName() calls.
* Clean up any call sites to them
* Properly rename the existing special folder name identifiers
* Use a hash table in MessagingController to improve identification
of special folders for IMAP accounts
* Fix a bug in Controller, which was creating new server-side folders
using localized names.
* Fix a bunch of code in Controller that was using mContext, instead of
using mProviderContext to support testability.
* Fix broken unit tests in ControllerProviderOpsTests
Fixes bug 1904373
* Improve appearance of basics screen and use simplified text
* Provide alternate text when in EAS account setup flow (from acct mgr)
* Change "Exchange/ActiveSync" button to "Exchange account"
* Add some spacing to the three buttons, to improve appearance
Bugs addressed:
2128055 Change string in account picker activity to Exchange
2132713 Welcome message for Email app is inappropriate when coming from
Settings -> Accounts & sync -> New account
* Prevent open access to sent or received messages
* Prevent open access to account info incl. passwords
* Allow access only to system apps
Bug # 2133080
* Don't use unneeded managed cursors
* Put more of the DB work in async
* Don't try to load HTML and plaintext simultaneously
* Explicitly catch & handle exceptions during db ops
Bug # 2087051 (see also bug # 2122960 re unexpected db exceptions)
Change-Id: I446086bc4f3a85b2e766b12d1f7271e61e3ae8d5
* Check for existing accounts with matching servername + username
* Show a dialog and block account creation
* Triggers in three cases:
* After input of an auto-setup account (e.g. Gmail or AOL)
* After input of manual setup (incoming) parameters
* After changing incoming parameters of *any* existing account
* Made some notes in EmailContent regarding fields in HostAuth that we
are not actually using.
* Added HostAuth unit tests
Primarily fixes bug # 1964449
Bonus fix for bug # 1594408
Change-Id: I49310faf6654280582e0ab3d3e40f2701bfcd21d
* Fixes 2048663, 2025029, and 2100131
* Add "Trust Certificates" checkbox in EAS account creation
* Use custom ClientConnectionManager for HttpClient with registry
for plain, ssl, and tssl (trusted ssl) connection
* Use a ConnectionPool for HttpClient connections
* Remove "Domain" checkbox in EAS account creation
* Remove tests related to the "Domain" field
* TODO Write a test for valid usernames (requires a bit of research)
<name>, <email address>, <domain>/<name, and <domain>\<name> are all
valid, but there might be others
Change-Id: I4a0338df5960bfd3d679a88aaf22d1c49f49992b
* Don't create our EmailProvider Account until we get a confirmation from
AccountManager that the system Account is created
* Put up an erorr dialog if AccountManager fails for some reason (this is
what we saw in bug #2072668)
BUG: 1904403
* Change the text of READ/UNREAD button dynamically according to the state of selection
* Change the text of favorite button dynamically according to the state of selection
* Final list of options while normal mailbox is shown
* New list of options while smart folder is shown
* Correct lists of context options for drafts, outbox, trash, and
everywhere else (full list)
* Enable reply, reply all, and forward
TODO: needs a better icon for menu->folders
Resolves bug 1904421 items 4a, 4b, 5a
Resolves bug 2078092
* Create a new entry point for the exchange setup flow and switch
EASAuthenticatorService to call it
* Pass "eas flow mode" down through the setup screens
* Slightly modify their behavior as we go (e.g. we skip the
(account type" screen since we know it's EAS.)
* Add a checkbox to "sync contacts from this account" and pass that
value into ExchangeStore when we set up the account.
* Change the flow exit to pop back to the account manager instead of
taking the user to the new inbox.
This CL satisfies cases 1 & 2 of bug # 1974752.
* When we get a network connect broadcast, clear error states so sync can
restart for any boxes in an error state
* Add temporary notification code for the testers
* Add file-based debug logger
* Add Exchange logging to debug screen (adds additional exchange debugging)
* Add Exchange sd card logging to debug screen (logs to sd card)
* Change setLogging service API to send an int rather than a boolean
* Make sure push mailboxes are set up again when account changes to push
* Make sure push mailboxes are set up again when account mailbox starts
* (Fixed contacts sync bug found during debugging these changes)
* First try reloading the folder list; this can sometimes work
* Otherwise, change push to 5 minute sync
* Send notification if we switch to 5 minute sync so there are no surprises
* Added syncStatus column to EmailProvider (can be used for any purpose)
* Use syncStatus to keep track of sync type, result type, and change count;
detect ping loop as consecutive ping's with no changes
* Remove InteractiveSyncService (no longer needed)
* Remove all use of Strings in favor of the parser's static final int's
* Strings remain in Tags for debugging output only
* Renamed lots of classes to be more consistent
* Centralized logging behavior in Eas class
* Found and fixed some bugs in the process:
- Account deletion wasn't removing HostAuth's correctly in the trigger
- Adding a second EAS account was trashing the first one
- Fixed looping sync behavior caused by Exchange 2003 bug
* Moved welcome message into account setup basics (name/pass)
* Reworked Welcome to go to AccountSetupBasics on count=0
* In AccountFolderList, removed old welcome message code, and add
code to launch AccountSetupBasics when last account is deleted
* Fixed shortcut picker so launcher shortcuts work again
* Reimplemented shortcut receiver (in MessageList now)
* Default EAS accounts to SSL
Addresses bug 1916583 & 1987440
* Wrap group cursor in a MergeCursor to insert 1st row
* Clean up a few loose ends (e.g. no longpress on summary row)
* Implement the summaries child cursor
* Add special queries to MessageList for Inbox, Unread, Favorites
There are *a lot* of TODO's in this checkin; I just wanted to get some
basic UI up and running so we could start to explore issues created by
the new configuration. A lightweight sampling:
* Aggregrate filters (e.g. all inboxes) need to be handled in the
provider, instead of with the current two-query hack.
* We'll need a lot of UI cleanup, e.g. different contextual menus
* We'll need to generalize some of the code in order to more easily
support repeating the same compound queries - e.g. MessageView actually
needs the same query in order to enable the next/prev buttons.
* Toggle small pane with multi-select action buttons
* Implement multi-read/unread
* Implement multi-favorites (stars)
* Implement multi-delete
TODO: menu items when there are selected items