Commit Graph

52 Commits

Author SHA1 Message Date
Jorge Ruesga 08ace26ed6 email: imap push
Change-Id: I8a184a5644e4322ee65d969e14cd47fe119f5df2
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-10-18 14:05:32 -07:00
Martin Hibdon 123d40283e Make sure to close a cursor
b/17570154

Change-Id: I759a116a14784e92e7fa7eb51755ceda3860550e
2014-09-24 11:30:52 -07:00
Régis Décamps c3404cca71 Better documentation for "Account display name".
Give examples of what the display name is.

Change-Id: I2934dc9e8b95d0b32b9c1e9fab391d7ba9e997da
2014-07-10 19:54:02 +02:00
Tony Mantler 06415a635f Unify settings activity
b/9566150

- Install PublicPreferenceActivity
- Create AccountServerSettingsActivity to contain all the crazy
    logic we don't want in AccountSettings
- Add restoreAccountWithAddress to Account
- Refactor almost everything out of AccountSettings
- Tidy the QuickResponse fragment
- Majorly refactor the AccountSettingsFragment to decouple it from
    the activity, and make it save settings immediately instead of
    when pausing
- Move login warning dialog to AccountSettingsFragment
- Tweak HeadlessAccountSettingsLoader

Change-Id: Ie69181d968b9c3e5940cfef9690b1f5c70e21aa8
2014-06-27 10:49:18 -07:00
Tony Mantler 51af59fc66 Remove unused preferences and dead code
Change-Id: Ica8bd735a91417ed44bd547ab7176832745d729e
2014-06-10 11:29:17 -07:00
James Lemieux 97fb20697c Merge "Unit Tests for serialization of Account and HostAuth objects" into ub-mail-master 2014-06-09 23:33:17 +00:00
James Lemieux 9250f47872 Unit Tests for serialization of Account and HostAuth objects
b/14998528

These are particularly important since they are stored in JSON form within the
Account Manager, so maintaining backward compatibility when future changes are
introduced is crucial.

Change-Id: I51333a364726a4c7e2fe88ee888e8c4cc11d962f
2014-06-09 16:18:27 -07:00
Tony Mantler 524e0a5fbc am 73101f3a: Fix OAuth when changing credentials from settings
* commit '73101f3a7bc1e735199a7c2c18358e9db9af0bca':
  Fix OAuth when changing credentials from settings
2014-06-09 22:50:37 +00:00
Tony Mantler 73101f3a7b Fix OAuth when changing credentials from settings
b/15521401

Change-Id: I7909389943c8e3eefbef0699f1c7c9c338282ca5
(cherry picked from commit 994c282d80)
2014-06-09 22:45:45 +00:00
Tony Mantler 994c282d80 Fix OAuth when changing credentials from settings
b/15521401

Change-Id: I7909389943c8e3eefbef0699f1c7c9c338282ca5
2014-06-09 15:28:11 -07:00
Tony Mantler 82a207132b Move account backup/restore to userdata in AccountManager
Change-Id: Iea9f2a1b1f2d87e07d63cbb1df5a0d6355ea4031
2014-05-14 15:15:49 -07:00
Tony Mantler 8518665a04 Fix projection columns, begin removing another unused field
Change-Id: I89126dba47ed6e78c870d458c4f286a37f763a66
2014-05-13 15:41:39 -07:00
Tony Mantler 2f97a7c658 Clean up unused code and warnings in Account
Change-Id: I40475eb6c8afa6b7b28fd143b9ad4fd268ff4657
2014-05-13 10:46:30 -07:00
Tony Mantler 3dd85723a1 Cleanup in EmailContent
Change-Id: Ifa251eb206779f59ea003f99395d454c7e407bc2
2014-04-14 12:54:39 -07:00
Anthony Lee eba80c114e b/9564335. Add support for a maxAttachmentSize column in the Account
table and connect the data to the Settings object in the existing
location (SettingsColumns.MAX_ATTACHMENT_SIZE).

Change-Id: Iaf48995757511e1dfb65aa35ff6d81bbc47187bd

Conflicts:
	src/com/android/email/provider/DBHelper.java
2014-03-19 17:33:29 -07:00
Tony Mantler 0f8d16f56a Fix content observing
b/12834957

Change-Id: I00e2fc48e1d78665e0cdcfc3f4fb483f5a047252
2014-02-05 16:58:54 -08:00
Tony Mantler 062f27fa37 Clean up AccountSettingsFragment loading
Also extend EmailContent to allow registering a ContentObserver

b/12816752

Change-Id: Ida873ac10101af92c627858d1d86c3a5ccd4ab26
2014-01-30 14:05:20 -08:00
Martin Hibdon e8eb6e659b Make OAuth work
Now you can authenticate your account using oauth
for google hosted accounts (e.g. google.com, gmail.com)
The setup ui is still not up to spec.

Change-Id: Ib2826653550a823b4d1b8739c1e483746cccbc22
2014-01-03 14:05:46 -08:00
Martin Hibdon 05723aa0f6 Don't put Credentials in HostAuth parcels
The problem is that exchange isn't compiled with this
change, so HostAuth parcels to or from exchange fail.
Ultimately, we'll need to probably create a HostAuth2
object or something along those lines. For now, just
change the format of HostAuth parcels back, so they
stay compatible with exchange, I'll figure out a real
solution later.

Change-Id: I9c8c8639b7b474fe82dfdc37a9e51a0451820105
2013-12-10 17:12:00 -08:00
Martin Hibdon 0b25179dab Allow database to hold oauth credentials
Change-Id: I127297fd78c7676995f1dcfa59fbbcafe4e72e8e
2013-12-09 16:18:28 -08:00
Tony Mantler 840408c41c Remove mAmAccount from the email provider account object
b/11070468

Change-Id: I51bad4be41800e4cd6dae42744005ade784cdf82
2013-10-04 10:21:25 -07:00
Scott Kennedy 0a710bde68 Fix notification preference migration
These settings need to be migrated from the database, not the
SharedPreferences file that likely shouldn't even exist.

Everything added to Account.java was removed in
Ie6ec389b5b5d2e7ab1b299d0877811ae716526e2
when it was believed to be unnecessary.

Bug: 10211615
Change-Id: If6193758febda8a3272d82792492503549a44e32
2013-08-26 14:19:54 -07:00
Martin Hibdon 52135c6e87 Add PingDuration to the Account table
b/10328857
this is so that we can keep the current ping
duration and restore it on startup.

Change-Id: I7ae11fd21687cb9013222924934154c5ebe1f7e7
2013-08-21 17:00:55 -07:00
Tony Mantler 6d24534804 Continue rewriting QuickResponse support
Change-Id: I95530e84d91f4becb3de5280af83ce546e1ed093
2013-08-12 11:40:16 -07:00
Scott Kennedy 229c070b0b Change the concept of a default account
The user no longer has control over this. Now, the "default" account
(which is only used for prepopulating the name of new accounts is
either the last used account (to be defined), or the first account in
the database.

This removes a setting, and simplifies a lot of code.

We may also want to auto-select the default account when entering the
compose screen from the combined view, but we do not currently have
an easy way to do that.

Bug: 7442992
Change-Id: Iff5bb36d8cbd327334211b670fa4851cbda6b9a0
2013-06-27 10:22:22 -07:00
Scott Kennedy 1b8e0fa23f Clean up a bunch of warnings
Bug: 9565838
Change-Id: I5e95562bbf463f057cbcc4a9884427a774473b45
2013-06-25 15:34:32 -07:00
Yu Ping Hu 503cc0630d Stop using ContentCache and related caches.
Bug: 8655671
Change-Id: I349ce464b5d752b3ac687852dbce4f0b57e04c67
2013-04-19 11:09:15 -07:00
Paul Westbrook 156163cceb Prevent NPE
cherry-pick of https://android-review.googlesource.com/#/c/45703/

Change-Id: I8d6984d90365d6bc3e9f102285a06ac9c32a98d4
2013-04-05 12:00:29 -07:00
Yu Ping Hu 8e2c4056ca Clean up dead code. Should be a no-op for functionality.
Also includes a fix for saving a draft that's already
been saved (used to create a new one).

The following were unused:
- accountIdAddToField
- mailboxIdAddToField
- uisendmail
- uisavedraft
- uiupdatedraft
- uisenddraft

Deleting those also allows us to remove the translation
from the Bundle used by calls to the ContentValues used by
update (since the update paths are now gone).

Change-Id: I87f2875e3272177a128a8ff65541e51b1f2d05fc
2013-03-14 14:40:39 -07:00
Scott Kennedy b34608228f Move notifications to UnifiedEmail
This involves redoing the persistence model, to split general,
account, and folder settings into separate SharedPreference stores.

It also requires some preferences to be moved into UnifiedEmail.

Depends on Ibe2e3f93ec164370535ffc5f5b2409544cc8d36d (UnifiedEmail)

Change-Id: Ie6ec389b5b5d2e7ab1b299d0877811ae716526e2
2013-02-08 09:48:22 -08:00
Scott Kennedy f9997921cb Change Email vibrate setting from tri-state to checkbox
Migrate the old value as necessary.
Update the unit tests.

Cherry-picked from I1c276ffde3496cbc66846ed4a007088d39f20382 with
minor changes.

Bug: 7624838
Change-Id: I1b3fa331b62f556701bacba5ce9cd64305d9b52a
2012-11-29 12:16:33 -08:00
Marc Blank 2616405471 Improve trash folder picker upon account creation
* Use setup intent uri
* TODO: More cleanup

Bug: 7077441

Change-Id: Ieab5b0ed33b73b7a0e9012aedd6becf867db1566
2012-09-06 16:01:45 -07:00
Marc Blank e714bb9d15 Convert authorities, intents, and account manager types
* Tested ok on wiped Nexus
* Tested ok on S3
* Upgrade verified on Nexus

Change-Id: If5d4ce594f8a309cdb59589d10b1d33f3b79326c
2012-08-31 23:26:36 -07:00
Marc Blank f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -07:00
Marc Blank 03cd72805d Revert to old Email app
* These are the last sources in the ICS-MR1 tree

Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
2012-04-25 13:58:23 -07:00
Marc Blank ebb79619e8 Move account delete logic to EmailProvider
* This functionality had to move away from Controller

Change-Id: I557918a325eab8c83a9728fa1ce33dde8b86158f
2012-03-09 12:59:21 -08:00
Marc Blank bf5caf97c5 Notify by mailbox, rather than account
* Update EmailProvider, removing two no-longer-used columns in Account and
  Mailbox

Change-Id: Ie0f10eb0ca315d73e82be968f7760a51a239ba3f
2012-02-24 14:51:59 -08:00
Marc Blank fd81e19779 Don't save Policy with Account
Change-Id: Ib3601daee8780640a07db573f623e99279c9f9b1
2011-11-21 13:04:26 -08:00
Marc Blank 4317ff162e am dea198bb: Add utility to determine if account can\'t auto-sync due to roaming
* commit 'dea198bb041754745c3b1522671fd31a79c7168c':
  Add utility to determine if account can't auto-sync due to roaming
2011-11-02 19:00:58 +00:00
Mindy Pereira af9e4ef82e am ddcb0db4: Merge "Revert "Add utility to determine if account can\'t auto-sync due to roaming"" into ics-mr1
* commit 'ddcb0db429df71356360b2224b56b01b7051c34c':
  Revert "Add utility to determine if account can't auto-sync due to roaming"
2011-11-02 17:50:05 +00:00
Marc Blank 6638627595 am 483f4927: Merge "Add utility to determine if account can\'t auto-sync due to roaming" into ics-mr1
* commit '483f49274e0aed3d4158ac6c2ba9fd693acb2809':
  Add utility to determine if account can't auto-sync due to roaming
2011-11-02 17:31:48 +00:00
Marc Blank dea198bb04 Add utility to determine if account can't auto-sync due to roaming
* We need to call this out to the user (a surprised user is an
  unhappy user)
* Required for fix to bug referenced below

Bug: 5533550
Change-Id: I64a870a703de7e02ce882aefc3636a1668021eb8
2011-11-02 08:59:36 -07:00
Mindy Pereira ea4adf0c6b Revert "Add utility to determine if account can't auto-sync due to roaming"
This reverts commit 95abeed64a
2011-11-01 17:17:06 -07:00
Marc Blank 95abeed64a Add utility to determine if account can't auto-sync due to roaming
* We need to call this out to the user (a surprised user is an
  unhappy user)
* Required for fix to bug referenced below

Bug: 5533550
Change-Id: I7da337057b9b28300ddd485283920e12c1ae53da
2011-11-01 14:11:43 -07:00
Marc Blank 2736c1a11c Rewrite of security policy handling and service code
* Remove PolicyService APIs policiesRequired, policiesUpdated,
  isSupported, clearUnsupportedPolicies, and isActiveAdmin
* Add PolicyService API setAccountPolicy, which is the sole
  method by which security policies are promulgated
* Add protocolPoliciesEnabled and protocolPoliciesUnsupported
  to the Policy class; these are packed, localized strings
  indicating policies that the protocol itself have enabled
  and/or cannot support (i.e. these are policies that are
  unknown to the DPM, e.g. don't load attachments)
* Differentiate in security notifications between three kinds
  of policy changes - changes that don't require user
  intervention (e.g. reducing requirements), changes that
  require user intervention (the legacy notification), and
  changes that make the account unsyncable (e.g. the server
  adding an unsupportable policy). Handle all possible policy
  changes cleanly.
* Make security notifications per account (with multiple
  accounts, notifications would get arbitrarily munged)
* Expose ALL enforced policies via the account settings
  screen in two categories: policies enforced (including
  both policies enforced by the DPM and policies enforced
  by the protocol) and policies unsupported (note that these
  can only be seen if policies are changed after an account
  is created; we do not allow the creation of an account
  when any required policies are unsupported).  Add a
  button that forces a sync attempt, for accounts that
  are locked out, but whose policies have changed on
  the server (this would otherwise require a reboot).
* Updated unit tests

Bug: 5398682
Bug: 5393724
Bug: 5379682
Change-Id: I4a3df823913a809874ed959d228177f0fc799281
2011-10-25 10:32:34 -07:00
Ben Komalo 81a153463b Remove "Move" action on POP.
Bug: 5010614
Change-Id: If0a94840e9dc104566ba39d2e3240883dab5bba0
2011-07-20 13:21:06 -07:00
Marc Blank aca9426581 Remove NotificationService; use Account columns for data storage
Bug: 5023662
Change-Id: I84df3b474dd6320327851003af985144cc16348e
2011-07-19 18:19:59 -07:00
Ben Komalo 4de538be2d Prevent account flip flopping from compose
There were two issues:
- the default account ID from the provider wasn't consistent: it was
using a snapshot from the cached data but that simply returns a Map, and
the values aren't guaranteed to be sorted (and indeed I saw that the
order was different on consecutive calls!)
- hitting app up from Compose always just kicked you out to the inbox
for the default account, but it probably should have used the account of
the compose screen, since it can be specified in the Intent

Bug: 5012008
Change-Id: Ic9a753b261e047790453bc1a9417bc0c6d2f87f9
2011-07-13 14:46:50 -07:00
Ben Komalo 025d29fd4b Fix some missed account setup flags.
There were two places where account flags were being set on setup: one
was in manual setup when the user selected the account type
(pop/imap/eas), and another was when it was automatically determined
from XML. The two paths were inconsistent and one was setting bits like
SUPPORTS_SEARCH but the other wasn't.

This fixes being able to search in IMAP

Bug: 5011932
Change-Id: I50eada7485aaef4e2a85d25fa7eb9ac7ab03093a
2011-07-10 18:26:15 -07:00
Marc Blank 6e418aa41a Improve EmailContent caching...
* Guarantee that up to 16 Account (with HostAuths), and Policy rows
  are always cached.  Also, 6 commonly used Mailboxes per Account
  (Inbox, Outbox, Drafts, Sent, Trash, and Search)
* Precache these rows when EmailProvider starts up
* Ensure that newly added, precachable rows are cached when created
* Clean up some inefficient/wrong caching code
* Fix a commonly called method in NotificationManager in which we
  load a single Mailbox row using selection vs withAppendedId
* Confirm that we don't read from the database in typical use and
  heavy message loading
* Add a special URI for finding mailbox by type (using the cache)
* Add special-case code for EmailContent.count(Account.CONTENT_URI)
  which is used in a number of places (including on the UI thread)
  and whose value is easily determined
* Add a special URI to get the default account id
* Confirm that all unit tests work

The goal here is to be able to load all Account, HostAuth, Policy,
and Mailbox objects (by id) without worrying about disk access.
There will still be a single disk read for uncommon Mailbox reads,
but this should be considered acceptable.

Change-Id: Ibc9aa7acc73185e360b0b6f3053b90a985e97210
TODO: Unit tests
2011-06-21 21:39:19 -07:00