Commit Graph

3253 Commits

Author SHA1 Message Date
Ben Komalo
9b4f11a4ed Show a search results header.
The count will be wired in and shown in here.

Change-Id: I2f496dcd86d748ee1c17c8e819b65c61c098a8ba
2011-06-27 19:59:23 -07:00
Makoto Onuki
257c037bb5 Use DelayedOperations in ABC
Change-Id: Iadb4def22176cf28bc3a0b78f95b1c7cc9f52f69
2011-06-27 17:56:49 -07:00
Ben Komalo
f8acc29628 Merge "Introduce a SearchCursorLoader" 2011-06-27 17:32:25 -07:00
Ben Komalo
37c8a70d64 Introduce a SearchCursorLoader
This loader will abstract away the waiting for the controller to cleanup
the existing contents of the search mailbox

After some additional, to-be-done plumbing, I'd like
Controller.searchMessages to return some results info (like # of results
at the least) so that the SearchCursor returned can relay that
information to the client (which can then do a lot more interesting
things at that point).

Change-Id: Ifcba0ddf7170c56dac9f3b44128988a5aa4ca887
2011-06-27 15:43:21 -07:00
Marc Blank
bc1fa23031 Merge "Clean up/simplify ExchangeUtils/ExchangeStore" 2011-06-27 14:27:25 -07:00
Makoto Onuki
d538d4bce1 2pane: Show/hide fragments *before* animation starts
To fix "IllegalStateException: Can not perform this action after
onSaveInstanceState".

Bug 4522010

Change-Id: I640fab0d51b02467f2f91d0d33091e1daac356fd
2011-06-27 14:10:11 -07:00
Makoto Onuki
569083fab3 Merge "New account spinner" 2011-06-27 13:22:41 -07:00
Makoto Onuki
4689cb7100 New account spinner
- Don't use the action bar spinner.
  Instead use a custom view to show the current account.
  (It's not a spinner; now we show the dropdown list by ourselves,
  which gives us more detailed control.)

- Also show the current mailbox name/unread count with the account name.

- Removed the mailbox info loader in ABC.
  Instead, now the AccountSelectorAdapter loader loads the current
  account/mailbox name, and the unread count as extras.

- Now ABC.Callback.onMailboxSelected passed an account ID as well
  as a mailbox ID.

- There's new code paths that can cause the "fragment transaction in
  onLoadFinished" exception.  We need to fix this properly, but
  for now we just use commitAllowingStateLoss().

Bug 4948352

Change-Id: I73bb8b7530f8328ca1c86382ac0a54086ad061d7
2011-06-27 13:19:27 -07:00
Marc Blank
66a47b8dac Clean up/simplify ExchangeUtils/ExchangeStore
* Rename ExchangeUtils to EmailServiceUtils
* Create calls for Exchange to use (eventually remove these)
* Get rid of lots of nonsense in ExchangeStore

Change-Id: Ic538cfe1de57eca24088ee1f590264283d12f511
2011-06-27 12:14:04 -07:00
Ben Komalo
9e4a4149c8 Merge "Persist trusted sender set to preferences" 2011-06-27 10:00:53 -07:00
Ben Komalo
b1f3c2d73f Merge "Improved "show pictures" support." 2011-06-27 10:00:49 -07:00
Ben Komalo
ca22a51a9c Merge "Replace details dialog with expando subheader" 2011-06-27 09:58:30 -07:00
Ben Komalo
04795828d9 Persist trusted sender set to preferences
This makes it so that "always show pictures" from a sender works

Change-Id: I6e6c6d8dc78746d0828428b6c6256c4fff3eb111
2011-06-25 17:48:20 -07:00
Ben Komalo
66282fb6ff Improved "show pictures" support.
This is the UI part for remembering to show images based on senders.
It does not persist anything yet.

Change-Id: Iec40d9d1ace3661dabca2eed31ea6d0893be71e0
2011-06-25 16:54:09 -07:00
Brian Carlstrom
312b2fb561 Replace KeyChainActivity placeholder UI with more polished dialog (4 of 5)
frameworks/base

    Extended KeyChain.chooserPrivateKeyAlias to allow caller to supply
    preferred choice to be selected in chooser. This allows Email
    settings to highlight the current choice when allowing user to
    change settings.
	keystore/java/android/security/KeyChain.java
	api/current.txt

    Implemented KeyChain functionality to pass host and port
    information to KeyChainActivity for display.
	keystore/java/android/security/KeyChain.java

    KeyChain now sends a PendingIntent as part of the Intent it sends
    to the KeyChainActivity which can be used to identify the caller
    in reliable way.
	keystore/java/android/security/KeyChain.java

    Moved .pfx/.p12/.cer/.crt constants to Credentials for reuse.
    Added Credentials.install variant with no value for use from KeyChainActivity
	keystore/java/android/security/Credentials.java

packages/apps/CertInstaller
    Source of extension constants now in Credentials
	src/com/android/certinstaller/CertFile.java

packages/apps/Browser
    Have browser supply host and port information to KeyChain.choosePrivateKeyAlias
    Tracking KeyChain.choosePrivateKeyAlias API change
	src/com/android/browser/Tab.java

packages/apps/Email
    Tracking KeyChain.choosePrivateKeyAlias API change
	src/com/android/email/view/CertificateSelector.java

packages/apps/KeyChain

    KeyChain now depends on bouncycastle X509Name for formatting
    X500Principals, since the 4 X500Principal formatting options could
    not format emailAddress attributes in a human readable way and its
    the most important attribute to display for client certificates in
    most cases.
	Android.mk

    Changing the UI to a dialog, make the activity style transparent.
	AndroidManifest.xml
	res/values/styles.xml

    Layout for chooser dialog
	res/layout/cert_chooser.xml

    Layout for list items in chooser
	res/layout/cert_item.xml

    New resources for dialog including comments for translators.
	res/values/strings.xml

    New dialog based KeyChainActivity. Now also shows requesting app
    and requesting server. Now can preselect a specified alias. New
    link directly to CertInstaller.

	src/com/android/keychain/KeyChainActivity.java

    Fix KeyChainTestActivity to work with TestKeyStore changes that
    were causing network activity on the UI to look up the name of
    localhost. Also track KeyChain.choosePrivateKeyAlias API change.

	tests/src/com/android/keychain/tests/KeyChainTestActivity.java

Change-Id: I131f7708cede39669491a23ead3860907460d31f
2011-06-25 16:48:38 -07:00
Ben Komalo
5cba9c10ac Replace details dialog with expando subheader
Change-Id: I7b0f63b7b5ce7172ac32b8c00891005b9f2e28ee
2011-06-25 16:34:37 -07:00
Makoto Onuki
f9a9f52897 Fix header text on mailbox list fragment
Bug 4946676

Change-Id: I829c8df4a4e268e8807a3ec686dca5afdd173713
2011-06-24 18:57:47 -07:00
Makoto Onuki
6390b06e3b Merge "Add debug log to investigate bug 4905749" 2011-06-24 18:45:28 -07:00
Makoto Onuki
d8a2e33998 Add debug log to investigate bug 4905749
Change-Id: I1cfe12b0150490ec08caa02332bcca88521ff5fd
2011-06-24 18:44:31 -07:00
Makoto Onuki
329ca184e7 Merge "Yet another action bar fix..." 2011-06-24 18:43:49 -07:00
Ben Komalo
94c002349f Merge "Set list context through a central place." 2011-06-24 17:29:41 -07:00
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
Makoto Onuki
f4622a8ac7 Yet another action bar fix...
It's a temporary fix.  Proper fix underway...

Change-Id: I225e04168f7fae6a3b411659a27e79b28022ac40
2011-06-24 15:26:52 -07:00
Ben Komalo
78c450ab14 Set list context through a central place.
Bug: 4946658
Change-Id: I3f283088697b282b98a1c4e15ddf1f9641991806
2011-06-24 15:26:04 -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
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
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
3873111033 Merge "Fix search bar sizing." 2011-06-21 23:16:21 -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
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
Makoto Onuki
f46a8f2053 Kill InboxFinder in the UI controller
Instead, in switchAccount, if the account doesn't have Inbox, we'll
redirect to Welcome and close EmailActivity.

(This will easily happen if you add a second account from the system settings,
launch the app and switch to the new account.)

Change-Id: Ia03d8e6697b58f6fcf10fd95fbcb5e310a5b5305
2011-06-21 17:59:55 -07:00
Makoto Onuki
b8b560f315 Improve Welcome
- Show "Your email will appear shortly" during the initial sync
- Don't close self in onStop if it's because of configuration changes.

Change-Id: Ic60f25c58712c599c735b2bede1627d4e102eb6b
2011-06-21 17:17:08 -07:00
Jorge Lugo
67be1d5f6b Fix behavior if replying to own sent message
If the address of the account is in the reply-to: field (or from: field
when reply-to: is empty), now populates the To: field with the same To:
field on reply.

Bug: 3504182
Change-Id: I17d7fe4be002b302decb8f0dae95f33d452b7adc
2011-06-21 17:03:46 -07:00
Makoto Onuki
c9af8b2dbf Merge "Wait for initial sync in Welcome." 2011-06-21 14:37:12 -07:00
Makoto Onuki
95ad0f0e93 Wait for initial sync in Welcome.
Change-Id: I5052e8a3e3af5565184c391200b9ab63dff4b50b
2011-06-21 13:58:42 -07:00
Ben Komalo
59f921a21c Merge "Some fixes to the action bar." 2011-06-21 13:38:23 -07:00
Marc Blank
0fd968623d Merge "Fix MailService unit tests" 2011-06-21 13:20:27 -07:00
Marc Blank
cbc842c5c9 Fix MailService unit tests
* These broke when we split Email/Exchange
* We now use a test authenticator and a test account type, which
  is actually far cleaner than dealing with actual accounts

Change-Id: Ib7c9f884eac484c33642a8036f47466ce641c567
2011-06-21 13:03:48 -07:00
Ben Komalo
f69bcd0123 Some fixes to the action bar.
This hides the main navigation controls when the search view is shown.
It also fixes issues with rotation when in search mode.

Change-Id: I5ffed8eb7549fc603fc4e4d1868d114be65112c3
2011-06-21 12:28:57 -07:00
Makoto Onuki
d7d4954860 Merge "Fix failing tests" 2011-06-21 11:40:26 -07:00
Makoto Onuki
ce4cce05b2 Fix failing tests
Fixed activity tests and and activity.setup tests.

Bug 4762098
Bug 4766087
Bug 4590590

Change-Id: Ifbd49f38c59854c65b6c48a1b03ca8153bfa558b
2011-06-21 11:18:32 -07:00
Jorge Lugo
72fad84fc3 Merge "Improved saving of drafts when back key is pressed" 2011-06-21 10:41:21 -07:00
Makoto Onuki
369905c95d Fix crashing tests
Some of the tests are still failing, but at least now we can go through till
the end.

- Fixed NPE in WelcomeTests (caused by the mock context not returning a proper
  layout inflator.)
- Removed the rainy day test from MessageFileViewTest.
  (Not setting a proper intent will result in the argument check in
  MessageFileViewFragment)
- Removed unnecessary null check in EmailProvider.getDatabase()

Bug 4766072

Change-Id: I48b92cc91d0417cd9980c131fda8f63a9a6eb990
2011-06-20 20:01:22 -07:00
Makoto Onuki
09a0e9b5dc Merge "Move restore account to EmailProvider." 2011-06-20 18:46:09 -07:00
Makoto Onuki
9dad9ad973 Move restore account to EmailProvider.
In order to reduce the UI initialization code, move
let EmailProvider restore accounts when it opens the DB.

Backup can be moved too, but I just leave it as a TODO.

Change-Id: Id5c1810904db6abaecbfecbaa8d2d53834ebf07b
2011-06-20 18:19:17 -07:00
Jorge Lugo
ae95fbf4d0 Merge "Added quick responses." 2011-06-20 15:10:06 -07:00
Ben Komalo
2441dd5cbb Merge "Cleanup and collapse some methods together." 2011-06-20 14:49:47 -07:00
Jorge Lugo
5a3888f35b Added quick responses.
Added "Insert quick response" button to MessageCompose's action bar. Clicking
it opens dialog with available quick responses. Selecting one of the responses
will insert it into message body at the current cursor location. Also added
menu in account preferences to create, edit, and delete quick responses.

Change-Id: I85f3f6b36801cf112ec9d7c31135a917456173d7
2011-06-20 13:31:50 -07:00
Jorge Lugo
d5fe048224 Improved saving of drafts when back key is pressed
In MessageCompose, pressing reply, reply all, or forward and then selecting
back without writing or modifying any part of the message will no longer
increase the draft count. Additionally, entering the compose window and
immediately rotating the screen before pressing the back key no longer
increases the draft count either.

Bug: 4584605
Bug: 4501806
Change-Id: I74db3f05d696b23fa7d0d64ae87e06fade4c57ee
2011-06-20 11:50:38 -07:00
Ben Komalo
a355a4abe2 Cleanup and collapse some methods together.
Change-Id: Ida38b63362c50052064d7a5342febfe9e4a9c89e
2011-06-20 11:30:24 -07:00
Ben Komalo
99401ebea7 Remove a layer of callback in inbox finder.
I'm changing it so that inbox finding happens at an earlier stage so
that the UIController.open() methods can be simpler. Specifically: I
want them to just always accept a mailbox, and not have to deal with an
intermediate state where it's still looking for a mailbox.

Change-Id: I1c5be783859a3bee7e46007e778de13eb1685cbe
2011-06-17 19:44:10 -07:00
Ben Komalo
facd131fad Merge "some brain dead typing shortening" 2011-06-17 19:42:06 -07:00
Ben Komalo
36f89da544 some brain dead typing shortening
Change-Id: I9342e8da52b412fd844b98ff76e61a9e4f9c5af7
2011-06-17 19:20:20 -07:00
Marc Blank
ed1dc9ee72 Support "Load More" for IMAP search
Change-Id: I47e5fd1fab421026ee52af72ba56338c69e9b467
2011-06-17 15:43:18 -07:00
Ben Komalo
ac11e3bb99 Some re-arrangements in UI for search.
This moves the logic for performing the search closer to where it will
actually happen (i.e. on Intent resolution). A lot of this is still
temporary code. I will follow up with some larger changes to extend the
UIController API so it doesn't have to do hacks internally.

Change-Id: I1eb84d26ee3dcbfa0b68dbd37dcb0a6180452962
2011-06-17 11:55:35 -07:00
Ben Komalo
f62fd3fd17 ensure that search mailboxes don't have parents
This causes issues in the mailbox list when trying to auto navigate to a
search mailbox

Change-Id: Ie4e43f20ec662a7c9304dd906ba5a58560cba9f5
2011-06-17 11:42:14 -07:00
Marc Blank
0b34643204 Merge "First implementation of IMAP search" 2011-06-16 20:27:16 -07:00
Marc Blank
627bc6ed57 First implementation of IMAP search
* Broke up synchronizeMailboxGeneric into three pieces; it's still
  horrible, but this at least stops my eyes from bleeding
* Remove unused method/tests from Folder interface

Change-Id: Ib4d979536be657137cf70ca535cf429d707be41b
2011-06-16 20:26:52 -07:00
Mindy Pereira
579d8d5da5 Merge "Integrate chips into Email." 2011-06-16 17:43:47 -07:00
Mindy Pereira
87763f0ae8 Integrate chips into Email.
Change-Id: Ice037a55a169037f725a667fad7714c7e9580b86
2011-06-16 17:41:04 -07:00
Ben Komalo
cb24e515b7 Add one more error state to certificate process
When the KeyStore fails to give us back a certificate for any reason (it
was removed from the keystore perhaps), propagate the error back up.

Change-Id: I4f0ef783c1665589cc8ccb43d95da43a297a3e9a
2011-06-16 16:14:03 -07:00
Ben Komalo
8401dba404 Merge "Handle upgrade from existing device admins" 2011-06-16 15:06:57 -07:00
Ben Komalo
aa0a355397 Handle upgrade from existing device admins
This ensures old admins that can't control the camera doesn't try to do
so

Bug: 4686257
Change-Id: Ia2bb8bf2ccf9fb3d1d45ce1ba0affd2ccc9822a9
2011-06-16 14:40:15 -07:00
Marc Blank
1579b7864a Merge "Fix Store caching" 2011-06-16 13:58:24 -07:00
Makoto Onuki
c16d060bda Merge "Switch to synchronous transaction." 2011-06-16 11:48:03 -07:00
Makoto Onuki
2a292e235c Switch to synchronous transaction.
Change-Id: I02639276e4cedd62d288433acb0dfaf34c7a4e76
2011-06-16 11:40:37 -07:00
Ben Komalo
f4dbbf1099 Indicate to the user when a cert error happens.
This introduces an exception which needs to be thrown from a KeyManager
when it tries to establish a connection with a server requesting a
certificate.

Change-Id: I06dfad7789ed5d320b630e7e4380e15da42a48df
2011-06-16 11:37:23 -07:00
Ben Komalo
d09cff0888 Make "don't allow camera" a supported policy.
This sends the bit to the DPM. Separate changes have been/will be made
to change the provision parser and support it in the DPM.

Bug: 4185316
Change-Id: I44872ceb095a28539b047a0641cc499c7186a9b3
2011-06-16 10:44:48 -07:00
Marc Blank
f65bdbdaf5 Fix Store caching
Bug: 4671090
Change-Id: I07413eb713c564f6dbcac45091357153cfe19a5d
2011-06-16 09:24:44 -07:00
Ben Komalo
b40bdb17df Merge "Introduce a cert selector in exchange settings UI." 2011-06-15 11:17:40 -07:00
Daisuke Miyakawa
48e977aab6 Merge "Send email usage feedback to ContactsProvider" 2011-06-14 20:57:27 -07:00
Ben Komalo
82e0e1c4c5 Show sync window prefs for EAS only.
Bug: 4651025
Change-Id: I1633a2a94e28466686e90df4ff0cdebaaa1a81df
2011-06-14 19:10:28 -07:00
Daisuke Miyakawa
3975a28918 Send email usage feedback to ContactsProvider
This enables the provider to count the number of contacted
per email address basis, which should improve auto-complete
quality.

Bug: 4371572
Change-Id: I4f0e586d3edff5a460e33dc7d9f9680119a8d568
2011-06-14 19:06:47 -07:00
Ben Komalo
e4ca576ab0 Low-cost minimal fixes to make phone UI usable
This is a stopgap fix prior to getting designs in to at least make the
various message view components visible on screen so people can at least
use the app.

Note that this also removes reply all/forward, as per the design (the
idea is you can switch in the compose view, so we don't want to waste
real estate in the message view).

Bug: 4644072
Change-Id: I86f041678373a0fbc79a2e135a47cd1e5b1357c7
2011-06-14 18:07:32 -07:00
Ben Komalo
7014f7d329 Introduce a cert selector in exchange settings UI.
This simply allows the user to select a certificate from the KeyChain to
use for credentials.

Text and UI not finalized.

Change-Id: Ib86abc3c2e899640218122caa12308dc9646dab6
2011-06-14 17:34:09 -07:00
Makoto Onuki
6f8ed24c09 Merge "Add "search mode" to the action bar" 2011-06-14 15:20:30 -07:00
Makoto Onuki
0f27632749 Add "search mode" to the action bar
- Instead of the search dialog, show the search widget on the action bar.
- Launches a new activity for search, but still uses the temporary search code
- Search still works only on two-pane.

Change-Id: I1d36ad3416c7dff9579cf37e40e49e31c9d99219
2011-06-14 15:13:32 -07:00
Ben Komalo
22409fcffa Pass HostAuth when validating an account.
Since HostAuth is fully Parcelable, no sense passing the individual
fields.

Change-Id: I4d8fd2bbe7b47e8f1e2ff00c8c0cad8429eec159
2011-06-14 14:47:18 -07:00
Marc Blank
f5418f1f93 Move Account into its own top-level class
Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
2011-06-13 15:37:22 -07:00
Marc Blank
69111b1e19 Fix broken account creation
* What the heck is mCacheLoginCredential for??

Bug: 4597765
Change-Id: Idcb6d323ba0e90f3fe6828f59fe36ec54e4cf40c
2011-06-12 10:06:51 -07:00
Todd Kennedy
e1fe562e26 Merge "Don't include sourc mailbox in the move-to dialog" 2011-06-10 10:21:11 -07:00
Todd Kennedy
0f747de9a7 Don't include sourc mailbox in the move-to dialog
When moving messages using the move-to dialog, exclude the source folder from
the list of valid targets.

bug 4585929

Change-Id: Id02c05f38d1623f0c059d84e50ee1b51a1cdec1a
2011-06-10 10:20:31 -07:00
Marc Blank
541e98a4e4 Merge "Remove storeUri's except during auto-setup" 2011-06-09 15:21:13 -07:00
Todd Kennedy
0ec545048a Add recent header if there are zero recent items
For the one pane view, it's possible that an account has zero items in the
recent list (this is only possible for accounts that do not have neither
a "drafts" nor a "sent" folder). In such situations, we will still want to
have some header to distinguish between the accounts and the "show all
folders" item.

Change-Id: Ic5d6368b88ba4a28904c3b78a6489d06345a901e
2011-06-09 14:58:07 -07:00
Marc Blank
85e4c101b0 Remove storeUri's except during auto-setup
* Remove per-store limitations
* Use constants for VISIBLE_WINDOW, rather than having the
  potential for differences between Stores

Change-Id: Idd5e0874bba6e3390e4f093bcb03f4b1bb399c11
2011-06-09 13:34:43 -07:00
Todd Kennedy
e1e63d4387 Merge "Set proper default values for new mailboxes" 2011-06-09 11:46:26 -07:00
Todd Kennedy
9d2dae6750 Set proper default values for new mailboxes
When creating mailboxes (specifically 'drafts' or 'sent'), we need to ensure
that its default values for flags & server key are set correctly. In most
cases this is "okay" because the mailbox will be created on the server and
the values for these fields will be reset. However, in cases where system
mailboxes cannot be created on the sever (for example, the 'drafts' folder
on any POP3 account or an IMAP gmail account), these default values do not
get updated and we are unable to view the contents of these mailboxes.

bug 4356871

Change-Id: I9e6a394145f471b555c5827d5114bca243dbc37c
2011-06-09 11:39:14 -07:00
Ben Komalo
479fdf03aa Guard against invalid selections in spinner
This is a stop gap fix for b/4584196
There was a race condition in which the actionbar callback happened
prior to the fragments being ready, and so any callbacks on a mailbox
would explode (and the spinner mistakenly thought the header was a
        mailbox)

Change-Id: Id0a24d252472faf97088175b5c413ef554dc3b76
2011-06-09 11:38:11 -07:00
Todd Kennedy
b4f6404cd1 ignore state loss during fragment transaction
We don't need to worry about state loss here. If the fragment state is already
saved, the loader will re-fire when the fragment resumes and we'll proceed to
mailbox selection / account list as expected.

Also; only add the account selection fragment to the back stack if there is
more than one account.

bug 4558901

Change-Id: I38290fa378ac80ef5a5c8cf25c38b6e820715366
2011-06-09 09:52:11 -07:00
Todd Kennedy
964c0caf74 Merge "Don't display count for items with invalid IDs" 2011-06-08 16:44:20 -07:00
Todd Kennedy
a26fe0f150 Don't display count for items with invalid IDs
Change-Id: Id82b0a96a718f27d51d205b066a282444d6bd939
2011-06-08 16:43:37 -07:00
Makoto Onuki
3b91d0ce0f Merge "Use fragment transition animation for 1pane." 2011-06-08 16:24:02 -07:00
Todd Kennedy
7986cf6737 Merge "Fix where recent mailboxes are displayed" 2011-06-08 15:47:49 -07:00
Makoto Onuki
519b488123 Use fragment transition animation for 1pane.
Change-Id: I5f62abf87580876c75c8578da1d4a46cb92bce94
2011-06-08 15:34:41 -07:00
Makoto Onuki
3e343286d7 Merge "Back navigation on 1 pane" 2011-06-08 14:46:59 -07:00
Makoto Onuki
e06e122441 Back navigation on 1 pane
- Allow going back from the message view to the message list with restoring
  all the state on the message list. (batch selection and scroll position)

- Also make "back" work for the message list <-> mailbox list navigation,
  but only 1 level at most.
  (Only the system back key works for this; the action bar home icon will
   not.)

- As discussed offline, it uses our custum "back stack" (which can hold
  at most 1 fragment) using the new fragment APIs, attach and detach.

- Removed commitFragmentTransaction() from the base class, as now there's
  nothing really in common between the two UI controllers in terms of how
  they use the fragment transaction.

Change-Id: Id626ce99beb1f4dceb999dc04bf7d3e5d57a8198
2011-06-08 14:45:57 -07:00
Todd Kennedy
85bd26e210 Fix where recent mailboxes are displayed
For the non two pane devices, we only show the recent mailbox list in the
account spinner (and not on the mailbox list fragment).
For two pane devices, we only show the recent mailbox list in the mailbox
list fragment (and not on the account spinner)

Change-Id: I1094626532ad6d6548ef441929d94546c97304a3
2011-06-08 14:21:00 -07:00
Todd Kennedy
3161f1a3f2 Merge "Lock cache puts while running tests" 2011-06-08 13:01:39 -07:00
Todd Kennedy
78849fd388 Lock cache puts while running tests
Change-Id: I04c88ee70f9d72252fd1c5114d560a28fcee1b56
2011-06-08 11:51:55 -07:00
Ben Komalo
313586c8eb Introduce client cert alias for HostAuth.
Some email servers require client certificates to be presented to
establish an SSL connection. While this certificate will be maintained
by the system key store, we need to store the "alias" of the certificate
stored in that system store.

Wiring up to use the actual alias will be done in future CL's. It is
currently unused.

Change-Id: I8d1290151342daea9ceb0df8a4088405b44faa81
2011-06-07 18:48:23 -07:00
Makoto Onuki
4431a74be5 Merge "Message list: Hide CAB when in back stack." 2011-06-07 18:46:59 -07:00
Makoto Onuki
ab2dba417a Message list: Hide CAB when in back stack.
Because isViewCreated() is used by updateSelectionMode() which is called from
onDestroyView(), we can't use getView() to determine if the CAB should be
shown.

Change-Id: I8d868998031115800766000fb0128f1d1d3541cd
2011-06-07 18:23:47 -07:00
Todd Kennedy
7305cf5c8e update account spinner properly
Fixes two issues:
1. if a recent folder was selected from the spinner, the user could not
re-select it (even if they navigated to another mailbox using the mailbox
list) unless they manually selected another element in the spinner
2. the recent item "show all folders" did not set the associated account
position, so, when selecting that item, the spinner was not showing the
correct view.

Change-Id: I469f9f28aebd36a348534def28a4c476c0df366d
2011-06-07 17:12:34 -07:00
Todd Kennedy
dc6928d798 Add recent mailboxes to the mailbox list
Change-Id: I84ee9d0da43ccac4d10e5122f57583c4b39cf65d
2011-06-07 16:40:12 -07:00
Todd Kennedy
1b404f4fff Collapse MailboxAdapter & MailboxFragmentAdapter
MFA was the only subclass of MA and the abstraction no longer made sense.
Collapse the two into a single adapter class.

Change-Id: I32c6f027bc37f3da08626f743c3f494e5f48c3f0
2011-06-07 14:34:16 -07:00
Todd Kennedy
96e44859cf Merge "Always add "recent" header for one pane view" 2011-06-07 14:23:50 -07:00
Makoto Onuki
f329665e10 Merge "Remove "Show all folders" menu item." 2011-06-07 14:18:05 -07:00
Makoto Onuki
f1097ba7e9 Merge "Revive message view specific menu options" 2011-06-07 14:17:18 -07:00
Makoto Onuki
ed14960af5 Merge "New method to see whether 1-pane or 2-pane UI..." 2011-06-07 14:06:57 -07:00
Makoto Onuki
c6bb2ab553 Revive message view specific menu options
Revive the delete, move, mark unread options

This was lost during the refactoring.

Bug 4483764

Change-Id: Ic8d79f926aac303b3ff7477019cd05c29d614627
2011-06-07 14:00:43 -07:00
Makoto Onuki
101f929b3c Remove "Show all folders" menu item.
Now the account spinner has this.

Change-Id: I95e771e512f6c70ea9ddd8084c29a2f99b4cd758
2011-06-07 13:50:44 -07:00
Makoto Onuki
347ae23b69 New method to see whether 1-pane or 2-pane UI...
should be used.

From now on, UiUtilities.useTwoPane() should be used to see which UI
should be used.

You can pass the DEBUG_PANE_MODE extra when launching Welcome
to force which UI mode to use.  (See the comment inside Welcome.)

Change-Id: Iefa3737e4979eb55f7986a9033ff9c6266d32f52
2011-06-07 13:41:42 -07:00
Todd Kennedy
132307281d Always add "recent" header for one pane view
The one pane view will always have something in the recent list (either the
default recent list or the "all folders" item).

Change-Id: Ic264b59dc25504a8ce75bea6efae53a0d5dede87
2011-06-07 13:28:01 -07:00
Todd Kennedy
da3d04ea31 Add ability to create headers in the mailbox list
Change-Id: I9d1054056db7b6ac993570adcc4adc4cc6699e9c
2011-06-07 12:01:35 -07:00
Makoto Onuki
ab40c98821 More work on fragment install/uninstall.
- Now we "uninstall" a fragment in Fragment.onDestroyView.
  i.e. a fragment transaction is actually executed.
- Maintain our own "about to be removed" fragment list to avoid
  double removal of a fragment.

Change-Id: I61328e0a09a7af00cbb0e6ba10a2d39c11b5c3dc
2011-06-07 11:13:37 -07:00
Makoto Onuki
cb530b4e91 Merge "Use the CursorWithExtras pattern for the message list." 2011-06-07 11:12:31 -07:00
Todd Kennedy
a09ac7d417 Implement account spinner recent list for one pane
This adds the default recent list and 'show all folders' to the one pane UI.

Change-Id: I877f854ff4f9c7440cbd40f2a9ded8aba4002656
2011-06-07 10:04:59 -07:00
Todd Kennedy
a757aaa055 Properly display spinner when necessary
Previously, we were deciding whether to show the spinner if the returned cursor
had more than 1 element. However, the cursor would _always_ have more than one
element because it contains a header in addition to the account information.

We now save away the number of accounts and the size of the recent list into the
cursor so we can use those counts to determine if the spinner should be shown.
Both of these counts are necessary as we want to show the spinner even if there
is only a single account as long as it has at least one recent mailbox.

Change-Id: If428c496a548a25f6b5cd7301ddb5c0d6876750c
2011-06-07 09:33:19 -07:00
Todd Kennedy
e392418840 Add recent mailboxes to the account spinner
The ability to change mailboxes using the spinner is currently only implemented
for the two-pane UI. one-pane implementation will come in a future CL.

Change-Id: If72e9d9d607508553c918f5523e748e8a481ff84
2011-06-07 08:48:37 -07:00
Makoto Onuki
63a206ea56 Merge "Manually restore list view state." 2011-06-06 17:14:04 -07:00
Makoto Onuki
41878c2813 Use the CursorWithExtras pattern for the message list.
This will make the message list a lot snappier.

We were using two different loaders for the message list; one is to load
the meta information and the other to load the actual message list.

Unify them using the CursorWithExtras pattern.

Change-Id: I02957bbca1b1fb74ca6eca14ad2535dfdbf03a5a
2011-06-06 16:34:03 -07:00
Makoto Onuki
345a61d0b9 Manually restore list view state.
Bug 4532222

Change-Id: I6f3394b7ffd55b32e1932e3e425cc0d0ae720e27
2011-06-06 16:13:16 -07:00
Todd Kennedy
47806a2244 Merge "Fix filtered query" 2011-06-06 15:11:29 -07:00
Todd Kennedy
3a1e874a9c Fix filtered query
we need to return 5, post filtered, results. previously, we were returning
5, pre filtered, results. Also add a test to catch this condition.

Change-Id: Id25f4bf79081c42a2012e0e51b36142120c83b20
2011-06-06 14:58:39 -07:00
Makoto Onuki
d42b3222fb Merge "Make message list behave nicely when it's in back stack" 2011-06-06 14:33:19 -07:00
Todd Kennedy
69461503fb Add "Accounts" header to the AB spinner
Change-Id: I35e4b7295db16db803ede084cf65fa3f2115f770
2011-06-06 14:11:09 -07:00
Makoto Onuki
296d7d3614 Make message list behave nicely when it's in back stack
- Hide CAB when it has no views.
- Stop pending tasks and refresh callbacks when it's paused.

Change-Id: Idaae9061237ce9f923c002d659e8e12407e4bad1
2011-06-06 10:39:05 -07:00
Todd Kennedy
f04c832f23 Add ability to track mailbox recency
Change-Id: I1bcc7928ea7065a5daa262b7cea7ee3e21981675
2011-06-06 10:30:01 -07:00
Todd Kennedy
7d9d3a220a Merge "Add new column to table creation method" 2011-06-03 16:48:54 -07:00
Todd Kennedy
2e112b2d12 Add new column to table creation method
Change-Id: I2c6fe80d06e54dbd10eba41f0a0aa758baffb1b0
2011-06-03 16:47:39 -07:00
Makoto Onuki
696fa78cb3 Don't enable FragmentManager logging.
Change-Id: Ie02ece80df7832c609cffb64a4b0626c6b8a77b5
2011-06-03 15:15:01 -07:00
Makoto Onuki
cc881b744b Remove the hidden newer/older buttons from 1-pane.
We'll implement swipe and this view is not used on 1-pane anyway.

Change-Id: Ib1d9b44dd530159377f3e5f883188832de30482f
2011-06-03 14:25:10 -07:00
Makoto Onuki
03b863d68e Merge "Implement 1-pane navigation." 2011-06-03 14:16:49 -07:00
Makoto Onuki
3d9b8e76f0 Implement 1-pane navigation.
- Now that fragment useage is simplified (e.g. no new fragment
creation for nested mailbox navigation), most of the fragment
operation code for 2-pane is reuseable for 1-pane as well,
so moeved it to the base class.

- Temporarily added "Show all folders" as a menu option on 1-pane.

- Added "opener account id/mailbox id" to the message view fragment.
They are not used by the fragment itself, but they're used
by the UI controller for the back navigation.  (And now the UI
controller doesn't maintain the current IDs by itself; rather
it gets them from the currently-active fragment.)

- Use async fragment transaction on 1-pane too, now that it always
gets the current state from the active fragment.

- Changed the timing when we install fragments from onAttachFragment
to fragments' onActivityCreated.  So now all installed fragments are
created.

TODO Now that all installed fragments are guaranteed to be created,
remove all special trealment for the fragment argument accessor.
(They were meant be safe to call before onCreate, but it's not
necessary any more.)

Change-Id: I0ed100c3f0b460835b164c0dc908ea483a4e46ee
2011-06-03 13:59:50 -07:00
Jorge Lugo
8f54b2f135 Merge "Fixed reply-all bug" 2011-06-03 10:23:35 -07:00
Jorge Lugo
15842c522e Fixed reply-all bug
Upon hitting reply all, all email addresses except that of the source message sender
go in the CC: field. Previously they all went in the TO: field. Updated 3 tests
in MessageComposeTests.java (testReplyAllAddresses1(), testReplyAllAddresses2(), and
testReplyAllAddresses3()) to reflect this new behavior.

Bug: 4534058
Change-Id: I852daebdd8843a45f685eecc67f757c87925bb6c
2011-06-03 10:16:05 -07:00
Todd Kennedy
4c4b088a21 Merge "Add "lastTouchedTime" column to the mailbox table" 2011-06-03 09:26:14 -07:00
Todd Kennedy
9dcb72e1ec Add "lastTouchedTime" column to the mailbox table
The last touched time will track the last time a message within that mailbox
was read. This will be used for the recent list.

Change-Id: I97a5fda52fd09b416fc3278a11a87b807da05c9c
2011-06-03 08:51:25 -07:00
Marc Blank
aaf12a5e75 Merge "Update searchMessages API" 2011-06-03 08:39:45 -07:00
Marc Blank
75a754660e Update searchMessages API
* Store various search parameters in a new parcelable class

Change-Id: Iadec6a803b1bf17d89cd401c3fca1cb0ad3340d4
2011-06-02 21:41:17 -07:00
Todd Kennedy
bc7cd16ec2 Fix NPE if message displayName is null
the spannable string builder assumes the given char sequence is non-null.
we now ensure that's always the case.

Change-Id: I12e7081e5348d797feab6ad17452b73a52feaf13
2011-06-02 15:27:48 -07:00
Todd Kennedy
cf772cc8ad update UX according to specs
Display the mailbox name as the widget title and the account name
as the secondary title.

Change-Id: Ibb36d4897e02b8cbc501eae9b27ee8381fe91e1a
2011-06-02 12:03:40 -07:00
Todd Kennedy
b9afe5760c Merge "Fix NPE accessing fragment arguments" 2011-06-02 12:02:50 -07:00
Todd Kennedy
8121876fef Merge "Add proper wording for "all accounts" picker item" 2011-06-02 11:56:05 -07:00
Todd Kennedy
f47255f6fc Fix NPE accessing fragment arguments
Change-Id: I417927568c2407f1d183f3d112d0761f57b5bb12
2011-06-02 11:55:24 -07:00
Todd Kennedy
b19516e248 Add proper wording for "all accounts" picker item
Per discussion w/ UX.

Change-Id: Ida4a11828d2bb157c4bc0c66f84d877013f0e4d7
2011-06-02 11:54:25 -07:00
Makoto Onuki
5dc07ad26c Merge "Rework on inbox lookup" 2011-06-02 11:01:09 -07:00
Todd Kennedy
2f5ee8e2d1 filter mailbox list for the widget
The mailbox list for widget configuration should only include two mailboxes --
1. an account's full inbox (both read & unread) and 2. an account's unread
inbox (similar to #1, but, only contains unread messages)

This also applies for the combined account view.

Change-Id: I5640fd8572d385703db04ca613f5b1f35f3952da
2011-06-02 10:36:29 -07:00
Makoto Onuki
f015cc00ed Rework on inbox lookup
- Moved MailboxFinder logic to UIControllerBase so it can be reused for 1-pane.
- Make sure MailboxFinder runs only while the activity is resumed.
  (we don't want to get callbacks when it's not, because we can't perform
  fragment transactions.)
- Make sure MailboxFinder is restarted if the activity gets re-created
  while it's still running.

Bug 4522010

Change-Id: I4486ecfa44dd700d28c424bc5eb7104d3043cf7d
2011-06-01 19:25:14 -07:00
Makoto Onuki
47d6f782de Merge "Switch to async fragment transaction for two-pane" 2011-06-01 19:16:15 -07:00
Makoto Onuki
61b0605a0b Merge "Change on the mailbox list item background." 2011-06-01 19:16:07 -07:00
Makoto Onuki
2912bed923 Merge "Remove unused method." 2011-06-01 18:41:18 -07:00
Makoto Onuki
3a8a1b451d Change on the mailbox list item background.
- The drawable for the active drop target background was static, and
  shared between items.  But StateListDrawable has inernal state and
  shouldn't be shared.

- Also make sure not to set the same background more than once.

For some reason, they will cause visal glitches when we switch to synchronous
fragment transaction.

Change-Id: I10fede2ad4e595f74d61768907b5b70fd5d4da21
2011-06-01 18:40:50 -07:00
Todd Kennedy
7f4cf3c46b Hook account/mailbox picker to widget
now when adding a widget to the desktop, you can pick the account
and mailbox.

Change-Id: Id3d2c21b349af58459304ac5a068402d67f4d0f7
2011-06-01 18:24:47 -07:00
Makoto Onuki
c7024f73ec Switch to async fragment transaction for two-pane
One-pane will follow too, but not soon.

Change-Id: Ie018f728273e9fa4a7e6cf3116a2a2afebcaecc5
2011-06-01 18:11:12 -07:00
Makoto Onuki
147e41d00a Remove unused method.
This should have been removed in I2c23651d.

Change-Id: I8dd90a0ba55e701225cdaf2e5b7c5fe92a417525
2011-06-01 17:56:16 -07:00
Todd Kennedy
60abc35a72 Merge "Loader query should use mailbox key" 2011-06-01 16:01:51 -07:00
Todd Kennedy
0b4602b5d9 Loader query should use mailbox key
The loader query should be testing against the mailbox key and not the message
id.

Change-Id: Idcc31b4e84db55c8c6a95e1141740371e1390c81
2011-06-01 15:52:15 -07:00
Todd Kennedy
5c453db639 Merge "Save widget config to shared preferences" 2011-06-01 15:19:53 -07:00
Todd Kennedy
fa1b3a8f37 Save widget config to shared preferences
The way the config activity communicates with the widget will be through
shared preferences. We now read / write shared preferences for widget
configuration. One step closer to the configuration activity...

Change-Id: I7c54259d84ad8d304a61652af5b3edff4c7d67db
2011-06-01 15:14:55 -07:00
Makoto Onuki
3bfd5734b8 Merge "MailboxListFragment: In-place nested mailbox navigation" 2011-06-01 15:11:09 -07:00
Makoto Onuki
844bf74504 MailboxListFragment: In-place nested mailbox navigation
Now we reuse the same instance of the fragment for nested mailbox
navigation.  (Don't use fragment transaction)

"CursorWithExtras" now only has the child count, so I removed the
bundle version and added a concrete class to MailboxFragmentAdapter.

With this CL the nested mailbox navigation on 1-pane should work, but
not back navigation.  (Back press event isn't connected to the
fragment yet.)

Change-Id: I2c23651d9c8edb5fe062c68bbb9b462c8949ded4
2011-06-01 15:06:42 -07:00