-----BEGIN PGP SIGNATURE-----
iEYEABECAAYFAlfz3TAACgkQ6K0/gZqxDngnnACfWpBBPD+MBlDoVY2FWqXt7Sqb
hJwAnjOXT7GJvfSU5u5YclHC75odF/kw
=1TOl
-----END PGP SIGNATURE-----
Merge tag 'android-6.0.1_r72' into HEAD
Android 6.0.1 Release 72 (M4B30X)
# gpg: Signature made Tue 04 Oct 2016 09:47:44 AM PDT using DSA key ID 9AB10E78
# gpg: Can't check signature: public key not found
The security issue occurs because id is allowed to be an arbitrary
path instead of being limited to what it is -- a long. Both id
and account id are now parsed into longs (and if either fails, an
error will be logged and null will be returned).
Tested/verified error is logged using the reported attack.
BUG=30745403
Change-Id: Ia21418545bbaeb96fb5ab6c3f4e71858e57b8684
(cherry picked from commit 9794d7e8216138adf143a3b6faf3d5683316a662)
For subfolders of system folder type return the remote folder name instead of translate
it to the default folder type resource name. Subfolders shouldn't be considered as
system folders. For example a SPAM folder of a SPAM root folder (Junk/Ham should
be displayed as Ham instead of Junk).
Change-Id: I2644b8da336e3f0983d24355aefe961aa8acf30b
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
(cherry picked from commit db1ca54cd325c64971240d92ed11dad175d83579)
Currently, body text and html are removed from the content values to be stored as files
in the filesystem. This could lead to a IllegalArgumentException because we passed
an empty content value to the update operation. We must ensure that we update
at least one item.
Related BUGDUMP-4037330 and http://forum.cyanogenmod.org/topic/112563-massive-data-use
Change-Id: Ib9ba10eb2cb86598bef6e5f8bc11553d09fc4ef8
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
BinaryTempFileBody#getBody()#getInputStream() returns a
MessagingException not an IOException. This causes
"com.android.emailcommon.mail.MessagingException: Unable to open body"
exception messages and attachment messages not flagged as loaded.
Change-Id: Ia8f25dd0a212ce52e3dd202c523c5db4a009604f
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Due to a bug in commit 44a064e5f16ddaac25f2acfc03c118f65bc48aec,
AUTO_FETCH_ATTACHMENTS column could not be available in the Account table.
Since cm12 and up doesn't use this column, we are leave as is it. In case
the feature were added, then we need to create a new exception to ensure
that the columns is re-added.
Change-Id: I1803e343dde2e841fdc99b4489a74eb08b0a8352
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
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>
This will call other setences (like delete accoutns) to block access. Just integrate
in the normal database transactions
Change-Id: I48d7028f2ceddcdfbc170acd1a1fe32f0322b6e6
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
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>
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
Add change in Email App to process following intents
from Bluetooth App, for MAP MSE support.
- org.codeaurora.email.intent.action.MAIL_SERVICE_WAKEUP
- org.codeaurora.email.intent.action.MAIL_SERVICE_DELETE_MESSAGE
- org.codeaurora.email.intent.action.MAIL_SERVICE_MOVE_MESSAGE
- org.codeaurora.email.intent.action.MAIL_SERVICE_MESSAGE_READ
- org.codeaurora.email.intent.action.MAIL_SERVICE_SEND_PENDING
Change-Id: I2b46265ba20c6f333c9e6d1b19ee73f5a066f1ff
b/17720266
When replying to a message, sometimes the wrong message
is included in the reply. This seems to be related to
smart reply/forward, since it only has ever been known to
happen on an Exchange 2013 server. For now, disable smart
reply/forward.
We do this by making the EmailProvider always zero out the
FLAGS_SUPPORTS_SMART_FORWARD bit on the account. This way
we can control this feature from the Email app, rather than
Exchange.
Change-Id: I88bb5f06a1098f9f085592b0a3cf1a01d9eb3fc7
b/15868294
b/17377040
When we do a search, we clear the current contents of the search mailbox,
and then send a request to whatever service is appropriate (IMAP or
Exchange.) The service then begins a sync and updates the sync state.
The thing is, this leaves a time window when the sync state is still
NONE, but no contents have been loaded yet.
So now, as soon as the search request is made, we set the sync state
to LIVE, then send off the request. That should keep the empty state
view hidden until we actually do the sync.
Change-Id: Ia97e1cf2773db460fdf32aaa45205c4e6034527d
b/17573792
This is needed so that we can send cached files as attachments.
This case comes up if you edit a draft with an attachment,
view the attachment, and then share that with Email.
Also, update the manifest so that EmailProvider grants
uri permission for cachedFiles.
Change-Id: Ib32ae8360b627823af9361cba05e0e5dbd0ae4ca
If we have an error writing an old body file and overwrite the same ID,
we might end up in a situation where we have HTML from one message and Text
from another. Clean up the body files before insert to avoid this.
b/17720266
Change-Id: I2fb18fa24c6f3bc01e7c877e2f3bfccee6a34015
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
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
This reduces the tombstone down by 100K
A follow-on cl will remove the unused resources from the tombstone build
Bug: 17414014
Change-Id: I5d38811b17a5273ec726e750ab123e10e36cee04