Commit Graph

74 Commits

Author SHA1 Message Date
Marc Blank 0993190caf Complete rewrite of account backup/restore code
* Use EmailProvider to backup/restore into a backup database
* Remove all of the old AccountBackupRestore code
* Get rid of the legacy Account class and all of the Preferences
  crap that referenced it
* Remove corresponding tests

Change-Id: I2de75aafdacc87246174303961e58547303f641e
2011-05-09 10:39:17 -07:00
Todd Kennedy ae993bda32 Merge "Add lastSeenMessageKey column to the mailbox table" 2011-05-06 15:07:58 -07:00
Todd Kennedy a9ac20b96f Add lastSeenMessageKey column to the mailbox table
The last seen message key is the id of the last message that we've "seen" for
that mailbox

Change-Id: I197f8a191654225ada1ce553cc959db775809c88
2011-05-06 14:51:41 -07:00
Ben Komalo 8d042850fb Re-work the way MessageCompose handles attachments
Now attachments are actually stored in an explicit list, instead of
being inferred from the state of the UI. This makes it possible to
switch states and restore attachments, and test.

Change-Id: I8c5f80f17f8c9e78d880ac4a1ac6ae22c2ec0579
2011-05-06 11:53:53 -07:00
Todd Kennedy c4cdb11d24 Remove notification if messages seen off device
If we receive new messages, we may display a notification to the user. If
those same messages are read elsewhere (i.e. via a web client), we will
remove the notification.

Change-Id: Iba09afe01942e0deaac8210fd6f9b315b1c8c93f
2011-05-05 12:00:27 -07:00
Marc Blank c96cd4a848 Merge "Add new policies to Policy and associated data structures" 2011-05-05 11:49:55 -07:00
Marc Blank f91a03f520 Add new policies to Policy and associated data structures
* Update Policy unit test

Change-Id: I24a980537a73e40fca9fceb1b6ad6b2feaa9c342
2011-05-05 11:49:15 -07:00
Marc Blank 74143e89d5 Prevent NPE's in calls to database utility methods
* Before the Email/Exchange split, EmailProvider was guaranteed not to return a null
  cursor; this is no longer true
* We now throw a new RuntimeException (ProviderUnavailableException) when calling
  commonly-used utility methods (e.g. restoreXWithId) and the cursor as returned from
  EmailProvider is null (which implies that the provider isn't available).

Change-Id: I152d13bff0129c23586cd570d23c87d69cfce372
2011-05-05 08:49:34 -07:00
Marc Blank aeee10e57e Rework of security policy storage
* Replace crazy (and soon to be "full") bit fields stored in an account's
  securityFlags with a row in a newly created Policy table (thus, fully
  expandable)
* Update code from database version 17 to 18; adds Policy table, a
  policyKey row in Account, and a revised trigger that deletes Policy
  information for deleted Accounts
* Update old PolicySet unit tests to work against the new Policy class
* Add test for the conversion of securityFlags to Policy
* Tested in a variety of scenarios; appears to be functionally equivalent

Change-Id: I1505ee75230d6a0d3c2b62a46326f39c2c7f9eb5
2011-05-03 11:11:47 -07:00
Todd Kennedy 27cf8b5ffe Display full pathname in move-to dialog
With the recent changes to hierarchical folders, the move-to dialog is
quite unusable if you have multiple child folders with the same name.
While waiting for UX to decide on the exact display, make a few quick
changes to display the fully-qualified pathname instead of just the
child folder name.

Change-Id: Id5c1cc98364fbf7a82a05ac30e944507c7d16320
2011-04-26 11:45:47 -07:00
Todd Kennedy 22208771b7 Add hierarchical folders to IMAP
We now create folder hierarcies for IMAP. This also includes a nifty SQL
statement that will get your existing database into shape.

Change-Id: If07a0632e9b250cf0c33c3e16bfba5816beab94c
2011-04-25 15:11:38 -07:00
Marc Blank 224c7215f1 Add new account flag SYNC_DISABLED and add comments to all flags
Change-Id: Ib153282c2294deb0e322b3cd71f90087a8cb23f9
2011-04-21 14:50:21 -07:00
Todd Kennedy 200c6bd9fa Simplify mailbox synchronization logic
The logic is simplified by creating database rows for new mailboxes down
in Imapstore. This means that the difference between local and remote folder
lists are mailboxes that need to be deleted.

Note -- this is still not the final CL. We probably update the database too
frequently and the column values aren't updated to support nested folders.

Change-Id: Ifbe4e0cf74ba81e5b6156b452ab72c56c35235ab
2011-04-21 11:54:30 -07:00
Todd Kennedy a50fc99b0c Use Account instead of URI to create transports
There's no need to create a URI just to rip in appart again. Additionally, to
support additional changes (i.e. to use Mailbox instead of Folder in the
MessageController), we need to store the actual Account.

NOTE -- This change only affects IMAP and POP3. SMTP will come in a follow-on CL

Change-Id: I400036a17271c99272fd9c603547dcd713b50b9d
2011-04-20 08:31:24 -07:00
Todd Kennedy f7036b7379 only allow navigating to mailboxes w/ children
If a mailbox doesn't have any sub-mailboxes, only allow selecting them to view
any contained messages. Do not update the mailbox list.

Change-Id: I6f469bf20a57dc440885402084c21ff184f13dff
2011-04-13 14:35:03 -07:00
Makoto Onuki e553c6ec0b Merge "Store UUIDs in account shortcuts, rather than IDs." 2011-04-05 10:41:25 -07:00
Makoto Onuki 0b6cb1c330 Store UUIDs in account shortcuts, rather than IDs.
Bug 4192836

Change-Id: I1d6349ed3ad70867f113b9a9f7eb8717b88b24c1
2011-04-04 14:12:05 -07:00
Marc Blank c60b8d0529 Add searchMessages command to EmailService
* Also, document service methods in EmailServiceProxy

Change-Id: I46cc68c8c2aa870ea82474c70d944640bb66b0ef
2011-04-04 11:28:25 -07:00
Marc Blank 76f614720d Highlight utility for HTML and text
* Add utilities for adding highlighting markup to HTML and
  highlighting spans to plain text (for Webview and UI,
  respectively)
* Rename Snippet.java to TextUtilities.java and move to utility
  package

Change-Id: Ic443ab5ce9c0199fa82a68e1592bf259494cadd2
2011-03-31 13:49:52 -07:00
Marc Blank 0dd02cc1f0 Add account flag for use by sync adapters
Change-Id: Idc4bd74877b4edee9dab5401c4825eab82220f23
2011-03-03 16:10:33 -08:00
Marc Blank fdf4a94094 Add some Mailbox flags for use in folder management
* These flags are documented in place
* Also add constants for sentinel values of PARENT_KEY

Change-Id: I0403a196599fa938528d874dc56d56522a573d56
2011-03-02 16:11:12 -08:00
Ying Wang 37f3385803 Split out emailcommon/Android.mk
Change-Id: I846ee2a4b541f4709e647aa537c61549db2bec2e
2011-03-01 15:56:27 -08:00
Ying Wang a07f2ae0b1 Revert "Split out emailcommon/Android.mk"
This reverts commit c28bf35319.
2011-03-01 14:52:05 -08:00
Ying Wang c28bf35319 Split out emailcommon/Android.mk
Change-Id: I90653e8601ee3ee6a8719d87ffb93222a11a22c0
2011-03-01 12:29:05 -08:00