summaryrefslogtreecommitdiffstats
path: root/emailcommon
Commit message (Collapse)AuthorAgeFilesLines
* Allow download of compressed attachments.Danny Baumann2015-10-181-2/+0
| | | | | | Assuming all compressed files are malware is a little extreme. Change-Id: I0ef776f3ad4af1fb73199989c99ab05171353d17
* email: imap pushJorge Ruesga2015-10-184-3/+66
| | | | | Change-Id: I8a184a5644e4322ee65d969e14cd47fe119f5df2 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* email: fix eas autodiscoverJorge Ruesga2015-10-181-0/+6
| | | | | Change-Id: Ifaf5f757f7f844e49f0ac635b477fcbef4926293 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* email: support for auto-sync multiple IMAP foldersJorge Ruesga2015-10-182-1/+18
| | | | | | | | | This enables to auto-sync multiple IMAP folders, not only Inbox. Default to Inbox only. This changes relays in the syncloopback attribute to configure the folders to add to sync process. Change-Id: I8973cfd6ddec33446256bc8b48418558e27596b5 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* email: add an option for delete the accountJorge Ruesga2015-10-182-5/+22
| | | | | Change-Id: I0f0f2b7ea950d5154f90cd60261c6918b7ad36b7 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* email: suggested contactsJorge Ruesga2015-10-182-0/+57
| | | | | | | | | | | | | | | | | | | | This change adds support for suggested contacts (email addresses not in the contact provider and received via email). The implementation creates a new separate "extras" database (to avoid conflicts with future aosp changes). In the table SuggestedContacts are stored every email address present in every email inserted in the database. This allow to display this contacts in the RecipientEditTextView when compose an email. Suggested contacts are selected by account (only those ones received by that account). This features is opt-out by default, but it can be activated in general settings by choosing the suggested contact mode: * none: Not active * recents: Those received within the last 7 days * all: All the suggested contacts Change-Id: I156c3b1e2c4e4cff985a2183bc72b805bd596f3b Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* email: start handshake before hostname verificationJorge Ruesga2015-10-181-0/+8
| | | | | | | Start handshake prior to hostname verification to ensure exceptions do not get silenced Change-Id: Ide60753663d82d63b0f410b985447b7b26efd8f1 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* email: add support for Server Name Indication (SNI)Jorge Ruesga2015-10-182-1/+34
| | | | | | | | | | | | Change the underlying socket factory reference to SSLCertificateSocketFactory which has support for SNI since 4.2, and remove the access to the obsolete methods from the old factory reference. This change will setup the socket with a proper hostname prior to the ssl handshake. Change-Id: Ic3315f3924f33470ea2da14e8ac3b946d039b1d5 JIRA: CYAN-3775 Issue: https://jira.cyanogenmod.org/browse/CYAN-3775 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* DBHelper: Support upgrades from CM11Ricardo Cerqueira2015-10-181-0/+2
| | | | | | | | Add the new columns when coming from v126, add the old ones when coming from any other value (or creating) so that they're there when the feature gets reintroduced Change-Id: I48ec042b30afbcefd43bdad0042147b6b0d2249f
* Merge "Add analytics to track of what cipher suites are being used" into ↵Martin Hibdon2014-10-241-1/+1
|\ | | | | | | ub-gmail-ur14-dev
| * Add analytics to track of what cipher suites are being usedMartin Hibdon2014-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | b/18001842 I do this in MailTransport, which is only used by POP and IMAP. I can't log Analytics in SSLSocketFactoryWrapper, because that is in emailcommon and would cause a circular dependancy between emailcomman and UnifiedEmail. This will not yet work for Exchange, because it gets its socket indirectly through EmailClientConnectionManager, using a SchemeRegistry. Still, it will be helpful to get this info for POP and IMAP. Change-Id: Ibb9d22c83c49d0ba5090295b5321ca6afb09e65b
* | Allow an external security provider to be installedMartin Hibdon2014-10-211-7/+11
|/ | | | | | b/18001842 Change-Id: I8312fe541896e1ceeb6c5102f90bdbb0bb945151
* Merge "Add deprecated cipher suites to our SSLSocket" into ub-gmail-ur14-devMartin Hibdon2014-10-212-36/+284
|\
| * Add deprecated cipher suites to our SSLSocketMartin Hibdon2014-10-212-36/+284
| | | | | | | | | | | | | | | | | | | | b/18001842 In the L platform, some cipher suites are disabled by default. Unfortunately, some of these are still in use by common email providers. We need them to be enabled for email to work with these providers. Change-Id: Ia3a9bab5467c26626db9259074f77ec476610fa5
* | Fix restoreBodySource key so it returns the correct value.Anthony Lee2014-10-211-4/+1
|/ | | | | | | | The previous version of this function would return the _ID value instead of the SOURCE_MESSAGE_KEY value from the Body row. Bug: 17720266 Change-Id: Ie4cfc988b0659892b68d31472ef0c41d4aa98c68
* Get SSLSocketFactory from GmsCoreMartin Hibdon2014-10-021-12/+46
| | | | | | | | | | | | | | | | b/15721931 This follows an example pattern from GoogleHttpClient. It tries to get the SSLCertificateSocketFactory from GmsCore using reflection. If that fails, (because GmsCore is not installed on the device) then it will fall back to the platform implementation. MailApplication sets a static object in SSLUtils that allows it to get an externally created SSLCertifcateSocketFactory. If this method is set, then it will use it, otherwise it will fall back to the platform factory. This way there is no reference to GmsCore in the AOSP email. Change-Id: I0890fe4c3d79283fb98a4dc5a62a32efd320e52a
* Display sync errors using snackbar and not as a TL footerJames Lemieux2014-09-292-2/+4
| | | | | | | | | | | | | | | | | | | | | | b/16463253 The FAB compose button overlaps the action button found in the TL footer when network errors occur during sync. To avoid this overlap, the snackbar is used to display these errors and they no longer appear as a TL footer. In order to signal the sync error to AAC for display in the snackbar, the Folder.lastSyncResult needed to be encoded in the manner that AAC reads. This was not happening for POP/IMAP/Exchange accounts, so a large portion of this change is encoding that value properly every place it is written. To ensure the value is read/written properly everywhere, common methods were introduced in UIProvider that do this work. UIProviderTest was also added to ensure the read/write methods agree with each other. Finally, the display of the "Load More" TL footer was updated to match the latest spec. Change-Id: I9d3ae1157f288f05b0fed4d1385858f6c9ebfbf9
* When we migrate Exchange folders, set the sync status to INITIAL_SYNC_NEEDEDMartin Hibdon2014-09-261-0/+2
| | | | | | | | | | | | | | | | b/17443087 When we migrate exchange accounts, we copy mailboxes over to the new account (in order to preserve sync frequency and window). The problem with this is, you may have many accounts/mailboxes. After starting the app, it may take quite a long time before all mailboxes are synced. If the user visits some mailbox near the bottom, they'll see a misleading "folder is empty" view. Now, when migrating, we'll set the uisyncstatus to INITIAL_SYNC_NEEDED. Here I needed to add INITAL_SYNC_NEEDED to the list of states that EmailConversationCursor will consider incompletely loaded. Change-Id: Idef13adf9d691c03665830a2f926b1806d7591da
* Don't allow disabling of the camera with managed profilesMartin Hibdon2014-09-252-0/+27
| | | | Change-Id: I2e6085084682b04ef7973bc433214b5b3ab2da79
* Make sure to close a cursorMartin Hibdon2014-09-241-4/+10
| | | | | | b/17570154 Change-Id: I759a116a14784e92e7fa7eb51755ceda3860550e
* Put debug screen back into settingsMartin Hibdon2014-08-281-4/+4
| | | | | | | | | | | There is still work to be done here: * The debug setting is not persisted in Exchange, so if the exchange service is killed, when it restarts the logging will not be active. * Nothing in Exchange actually does any additional logging if this logging is turned on. Change-Id: Ic578e6956f70dd47fba9b2895385312f71c47abf
* b/17135753. Make sure to free ServiceConnection.Anthony Lee2014-08-201-13/+18
| | | | | | | | | The only way that the ServiceConnection was not being freed is if there was an Exception (other than RemoteException) being thrown out of mTask.run(). Now the call to unbindService() is called in a finally() block surrounding that block of code. Change-Id: I597412233381894be76d3c8bdf99fc7d96794dc2
* Fix providers.xml alternate diversionTony Mantler2014-08-151-0/+7
| | | | | | b/17048013 Change-Id: If2bc857266a6ba1445bf1fabbaed179c1b13a14f
* Switch null checks to TextUtils.isEmpty()Tony Mantler2014-08-071-1/+1
| | | | | | b/16872654 Change-Id: Ib8943f068ad6988ff08f8bfd54e2df8fa5ce0274
* Add Exchange fallback and support diverting to GmailTony Mantler2014-07-311-2/+20
| | | | | | | b/16679701 Change-Id: I59d7cb4a803f0ad8e782614d0c6cc635318d2375 (cherry picked from commit d039322f7402ef402eb66c92b899510dd6649e2d)
* Add copyright noticeMartin Hibdon2014-07-141-0/+15
| | | | Change-Id: I80e074196ca8cb6962d400a756c510c8e3105899
* Merge "Update IEmailService" into ub-mail-masterMartin Hibdon2014-07-143-5/+33
|\
| * Update IEmailServiceMartin Hibdon2014-07-113-5/+33
| | | | | | | | | | | | | | | | | | | | | | Add version support Change deleteAccountPIMData to deleteExternalAccountPIMData. Data kept inside the EmailProvider can be deleted from within the Email app. Only external data (e.g. contacts and calendar) need to be deleted by the service which has protocol specific knowlege. Change-Id: I875d3051d0cfdbaf52775ec20eb114a345894a93
* | Remove direct entry points to AccountSettingsTony Mantler2014-07-112-37/+0
|/ | | | | b/16240332 Change-Id: I9bc3f9a2e0b7faa4d8875a9ac7d6d585a65d9733
* Better documentation for "Account display name".Régis Décamps2014-07-101-1/+3
| | | | | | Give examples of what the display name is. Change-Id: I2934dc9e8b95d0b32b9c1e9fab391d7ba9e997da
* Add communication class for HostAuthMartin Hibdon2014-07-074-10/+156
| | | | | | | | | | | | We want a separate class for communicating HostAuth objects to and from IEmailService. The issue is that the HostAuth object was being used for both to and from the database, and to and from IEmailService. This is dangerous because The Email app may change out of band with the Exchange app, and may need to change the format of HostAuth. This bit us before when adding OAuth. Now communication to IEmailService is done using HostAuthCompat. Change-Id: I2fb8c2bd8158f58a7bb9bc3dc83a7936948c718c
* Merge "Unify settings activity" into ub-mail-masterTony Mantler2014-06-271-0/+18
|\
| * Unify settings activityTony Mantler2014-06-271-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Move over to the new AttachmentService.Anthony Lee2014-06-251-1/+1
|/ | | | Change-Id: I4a687b003884ea6a92a755fcbf394001bfc96a38
* Enable supression of combined accountPaul Westbrook2014-06-201-0/+5
| | | | | | | | This enables the client of the provider to suppress the email combined account. Later, the UI can enable a combined account that spans all of the account types Change-Id: I77e201f751019240af2274a1f74e2124b9889aab
* Update IEmailServiceMartin Hibdon2014-06-183-15/+49
| | | | | | | This is not yet finalized, but it's needed to fix push syncs on exchange. Change-Id: Iaff20aa0bdea9685ef6603de1f861d58fbab6ff1
* Remove unused preferences and dead codeTony Mantler2014-06-101-29/+0
| | | | Change-Id: Ica8bd735a91417ed44bd547ab7176832745d729e
* Merge "Unit Tests for serialization of Account and HostAuth objects" into ↵James Lemieux2014-06-092-3/+8
|\ | | | | | | ub-mail-master
| * Unit Tests for serialization of Account and HostAuth objectsJames Lemieux2014-06-092-3/+8
| | | | | | | | | | | | | | | | | | | | 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
* | am 73101f3a: Fix OAuth when changing credentials from settingsTony Mantler2014-06-091-1/+1
|\ \ | | | | | | | | | | | | * commit '73101f3a7bc1e735199a7c2c18358e9db9af0bca': Fix OAuth when changing credentials from settings
| * | Fix OAuth when changing credentials from settingsTony Mantler2014-06-091-1/+13
| | | | | | | | | | | | | | | | | | | | | b/15521401 Change-Id: I7909389943c8e3eefbef0699f1c7c9c338282ca5 (cherry picked from commit 994c282d804a635f783681ae314a6b4b244b476e)
* | | Fix OAuth when changing credentials from settingsTony Mantler2014-06-091-0/+12
| |/ |/| | | | | | | | | b/15521401 Change-Id: I7909389943c8e3eefbef0699f1c7c9c338282ca5
* | Clean up cert activity handlingTony Mantler2014-06-051-8/+11
| | | | | | | | | | | | | | | | Fix re-displaying the dialog on orientation change b/5622284 Add host/port when available b/4988512 Disambiguate intent between AOSP and EmailGoogle Change-Id: Ideeda20dfd9bd0070998ccf42d8042765866ca0e
* | Change IEmailService.sync to have two different formsMartin Hibdon2014-05-302-4/+13
| | | | | | | | Change-Id: Id8e770154d6116b02746cbdfb8c7cdc9358398de
* | Revert "Get rid of deleteAccountPIMData from IEmailService"Martin Hibdon2014-05-212-0/+25
| | | | | | | | | | | | This reverts commit cf2178c4fa61538f5a2f862fe3f9bc16b9f06ebb. Change-Id: I9b05dd7a29a2d2edf64529ca28e2305737a43115
* | Get rid of deleteAccountPIMData from IEmailServiceMartin Hibdon2014-05-212-25/+0
| | | | | | | | | | | | | | | | This doesn't need to be part of the service because the implementation doesn't need to be different between any of the different protocols. Change-Id: Ifddf16dd3ccaf397029f08f6d4283d9a5630f717
* | Merge "Move email bodies to files" into ub-mail-masterTony Mantler2014-05-151-5/+14
|\ \
| * | Move email bodies to filesTony Mantler2014-05-141-5/+14
| | | | | | | | | | | | Change-Id: Icfd0c4ab2ad25cc02b45cf41e7a205c17948ef2c
* | | Fix FLAG_OAUTH usageTony Mantler2014-05-141-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Also fix some excessive checking of incoming/outgoing settings fragments b/14969455 b/14971192 Change-Id: I6cf83aa59d381d3bbfc33e0d4a6e133c1814ba69
* | | Move account backup/restore to userdata in AccountManagerTony Mantler2014-05-145-41/+205
| | | | | | | | | | | | Change-Id: Iea9f2a1b1f2d87e07d63cbb1df5a0d6355ea4031