Now, when PreferenceMigrator.migrate is run,
we forcibly call commit after the VersionedPrefs
object is updated (whether MailPrefs, AccountPreferences
or FolderPreferences). This commit applies the change to
Email2. Should fix b/8640441 and b/8520847.
Change-Id: I9a014c1c4bd35aa2ea8e268fec9a050d47e4d732
Periodic sync management was wrong in at least two ways:
1) Periodic syncs were scheduled as a side effect of
performing a sync, so changing the sync interval setting
would not do what you expect.
2) Performing a manual mailbox sync would schedule a
periodic sync on that mailbox.
This change removes the side effect from sync, and instead
actually responds to updates to the sync interval by
removing the extra syncs and updating just the account sync.
Bug: 8666490
Change-Id: I3f4a3fb7044c408578f0dc75ccb6c5bb176bfc0b
- Set socket timeout as soon as you open it. This was how
IMAP worked, so I just moved the call up one level. This
should help one of the sync forever scenarios.
- Simplify the SQL query for getting a Mailbox.
- Try to load messages that failed to load last time.
- Always close the connection to the remote folder.
- Don't try to be too clever in fetching the body.
This needs to be fixed later for attachements, but for
now seems to work better and will let me get more testing.
Change-Id: I91b6a6f2a2846b34b1a0c50eb4eb37fc947389ce
We don't have special MIME types for all possible queries.
It's only an error if the matcher doesn't know about it at
all, which is handled by findMatch, so we just return null
here (same as with Gmail).
Change-Id: I7061e25b8fd4543c41f62188cb90712353a64779
Previously, the folderlist itself would only sync when there
was no inbox, i.e. at account creation time. Now any sync
that's not a mailbox specific sync will do it.
Change-Id: If7c446cd2e193ed6e1a4abd3fdde0d5748371ba5
"Stale" is currently defined as "it's been 5 minutes since
my last sync".
Also includes a small refactor so that uiloadmore doesn't
load the mailbox from DB twice.
Bug: 7100372
Change-Id: Ib31aa211fe2ab790044beb7bc7d2fdcccf595171
Replace the current "Hide checkbox" setting with a tri-state setting with
choice of:
- Show checkboxes
- Show sender image
- Show neither
Bug: 8512959
Change-Id: Ifa233b6d65f8c37388edeed71dbfbfdf1295d6fc
- Update syncTime for IMAP and POP whenever we sync.
- Change load more to simply include the delta in the RPC
rather than using the visibleLimit column.
- Add a query to get the message count for a Mailbox.
- Refactor code for updating totalCount and determining
the new message count when syncing.
- Remove dead code from Mailbox.
- Remove uses of visibleLimit from code.
Note that visibleLimit and messageCount in Mailbox table are
no longer useful and will be removed in a later change.
Bug: 8579767
Bug: 8523146
Change-Id: Ieb67e3b6f1c82c3b21b972c5a1e557cd75dc21db
As a result of a previous change, we are appending application version
to the end of the folder name. This breaks the EmailProvider's
expectation about folder URIs. So instead of using just
uifolder/<number>, allow for uifolder/<number>?<appversion query>
getPathSegments().get(i) will still return the path segment without
the query, so the folder ID gets resolved correctly.
The previous change:
https://googleplex-android-review.googlesource.com/#/c/281416/
Bug: 8435074 Not able to access Exchange inbox and combined inbox
Change-Id: I7b9ffad9b5510d1a08a29e2a21aacb091d4330a6
Also restores the trash icon. I'm not using the "correct"
icon -- it's the menu icon, not a folder icon -- but it
looks correct. Also, the "unread messages" icon is likewise
the menu icon for mark unread.
Bug: 8527132
Bug: 8444885
Change-Id: I7d3bc286f80f130e6f08ff1340a013d81700406e
Space after colon violates RFC 5321 (and RFC 821): "Since it has been a common
source of errors, it is worth noting that spaces are not permitted on either
side of the colon following FROM in the MAIL command or TO in the RCPT command"
Change-Id: Ie5330bf2bd01cd8f734134dadd742cf16df70d7a
Signed-off-by: Jack Bates <jack@nottheoilrig.com>
cherry-pick of https://android-review.googlesource.com/#/c/32640/
The code for syncing new messages from client to server
somehow never got moved from Email1 to Email2.
This change also includes minor cleanup on system mailbox
flags.
Bug: 8531552
Change-Id: I1f9396635ba14cb6e641d2bc1b506c6d702f6b2e
Existing inner join means that a Message without an entry
in Body table cannot display correctly, even though this is
a potentially legitimate state.
However, because the MessageCursor for Email doesn't read
flagLoaded at all, this change actually causes another bug:
if you go to a partially loaded message, it will show as
blank with no load indicator. Fixing b/8370633 will mask
this by not letting you get in a situation where partially
loaded messages are shown.
Bug: 8512030
Change-Id: Ie2e365e7e5df3959115ed299d1a7f03aa1d7af79
The mailboxNotification query apparently can return bogus
mailbox ids. This underlying bug still needs fixing.
Bug: 8482721
Change-Id: Icfbd0d986ab32fe878a0dbe09a3276322c75cafe
The problem was that when the attachment was attempted to be opened
from the Exchange process, it didn't have access to the cached file.
Instead, use a content provider uri to reference the cached file.
Bug: 8400456
Change-Id: I80abd66642e938cf09f73bf0e9bd049aa8d7ba1d
This permits us to move shared code for looking up system
folder names to emailcommon, which is also in this change.
Also renames emailcommon2 to emailcommon.
This is part of a multi-project submit with
I4a071a07c3e33aaa4ea404eb66a8db1eabc9ef0e and
I5746c0353783f9b29d52d6540472588c6542a6a2.
Bug: 8383232
Change-Id: I6c6eec4f1bcf2abd54c1ed05da1add8d894ee403
The uris supplied for these are bogus (lack IDs), and at any
rate the actual undo itself should notify the UI. (That's
currently broken, but not for want of trying, but the point
is that needs to get fixed anyway.)
Bug: 8373349
Change-Id: Id0f4e9fa45f2ece42d07f1f350d841f00270a8d9
Without this change, languages where the inbox is not named
"Inbox" will never initialize IMAP accounts correctly.
This change "works" because
LegacyConversions.inferMailboxTypeFromName matches against
server name. Obviously this code's bad and I should feel
bad, but for now this change at least makes the app usable
in other languages and leaves the code in the simplest state
for fixing later.
Bug: 8393126
Change-Id: I27b422b4b9a3568c899beda41c96e61eb77c4ad3
Make Email respect the accepts moved mail flag
Don't throw an exception when receiving on the
folders_updated column
Bug: 8370675
Change-Id: I92c630577e6f572361bbaf68d8e5d0bfb6204951
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
This is a quick fix to get it working ASAP, I will improve
how system folders are created when handling b/8383232.
Bug: 8307247
Change-Id: I6ea24ea756911c60d4eca69ce65d27dff33850c8
When adding an Exchange account with a security policy, Email
generates a notification to let the user enable the policy. The
code that generates the notification attemptes to load the folder
as part of the base notification. Before the account policy has been
configured, it isn't possible to load the folder. We need to handle
a null folder when generating the notification
Also, imporoved the logging when an exception is thrown from the
PolicyService
Bug: 8341882
Change-Id: I33ff57adc3c130e8318910e352146b8ea56f9a2c
We can't send Folder parcelables to RemoteViews, so let's just send
what we need: two URIs and a String.
Bug: 8330949
Change-Id: Ic3f272e1bae4530cdc7776fd88eeb7bcb1a7dae3
Cache attachments in a email directory when sending to allow sending
to succeed when the content provider has a permission
Bug: 7381557
Change-Id: Icf9faead2048de237228625f998b42feade48978
Notifications were not being sent on account additions,
so the UI would reprompt to add an account, after an account
was added. Now, the appropriate notifications are sent.
Also, fixed some cases where try/finally blocks were not used
to ensure that cursors were being closed.
Change-Id: If65934a34d995471fd5102fbe7e8cacbed5aae44
This CL includes the call() support. Subsequent CLs will remove the
deprecated UI provider uris, will add attachment caching to Email
Bug: 7381557
Change-Id: Iff59c7c0503c6e9ccda1d15954f72ffa78331b4e
- Make sure visibleLimit stays <= totalCount.
- Don't reset it to 0 every time user enters a folder.
Also sets Folder.totalCount = Mailbox.folderCount
(rather than Mailbox.messageCount).
BUG: 7480726
Change-Id: Iae084d9445f483dca2b1da052ffd4dd7d091c6f6
Since some people prefer delete over archive, we will use their
conversation list swipe preference to determine whether to show
a "Delete" action or an "Archive"/"Remove label" action. "Delete"
will be shown if they have selected "Always delete"
UR9 version of I4eb0d408474a9f613cc4267c3851cc7277a22ebd
Change-Id: Ia2f1382b88c1ee6f64e864cb8b780d02821b673d
Email requires a user assignable category in the case
the user is moving labels/folders from a category the
user should not be allowed to view (i.e. sys labels).
Change added flag under function where if it allows
moved messages, it will allow the user to assign
there as well.
Bug: 8157593
Change-Id: Icc8a5d4587ef9180d32207613da4f31ddc8854f1
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
MatrixCursor doesn't do this, so we need to add our own cache.
Depends on Ia5ffd31f54a2a335f495df5e0d1a0886ee08c14b
Change-Id: Ica78e3cec747bf86fcef16508156e359216c64fe
Migrate the old value as necessary.
Update the unit tests.
Cherry-picked from I1c276ffde3496cbc66846ed4a007088d39f20382 with
minor changes.
Bug: 7624838
Change-Id: I1b3fa331b62f556701bacba5ce9cd64305d9b52a
An empty string as the ringtone URI was triggering the system
vibration while in vibrate mode.
Bug: 7624838
Change-Id: Ide1cb2d8ac5d1295c18770bd053dd1cd0a50feb0
We might be dropping updates to the FolderListFragment since updates
to individual folders do not currently update the top-level
folder-list URI.
Bug: 7487632 EmailProvider doesn't notify on the folder list URI
Change-Id: I7c673eefd2d9cbaf01a5ca3098f7c4728f841f40