Commit Graph

40 Commits

Author SHA1 Message Date
Mindy Pereira d6decef1d2 Make search interaction match gmail.
shows results list in portrait on tablet.
shows split in landscape on portrait.

Since email currently has no concept of saving the currently
selected message on orientation changes, there are some issues changing orientation
and restoring to the correct search state.

fixes coming in the next cl.
Change-Id: Ib0b98c4018c2ae0fabc2c78dfce4d3a197837d4f
2012-05-01 11:11:01 -07:00
Marc Blank 03cd72805d Revert to old Email app
* These are the last sources in the ICS-MR1 tree

Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
2012-04-25 13:58:23 -07:00
Marc Blank 9227dbbf0f Add back attachment loading callbacks for IMAP
* Remove newly unused code

Change-Id: Ifea2193deaf35734a031500c807ce9e3abd88fb1
2012-02-19 15:21:25 -08:00
Marc Blank 656ebc2982 Don't crash in EmailActivity if no accounts exist
Bug: 5044497
Change-Id: Ied760ea385015a3c7df0a0d1e68ebc32dc5fb957
2011-11-09 17:39:32 -08:00
Ben Komalo 28e496daef Respect system font size in message list.
- This makes dimensions according to scaled font sizes, and also resets
the activity properly (invalidating drawing caches) when that font size
happens.

Bug: 5287961
Change-Id: I04cf117b027befd6a065edeadf95187f62fffc8a
2011-10-13 15:54:14 -07:00
Ben Komalo 0e6a521747 Move IntentUtils to emailcommon.
This is needed so Exchange can fire up Email activities.
No change other than the move.

Bug: 5122497
Change-Id: I6ee3f61654745fafd444314ecf75eb8ae6bbd01d
2011-08-08 14:39:19 -07:00
Marc Blank b8f672465a Merge "Remove unnecessary EmailAsyncTask" 2011-07-18 09:51:01 -07:00
Ben Komalo 9f05f72ab3 Fixup settings entry points.
- include settings in menu in message view
- remove "show all mailboxes" from message view
- rename "Account Settings" to "Settings"

Bug: 5039294
Change-Id: Ic2dcbe8fe6e2bd10cc5d790a74c49a7159b59cab
2011-07-17 16:41:55 -07:00
Marc Blank f29221efc9 Remove unnecessary EmailAsyncTask
Change-Id: Ifb13f2f57016191f7ef409aa656bf9cb840f42c9
2011-07-17 12:23:49 -07:00
Makoto Onuki 1ddc2ca4a7 Per-mailbox settings
- Use PreferenceActivity, in the old style, meaning without PreferenceFragment.
- If setting Inbox, change the account settings instead of mailbox settings.
- Use the DialogWhenLarge theme, meaning it's a full-screen avitity on the
  phone and a dialog on the tablet.
- Also fixed the bug that we the menu items that are made invisible by
  UIControllerBase may be made re-visible by the 1-pane controller.

TODO The menu item shouldn't be shown for non-syncable mailboxes.

Change-Id: I02b2faf6f593e1e2eb370217c27801aa58ca7e6c
2011-07-10 12:09:51 -07:00
Makoto Onuki 50d934360d Fix the "onPostExecute executed even when cancelled" issue
Renamed onPostExecute to onSuccess and made sure it won't called
if a task is cancelled in time.

Also removed isCancelled().  To implement it right we should make sure
that onPostExecute() isn't finished when setting mCancelled, but it's a bit
of a pain to implement right, and we don't really have to use it.

Change-Id: I3a0baf504506ffc4952a5553f7098a8415842fa3
2011-06-29 10:22:38 -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
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
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
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 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
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 36f89da544 some brain dead typing shortening
Change-Id: I9342e8da52b412fd844b98ff76e61a9e4f9c5af7
2011-06-17 19:20:20 -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
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
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
Marc Blank f5418f1f93 Move Account into its own top-level class
Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
2011-06-13 15:37:22 -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
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 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
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
Makoto Onuki 54c91f00d7 Use IllegalArgumentException, not InvalidParameterException
Because IllegalArgumentException is the standard one.

Change-Id: Ib4d0bfa88a3d4218148a7cb248d9baa2124a72ba
2011-05-16 17:48:46 -07:00
Ben Komalo 53ea83ebf9 Move Mailbox to top level class.
No other changes made.

Change-Id: I3d8f3c521dc0d902be313b25252b4b6a4a96e7ee
2011-05-13 17:42:02 -07:00
Makoto Onuki bfac9f2e8a Move some of the log constants from Email to Logging
Change-Id: If9f4e4e3adcdef897a0d6a4e153bb446a8b24fdd
2011-05-13 14:24:38 -07:00
Makoto Onuki 94331c96d9 Remove phone activities and implement one-pane
The primary purpose of this CL is to remove phone activities, so the
one pane implementation is very much temporary and primitive, but it
should offer minimal operations.

Change-Id: If57f81db7c605c95664d49044a5cc082beda59c0
2011-05-11 15:35:27 -07:00
Makoto Onuki f5492ea991 Add 1-pane UI controller
Added the base class for the UI controllers and the 1-pane implementaion,
which is almost empty at this point.

The old phone activities still exist and will be used on the phone by default.
To use the new activity (1-pane EmailActivity) on the phone, use the following
comamnd.

adb shell am start -a android.intent.action.MAIN \
    -d '"content://ui.email.android.com/view/mailbox"' \
    -e DEBUG_PANE_MODE 1

Change-Id: Id1fe85d4517778afc967d7d5e17e1299dd1bfefd
2011-05-10 11:28:00 -07:00
Makoto Onuki c0042a2278 Merge "Extract action bar related code" 2011-05-09 09:24:49 -07:00
Makoto Onuki ad71b358c6 Extract action bar related code
...so that we can easily reuse it for the one pane UI controller.

The one pane controller should eventually have its own action bar
controller, but we can use it for the time beeing, until we get
more detailed UI spec.

Change-Id: I10c92963350dad9eb834fd7474c597aedad5eb80
2011-05-05 17:21:07 -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
Todd Kennedy 075feb4556 Implement new nested folder mocks
Change-Id: I7c0c1d41b7a40d83e1237ba31d5f7949945c7e1e
2011-05-05 10:26:54 -07:00
Makoto Onuki 166b90a2f2 Fix refresh animation
Bug 4355229

Change-Id: Idfbc46f03f9cd753811179df760633db52c6f09c
2011-04-28 13:07:49 -07:00
Makoto Onuki 8112732376 Move more UI stuff from activity to the UI controller
- Now all the UI stuff is owned by the UI controller
- Except temporary UI (exchange search and per-mailbox-settings)
- Except error banner
  This should be moved too eventually, but I consider it as a low-priority.
  I'll leave it as-is for the time being.
- Moved RefreshTask too.  The spec for refresh has dependency to the UI.
  (i.e. implicit refresh of the mailbox list may not be necessary for
  the phone.)

Also renamed the main activity to EmailActivity.

Change-Id: I00585856bdacf69aa4e104178a5cf7352ff6d592
2011-04-28 10:59:55 -07:00