Commit Graph

78 Commits

Author SHA1 Message Date
Makoto Onuki 4d4bb9a849 Fix auto-refresh of mailboxes.
Removed the ugly doAutoRefresh() and byExplicitUserAction.

The intention for these was to supress auto-refresh when the message list
opens without any explicit user action, e.g. due to screen rotation.

However, now that we have the RefreshManager.isMailboxStale check with 5
minutes duration, this check is not really necessary.  Let's just always
refresh mailbox if it's stale.

Bug 3493134

Change-Id: I6d0365ed7f8092304117d5f619d570b828edf76f
2011-02-28 15:08:08 -08:00
Andy Stadler f489413142 Add contextual dialogs after notifications
* When security settings notification is clicked, inform user that
  they need to change settings (before dumping them in security
  settings.)
* On an authentication failure, present a dialog to the user explaining
  that the username or password may be incorrect.
* When the device pin/password is expiring or expired, present a dialog
  to the user explaining that it needs to be updated.

Bug: 3238657
Change-Id: I8fca446fa3c1bf87a95938553dbdc362c3df220e
2011-02-18 18:23:18 -08:00
Marc Blank 31d9acbf06 Email split, part huit: Refactor constants, clean emailcommon
* There are three pieces to this CL (sorry):
  1) Move and/or rename some constants into emailcommon
  2) Move Utility to emailcommon, moving the few UI
     related utilities back into Email (FolderProperties
     and UiUtilities)
  3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
  the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
2011-02-14 12:18:10 -08:00
Marc Blank a7bc0319a7 Email split, part six: EmailContent
* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
2011-02-10 19:44:29 -08:00
Marc Blank 2193962ca2 Email split, part quatre: Move along, nothing to see here
* No code was harmed, er, changed in the making of this CL
* All that's happened is that code that is needed by both Email and
  Exchange have been moved into emailcommon
* This required import changes to many files, which explains the
  length of the CL

Change-Id: I4e12455ba057a4a8054fdbd0b578c73afa411c8a
2011-02-10 16:28:37 -08:00
Makoto Onuki 484d220b6e Make the refresh button animate in-place.
Turn the refresh button into an indeterminate progress icon
while refreshing.

Bug 3388138

Change-Id: Ic0406ff5b857243c3e1e475ddb8b305441eddbb0
2011-01-25 19:09:32 -08:00
Makoto Onuki 61e63111ba Show account name on error banner
For now just show the account name in parens.   I'll ask the design
team for a better layout.
(I don't want to change code too much at this point, so didn't add a
new view for the account name.)

Bug 3366546

Change-Id: I3a5314be4bdfacc2720093511eb03571e91fa963
2011-01-25 13:21:04 -08:00
Makoto Onuki 0c75f83f03 App icon on app drawer shouldn't restart the app
When launching Welcome and MessageListXL, make sure they start
as a "main" activity.  This fixes the reported bug.

Bug 3366537

Change-Id: I68facd739bd1dad8eeec52015b0720299d632e11
2011-01-19 16:37:19 -08:00
Makoto Onuki f7b8bc1ed7 Show newer/older in landscape as well, below message list
Now the button area is owned by the 3-pane layout, rather than the message view
fragment.

Bug 3327153

Change-Id: I9c262086c5a001cfe6e81b788c27d05d490c9830
2011-01-11 16:02:19 -08:00
Makoto Onuki f29ce4d37b Don't pass ACCOUNT_ID_COMBINED_VIEW to message compose.
If you do so, MessageCompose won't be able to restore an account, so it'll
use null account...

Bug 3324472

Change-Id: Ic0e615b31e21246e41f6f2c709a8422bef230040
2011-01-07 14:57:05 -08:00
Makoto Onuki dc1ac99210 Hide refresh button on combined view
Bug 3317656

Change-Id: I63f6fcd0aae29f01e40780bd7f69294e629aa888
2011-01-04 14:06:31 -08:00
Marc Blank cbdd9f78b2 Distinguish mailbox requests that are user requested
Bug: 3251757
Change-Id: Ie417ebf44c8b740db88e5854077782930359a958
2010-12-31 11:02:03 -08:00
Makoto Onuki 28d6e09575 Follow-up to the loader API change
This should fix the "attempt to re-open an already-closed object" exception
from SQLite.

(destroy()s don't have @Override becuase the base method is now depricated
and will be removed someday.)

Bug 3288666

Change-Id: I4780f6c8d89c7204b266608462c0833ad5af4e5f
2010-12-17 13:36:51 -08:00
Dianne Hackborn 80769cefb3 Prepare for some changes to LoaderManager/Loader.
Sorry it is a bit ugly, it is to allow this change to be
checked in prior to the first stage of the framework change
without breaking the build.

Change-Id: I1828579019ac0325d19c070a4c62cd79549e7d51
2010-12-16 13:20:39 -08:00
Makoto Onuki 303816534d Don't show app name on action bar
Need to hide the action bar title when showing account spinner.

Change-Id: Id85fa91f1b89fbd9d2a92bd2d175121176b8a2f0
2010-12-16 11:32:28 -08:00
Andy Stadler fd5a5f14ea Turn down email logging to shippable levels.
Change-Id: I8426743aebef2329c8958926d7b29abe1309feb0
2010-12-13 16:32:02 -08:00
Makoto Onuki aef9515ee7 Controller.Result callbacks should all have accountId
- Added accountId to loadAttachmentCallback/loadMessageForViewCallback

- Cleaned up LegacyListener/MessagingListener.
  Removed the constructors which take messageId and attachmentId, which
  are used to bridge loadAttachmentProgress, which the callsite doesn't know
  these IDs.  The inconsistency (only loadAttachmentProgress() uses the member
  messageId) doesn't look too good, so extracted this into a separate class,
  MessageRetrievalListenerBridge.

Change-Id: I46303e50df2b0e1fe8616e7c9cef632ac14f23aa
2010-12-10 18:11:44 -08:00
Makoto Onuki 45e04b009d Update error banner
1. Error banner now pushes down the entire screen, rather than covers it.
2. Switch to the new ObjectAnimator for the animation to achieve #1.
   (Traditional Animation doesn't do this)
3. Dismiss the banner when getting any callback with MessagingException == null
   and progress > 0, only when the account is the one that caused the last error.
4. MessageListXL now registers its own ControllerResult to detect
   connection errors, and more importantly, when they're cleared.

Bug 3240874
Bug 3240406

Change-Id: I07f8e2f589bb1d312859824f9ec398879003ba16
2010-12-07 16:49:26 -08:00
Makoto Onuki 6a858c1be2 Make widget open appropriate screen
Widget should open MessageListXL on tablet.

Bug 3253813

Change-Id: I5cfa63b571e443a0217bc9332bb4a76a039143ac
2010-12-06 14:43:51 -08:00
Adam Powell 4a54ec9b01 Update for ActionBar API change
Change-Id: I209a4409180f45146423254ed36a9859daa86547
2010-12-01 13:12:58 -08:00
Makoto Onuki 2201b38fe3 Add error message UI
Show an error message in a yellow bar at the top of the activity.

Bug 3230116

Change-Id: I45dad233c1ab52de365c8caedb4eeff29aefac65
2010-11-29 16:07:38 -08:00
Makoto Onuki 36cf701784 New back behavior
The home icon on action bar and the system back key work slightly differently
on portrait.

home: full-screen message view -> mailbox list + message list
back: full-screen message view -> expanded message list
      -> mailbox list + message list

Bug 3228524

Change-Id: I9bb598315ee829c6a8300a35d194a29c7a26291f
2010-11-24 14:42:27 -08:00
Makoto Onuki f108837c1d Show current mailbox name and unread count on action bar.
- Show them when the mailbox list is hidden
- Data flow:
  MailboxListFragment ->(Callback)-> MessageListXL ->
  MessageListXLFragmentManager, which controls the action bar.
  (I'm not too happy with this flow, but we can at least avoid
  issuing yet another query to get these data.)

Also related:
- On the combined view, show the unread count for account rows

Bug 3137891

Change-Id: I37fa1258d946329905bbbc0da905928bcf2f4cb1
2010-11-19 13:55:49 -08:00
Andy Stadler 6143d026c0 Re-enable activity progress indicator
Bug: 3137891
Change-Id: Iea65b69dd376fd0026cd53680b901805a07fa101
2010-11-17 23:19:36 -08:00
Makoto Onuki d2289c2f19 Three pane behavior changes
- Now pressing back on the message view on portrait expands the message
  list.  Pressing back again closes the message view and navigates
  to the mailbox list + message list view.
- Fixed the bug where the app icon on the action bar will lose the back arrow
  on screen rotation.
- Code clean up.

Bug 3137919
Bug 3198987

Change-Id: Ia452f90ebe5599a2a8de905f4dabec6bd3ceb4a2
2010-11-16 17:18:46 -08:00
Makoto Onuki 9e34bb73f7 Action bar: Use the app icon as back.
Bug 3137891

Change-Id: I3d8e10f7a3a7880518127c4ed582bc2b7c96c8d6
2010-11-11 17:03:06 -08:00
Makoto Onuki 931ca67a1f New message view command layout
UI Changes:
- "Move", "Delete" and "Mark as unread" became action bar commands.
- The message view bottom panel now only has "newer" and "older" buttons,
  with  the current position in the message list.  (shown as POS of TOTAL)
- The buttom panel is now shown only on portrait

Non UI changes
- MessageOrderManager now keeps track of the current cursor position
  as well as the total message count.

- Fixed the "move_action" string, which was wrongly marked as non-translatable.

Bug 3169454

Change-Id: I599543f9e11000a4ee283d31fbd407b2ab53ac44
2010-11-10 11:08:14 -08:00
Makoto Onuki 30ba828784 Make the account dropdown visible again.
Workaround for the framework issue that the app context doesn't
use the right theme.

Also removed the use of obsolete methods.

Bug 3169944

Change-Id: Ic8d3ba2edb9300df549cb902855025815021ff49
2010-11-05 14:06:29 -07:00
Makoto Onuki 7126e5ae53 Fix & clean up intent handling
- Make sure an account shortcut really opens the account by
  adding the FLAG_ACTIVITY_CLEAR_TOP flag to shortcuts

  * Shortcuts have to be re-created for this fix to take effect.

- Remove Welcome.createOpenCombinedInbox/OutboxIntent, which don't work
  with the new combined view.

  * createOpenCombinedInboxIntent() is not used already
  * createOpenCombinedOutboxIntent() is used, but is not final UI, so
    removing it is okay.

- Fix MessageListXL.actionOpenMailbox -- now it really uses the passed
  mailbox ID.

Bug 3144066

Change-Id: I2ee3f84c62a135351c10266c7ca6d5178c3a0ca2
2010-11-02 18:18:43 -07:00
Andrew Stadler cd09545b87 Provide runtime switch for GL acceleration
* new checkbox in debug fragment
* saved value in prefs so it's sticky
* each Activity calls a helper to enable/disable per that flag

Change-Id: I1af1ae9f401bc746cc97da00dfb0e06407b79d46
2010-11-01 16:16:27 -07:00
Makoto Onuki 730cc6724a Add "Combined view".
- Don't show combined mailboxes with regular mailboxes in the mailbox list.
- Add "Combined view" to the account selector instead.
- "Combined view" has all the combined mailboxes and accounts.
- Renambed these combined boxes.  (e.g. "Combined inbox" -> "Inbox")
- Regular account view still has "Starred" mailbox, but it's actually
  "combined" and not per-account.
- Re-order special mailboxes per latest wireframe.

Bug 3138004

Change-Id: I4c5860c6774b10c55ba0ca599373e51105432cf8
2010-11-01 11:51:51 -07:00
Makoto Onuki be1aa37dc5 Don't use sendMailCallback() -- don't track outbox status
There're differences between how SMTP and EAS use this callback.
We should eventually unify the behavior, but till then let's not
use sendMailCallback().

Bug 3116377

Change-Id: Ic5ecf16251c11ab2bd2e16e29bd417f1ece67f14
2010-10-22 15:45:51 -07:00
Marc Blank deb51f824e Add account name to temporary sync error UI to help debugging
* At this point, there are a lot of toasts shown that relate to
  sync failures (e.g. "Unable to connect to server").  To help
  find where they're coming from, add the display name of the
  account
* UX folks: Please consider what this UI should be

Change-Id: Id9b76cd22178727bedaf67ad0b7450edff99a791
2010-10-19 15:45:03 -07:00
Makoto Onuki 241f18f237 Fix when to clear notification
I was assuming MailService.resetNewMessageCount cleared notification,
but it didn't.

Doing it in Activity.onResume is clearly wrong because we don't always
have an account ID there.  If we don't, we're passing -1, which clears
all notifications for all accounts.

We're now calling resetNewMessageCount() in MessageListFragment,
when we refresh the list, so we can remove it from onResume() for the Phone
UI as well.

Bug 3074056

Change-Id: Ib0bb2fbb0309a0784fb3a525927102f423e930df
2010-10-08 13:51:23 -07:00
Makoto Onuki 01b7e67f78 Move reply/forward buttons to header
Moved the buttons to the header.  All other buttons below the message view
go away, so I just hid the old buttons.

Also now we stop trying to hide these buttons when entering contextual mode,
which fixes bug 3044284: Message view buttons get disabled when closing
quick contact

Assets were temporarily copied from gmail.

Change-Id: Ib178c6221dfab02832a10d0c0441044e4969fb70
2010-10-05 11:04:10 -07:00
Makoto Onuki 61eec98d39 Switch to static fragments
- Now we declare all fragments in the layouts.
- Added clearContent() to MessageList/MessageView to keep them calm when not
  used.  (e.g. MessageView.clearContent() will be called when closing message
  view and going back to the mailbox list+message list screen.)

- Some of the processes have moved from onStop to onPause.
- Now that we don't use the fragment transaction, the "restored fragments"
  has been removed, and the separation between selectXxx() methods and
  updateXxx() methods are gone.

Bug 3045555
Bug 3041502

Change-Id: I958897a8a38bccea1dfed7cfcd900e6dd52d2eed
2010-09-30 11:03:33 -07:00
Makoto Onuki 899c5b8661 Switch to tablet style notification
- Now we show separate notification for each account
- New notification has sender photo, sender name, and subject
  of the latest email
- Added the NotificationController class, which is intended to manage
  all notifications besides "new message" eventually.

The framework doesn't seem to be 100% ready, and it's not clear how to
add the 3rd line in the expanded notification at this point.  Need to
revisit it later to verify UI details.

Change-Id: I40193ee372cb6b2b7245c1588890f238b2469699
2010-09-29 18:35:17 -07:00
Makoto Onuki 2dbb510657 Hide bottom buttons when message list enters selection mode
Hide the command buttons at the bottom of the message view when the message
list enters the selection mode.

Change-Id: Id825bb5183673e9def055b6480fa180beab51178
2010-09-22 18:00:21 -07:00
Makoto Onuki 250ca15b88 Show MessageList with MessageView, rather than MailboxList
In message view mode, show MessageListFragment on the left pane.

TODO: Highlight opened message on message list
TODO: If the opened message is moved/deleted/starred/etc, update
message view
TODO: Collapsible left pane on portrait

Change-Id: I9b26f7291648da0e08bc526b79305ab65ce4d926
2010-09-22 13:13:59 -07:00
Makoto Onuki 0435a0775e Let MessageViewFragment own bottom buttons.
Create a custom view containing the bottons below MVF
(delete, move, reply, etc) and let MVF own this.

These buttons used to be owned by the XL activity itself, because
the UI for these commands will most likely be totally different
from the tablet UI, so the fragment having them looked wrong.

However, this made it harder to make changes suggested by the latest
mock, such as "put reply/forward in the message header".
I think the buttons are semantically part of the message view anyway,
so the fragment owning UI for these commands is probably the way to go.
(And let's worry about the phone UI later.)

Reason for the use of a custom view is that it will make it easier
to make non-trivial UI changes, e.g. "combine reply, reply-all and
forward and make it dropdown."

Also removed obsolete TODOs from MessageListXL.

Change-Id: Ibf93f4c70fe07bdbbe33d2adb6bbd2b96812830d
2010-09-17 14:23:56 -07:00
Makoto Onuki a209096420 Show account names (nickname) on action bar
if available, instead of email addresses.
Also make sure the change to the display name will be reflected to
the UI.

Bug 2149083
Bug 3002398

Change-Id: I4aa4ffcec3a81688b3fb11182aacd546c310f117
2010-09-15 16:20:01 -07:00
Makoto Onuki 40b2d92851 Make sure "refresh" button animation refrects actual state
When selecting a different mailbox, start/stop the refresh button animation
as necessary.

Bug 2997302

Change-Id: If29d7ec37348d527698685503b7b4fbf0ed0c35f
2010-09-13 16:51:09 -07:00
Makoto Onuki 00d5cf97c6 Use the auto-advance setting after move.
Change-Id: I835211589897410be7003a276a3278d43d940c38
2010-09-13 14:27:13 -07:00
Makoto Onuki 8f78d57a1f Implement "auto-advance" on two-pane
- Two-pane now respects the auto-advance setting.
- Added another TODO for one-pane.
- Removed unused method.

Change-Id: If2cfb8cc1de04c48cd2f6075bc01bef830425662
2010-09-10 14:40:37 -07:00
Makoto Onuki 0f52e546ef Implement General Preferences
- Removed the place holder setting
- Added "auto-advance" setting, which has "newer",
  "older" (original behavior, default) and "message list"
- Strings were copied from Gmail

This CL has preference change only (i.e. the setting isn't used yet).
The actual implementation will come later.

Change-Id: I9f90a723c67e066fdc536a73490101817a127933
2010-09-09 17:02:02 -07:00
Makoto Onuki 2012ceff64 Launch AccountSecurity if the account is on security hold.
Change-Id: Icac5de3259c66cac87e2a36d95d53a4f63ea94f1
2010-09-09 14:13:47 -07:00
Makoto Onuki 27c6547968 Remove obsolete TODOs
They're all obsolete.
(Fix is already in, change in a different place made it obsolete, etc.)

Change-Id: I04452a973c86d39aca8e89f8883dcf1d7e480dee
2010-09-08 12:14:24 -07:00
Makoto Onuki 767f9fe2eb Implement batch move.
* UI is still temporary
* In this version, we check if the selected messages can be moved *after*
  you click "Move", rather than disabling the button beforehand.

Change-Id: Ief2864d2a513001847844963b2b0cb6b714e8667
2010-09-03 15:39:04 -07:00
Makoto Onuki 646b5e062e Disable forward/reply for trashed messages.
* Now the message shown/gone callbacks are called directly by
  MessageViewFragment, rather than MessageListXLFragmentManager.

* The buttons are enabled/disabled per messages, so it even works
  properly when you move around in All Starred. (if you ever star
  trashed messages.)

* Fixed one-pane as well.

Bug 2968810

Change-Id: Ie6de1dc7ea0bd18c40c091a6685629c26ffb7110
2010-09-03 10:42:15 -07:00
Makoto Onuki ed035c20a1 Remove some debug code from MessageListXL.
Change-Id: I26e373d2e570c49a812ffbee98095f9e84599335
2010-09-01 14:48:12 -07:00