Commit Graph

5658 Commits

Author SHA1 Message Date
Marc Blank
12b7932996 Merge "Clean up search handling in Controller" 2011-06-24 17:04:06 -07:00
Marc Blank
bad39b2e00 Clean up search handling in Controller
* Use same code for handling search mailbox for IMAP and EAS
* Allow "Load More" for EAS search mailbox

Change-Id: Id4a009c79a95302d627ff25f85e9c65bc461826f
2011-06-24 17:03:27 -07:00
Gilles Debunne
a8779053e5 Merge "Changed unknown source setting link" 2011-06-24 14:39:49 -07:00
Makoto Onuki
3c76df4f1f Workaround for bug 4946695
Proper fix on the way.

Change-Id: I22549d0e90b521d27271a8160fe8e43dae18defa
2011-06-24 14:21:27 -07:00
Gilles Debunne
9722c1bfed Changed unknown source setting link
This settings has been moved to Security.

Change-Id: Ifbb6edf28d258303bad5b39e0df34b9e8ea20d99
2011-06-24 12:31:02 -07:00
Ben Komalo
3db7f76fef Merge "Update notification text according to design" 2011-06-24 10:02:50 -07:00
Ben Komalo
472d75f1b4 Merge "Misc cleanups and avoid logging PII" 2011-06-24 09:54:38 -07:00
Marc Blank
a05b6e1e92 Merge "New search implementation for IMAP in MessagingController" 2011-06-24 09:18:58 -07:00
Marc Blank
9a01353f14 New search implementation for IMAP in MessagingController
* Add protocolSearchInfo column to Message table; this can be used
  to store information related to search results.  For IMAP, we
  store the serverId of the mailbox that the message lives in on
  the server
* Add upgrade code for this column
* Change MessagingController to use the proper serverId for remote
  operations, depending on whether the Message is a search result
  or not
* Fix some smaller issues with earlier code

Change-Id: I0c7f1d89a4659b95701d02646c0e8426680e2f6a
2011-06-23 22:02:00 -07:00
Ben Komalo
877b9070fa Misc cleanups and avoid logging PII
Change-Id: I9f906dabe0dd00a434ff88878f0639c835b2e2a7
2011-06-23 19:41:47 -07:00
Ben Komalo
6f93d2edca Update notification text according to design
- "UNSEEN new messages" is the title for multiple new messages
- the small number in the right shows the unread count

Change-Id: I48f761b727ea8abc9277d737a08789fa63d10871
2011-06-23 17:48:25 -07:00
Makoto Onuki
1ce33fd93f Revive the security hold check on the UI side.
Bug 4901767

Change-Id: Id8ccd3346f2d3008543df2107bab97ebe1a20fa6
2011-06-23 16:40:53 -07:00
Makoto Onuki
80d3875d30 Action bar: Use laoder to get current mailbox info
Before this CL, we had this crazy plumbing from MailboxListFragment
to ActionBarController to update the current mailbox name/message count.

This wouldn't work on 1-pane, so now ABC just gets the current mailbox id
from UIC and loads the name/count with its own loader.

Also...
- Fixed bug 4904450 and bug 4460470: Now we consistently use FolderProperties
to get proler display names and message counts.

- Renamed some confusing names in AccountSelectorAdapter

Change-Id: Ic7bea6da6d2859006fb8f9263024c7d5e62b1e7f
2011-06-23 16:06:45 -07:00
Ben Komalo
bf3e65b667 Disable hw acceleration temporarily
Bug: 4886133
Change-Id: I0f9efc200712815610ddc9013acc7eec25631180
2011-06-23 14:56:05 -07:00
Ben Komalo
bcdcc0458f Pass the entire list context to the listfragment
This allows us to read search properties and other things to determine
rendering state

Change-Id: If73269128a60e9992822774ebdba3d90a44d2d76
2011-06-23 13:32:24 -07:00
Ben Komalo
53300963ff Save/restore message list context
This fixes opening messages after rotations. Oops.
Bug: 4905495

Change-Id: Ibb9984245f7a040b65d472ad4103da587c28c83b
2011-06-23 12:38:42 -07:00
Ben Komalo
ed839dce77 Merge "Fix some things with shortcuts/widgets." 2011-06-23 11:53:22 -07:00
Ben Komalo
e10215eaff Fix some things with shortcuts/widgets.
- All mailboxes will be shown when selecting a shortcut for a normal
account.
- Combined unread won't show up in shortcuts for combined accounts
- only inbox is allowed for IMAP/POP widgets
- all mailboxes allowed for EAS widgets

Bug: 4725896
Change-Id: I5c77c2f5443e330ed451179761b1d9c8c0dd7619
2011-06-23 11:52:32 -07:00
Marc Blank
65cab2baa7 Merge "Prevent NPE when creating account..." 2011-06-23 10:59:34 -07:00
Jorge Lugo
d6efb08c4d Merge "Quick response clean-up" 2011-06-23 10:52:36 -07:00
Marc Blank
9863dac3ee Prevent NPE when creating account...
* Yet more whack-a-mole

Bug: 4544677
Change-Id: I35eb0850b3abb13ca82dc5b19bb5511d894b5722
2011-06-23 10:52:21 -07:00
Marc Blank
deb345aceb Support FLAG_SUPPORTS_SEARCH for IMAP accounts
* Update existing database to add this flag for IMAP accounts
* Set flag when creating IMAP accounts
* Change temporary UI to use the flag exclusively

Change-Id: Idefccd3a74d2222fe8a0ba47116dee981a0ae1f5
2011-06-23 10:36:35 -07:00
Jorge Lugo
bc42ab7706 Quick response clean-up
Highlighting now appears when selecting a quick response. On "insert
quick response" dialog has exactly two lines of quick response shown.
Done also works properly now on the phone.

Known bug: text is not ellipsized. However, this is dependent
on bug 3389545 being fixed by frameworks team.

Change-Id: I7490e139267963d1508fa0573144a10c9190e11c
2011-06-22 20:58:54 -07:00
Ben Komalo
2de21278f8 Merge "Search state improvements." 2011-06-22 19:57:14 -07:00
Marc Blank
f5bbef0b16 Merge "When looking for default account, check for empty cursors" 2011-06-22 18:53:32 -07:00
Marc Blank
c09ca39cde When looking for default account, check for empty cursors
* At present, we will cache empty cursors (i.e. where the query
  result had zero rows)
* If a widget (or shortcut) references a deleted account, this will
  create a cached entry for that account, and the defaultAccountId
  code will try to retrieve the isDefault column from that (empty)
  cursor
* To fix this, we simply skip over empty cursors when looking for
  a default account
* We will also look into whether it makes sense to cache zero-
  length cursors

Bug: 4883043
Change-Id: Id998506f77bd6cda6cb1f5d8ce65d689dde4d2c5
2011-06-22 18:45:54 -07:00
Ben Komalo
b0b6eb56f7 Search state improvements.
- actually fires off a new instance of our Activity for search, instead
of killing the old one
- exiting search mode from a search result now works and pops the
activity stack
- doing a new search clears the input box as expected
- the search term is actually shown at the top in the results list

Change-Id: Ia6b92042e26a2e44b8cb45fe1d5b3bfb40cfd6da
2011-06-22 18:18:17 -07:00
Ben Komalo
383d6ead22 Use new message list in controllers.
Change-Id: Iaf4bf90add855f556a2e61521618924e13f60347
2011-06-22 17:23:13 -07:00
Makoto Onuki
ef02676a16 Merge "Fix drag & drop" 2011-06-22 16:20:01 -07:00
Makoto Onuki
d5dfd76cb9 Fix drag & drop
There was an assumption that the list view would only contain MailboxListItem's.
Now it's not always the case with the headers like "recent folders".

Also killed the timer thing for the nested navigation during DnD.

Bug 4904006

Change-Id: I4ee756775d0115f3a39086758be69100c19163c9
2011-06-22 16:13:41 -07:00
Marc Blank
106e3ad16d Merge "Fix problem with getDefaultAccountId() with no explicit default" 2011-06-22 16:06:35 -07:00
Makoto Onuki
192f9b6396 Merge "Improve 1-pane message visual" 2011-06-22 15:57:37 -07:00
Makoto Onuki
846763bd68 Improve 1-pane message visual
Also fixed the text alignment in the tabs on the 2-pane message view.

We don't yet to have the full-spec for this, so it's still temporary.

Now we again wrap the webview in a scroll view, so we'll have the "message
keeps growing" issue again.  I'll file a bug for this.

It's still temporary, so I didn't remove the scroll views for the
each section (e.g. the attachment tab).  Also I had to make up some
colors/dimensions which were unspecified.  Also I didn't always define
styles when I should.  Let's clean up these things later when we
get more detailed spec.

Change-Id: Ibdb78543f5ec7300f92091d1f8b800ca5edc74b2
2011-06-22 15:56:34 -07:00
Marc Blank
6353774647 Fix problem with getDefaultAccountId() with no explicit default
* This wasn't working with the new code and the unit test wasn't
  testing this case.
* Updated code in EmailProvider and added a test case

Change-Id: I75c23423c4f43e4201d446886d92a5312fa8a084
2011-06-22 15:45:17 -07:00
Ben Komalo
67cd9eb0d9 Merge "Introduce MessageListContext." 2011-06-22 14:50:28 -07:00
Ben Komalo
18410ed346 Introduce MessageListContext.
This will encapsulate meta information about a message list. Notably the
mailbox it's showing OR the search parameters that were used to build
its contents.

Change-Id: Ibe078a700860e7b9426c865e843e899f82306a96
2011-06-22 14:37:21 -07:00
Ben Komalo
a308618509 Pushes some search behavior to base controller
This enables search on one pane with the same caveats as on two pane

Change-Id: I80ab6ada0f718367fe6d584b18bc84d04a27bf7b
2011-06-22 13:55:05 -07:00
Ben Komalo
f3d07fb3e6 Consolidate some menu item toggling.
- fixes search button being shown for pop accounts
- cleans up some duplicated code

Change-Id: I498f0140eb2f3ffa7d3ad7f0da0e1d357f80e9b9
2011-06-22 12:38:12 -07:00
Marc Blank
41609adc23 Merge "Fix cursor-related errors:" 2011-06-22 12:01:38 -07:00
Marc Blank
d12f78d6ba Fix cursor-related errors:
1) Have CachedCursor implement CrossProcessCursor; still need to
  figure out how this ever worked
2) Close cursor used internally in findMailboxOfType

Bug: 4869024
Change-Id: Id20d37b7b83e133aa4d5fe9293a42ae217024f01
2011-06-22 10:59:06 -07:00
Jorge Lugo
f1d9367909 Merge "Fix behavior if replying to own sent message" 2011-06-22 10:48:02 -07:00
Makoto Onuki
69b50d46ec Merge "Kill InboxFinder in the UI controller" 2011-06-22 09:19:09 -07:00
Marc Blank
0404a331ad Merge "Improve EmailContent caching..." 2011-06-21 23:46:37 -07:00
Ben Komalo
45cab452a9 Merge "Prevent NPE when account can't be found for policy" 2011-06-21 23:16:46 -07:00
Ben Komalo
3873111033 Merge "Fix search bar sizing." 2011-06-21 23:16:21 -07:00
Ben Komalo
a182ac48d6 Merge "Show lookback settings for onepane." 2011-06-21 23:16:12 -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
Ben Komalo
1116194d9f Fix search bar sizing.
On phones it was being pushed out beyond the width of the phone.
Make it so that it fits the whole width in phone portrait, and is fixed
size in landscape / tablets.

Change-Id: Ifc712002c4df38ceb4bd3577f0cbb48114b41115
2011-06-21 20:39:24 -07:00
Ben Komalo
d17a85a2f2 Mailbox -> folder in user visible strings
Bug: 2293250
Change-Id: I61b58f594357f5a71bb0b50af43cba1e5fffbd8d
2011-06-21 20:12:41 -07:00
Ben Komalo
a817543efb Show lookback settings for onepane.
This doesn't fix the fact that it's temporary, but at least makes the
temporary UI functional

Change-Id: If8d3e3cabe15d2ff0970d418113738f8479cbb8c
2011-06-21 18:30:54 -07:00