Commit Graph

1007 Commits

Author SHA1 Message Date
Marc Blank cbdd9f78b2 Distinguish mailbox requests that are user requested
Bug: 3251757
Change-Id: Ie417ebf44c8b740db88e5854077782930359a958
2010-12-31 11:02:03 -08:00
Marc Blank 3d91924c99 Fix format/draw issues with snippets
Bug: 3315171
Change-Id: I8e44c1d64d2f3382fd1e03b35e3e59b048eca31d
2010-12-30 10:22:47 -08:00
Andy Stadler 926e7369d1 Remove UI thread disk access from AccountSetupNames
* Remove unneeded DB read in onCreate (add runtime checks for problems)
* Move more exit/commit work to existing AsyncTask
* Add lockout of next & back keys while processing

Bug: 2792509 (probably others)
Change-Id: I0db030a1f1df94ba721510b5112519f260f5c0f9
2010-12-25 23:16:10 -08:00
Andy Stadler 4f6a507d9b Merge "Fix ANR's in AccountSetupOptions" 2010-12-24 21:53:36 -08:00
Andy Stadler ec9398e7c6 Fix ANR's in AccountSetupOptions
* Move all db ops off UI thread
* Reorder methods in typical progression (they were random)

Bug: 3134660
Bug: 3134677
Change-Id: Idd4f411e937336bbd09bcc03d9ad036d22dc5e19
2010-12-23 16:38:52 -08:00
Makoto Onuki adbb6f8bc4 Log cursor/adapter class name and such when detecting a crash
Also log where the cursor was closed, if it is.

To investigate bug 3308465 and bug 3305706

Change-Id: I2b0fd9ea14757b6cf7597cd7162686d050d43fe9
2010-12-23 16:15:44 -08:00
Andy Stadler 2959a7e073 Fix ANRs from Email.setServicesEnabled()
* Create sync & async versions
* Rename all callsites so sync is very apparent
* Fix callsites appropriately
* Clean up interaction between reconciler and setServicesEnabled

Bug: 3133770
Bug: 3134677
Change-Id: Iefbc7814d9aa390baea6345e450e2a4768bf0a9a
2010-12-23 13:19:55 -08:00
Andy Stadler 6aec257fe7 Merge "Fix NPE when changing server settings w/security dialog" 2010-12-23 11:08:50 -08:00
Makoto Onuki 948bcad901 Merge "Use swapCursor(null) instead of changeCursor(null)" 2010-12-23 10:15:05 -08:00
Andy Stadler d8f1d8f2ff Fix NPE when changing server settings w/security dialog
Bug: 3302453
Change-Id: I8adb5166598b72f9eb4a26bbe47afc756e764159
2010-12-22 19:01:08 -08:00
Andy Stadler 8d22e85e45 Reduce/eliminate DB access in server settings
* Create shared async worker to check for duplicate accounts
* Use it in AccountSetupIncomingFragment
* Use it in AccountSetupExchangeFragment
* Debounce proceed/next button because work is now async
* Also, upgrade leftover old-style code in AccountSetupOutgoingFragment

Bug: 3134666
Change-Id: I5c24a6546d1ab66aedc5c4ac826ddf4f1ff53446
2010-12-22 18:57:27 -08:00
Makoto Onuki e0f28d7853 Use swapCursor(null) instead of changeCursor(null)
The later closes the old cursor while the former doesn't.
LoaderManager takes care of closing cursors, so no need to close
cursors by ourselves.

Change-Id: Ib652e6877dcfc1fea51ffc862254eaeed451cdfa
2010-12-22 17:35:44 -08:00
Andy Stadler 9f7e3982ad Reduce UI thread disk access in account settings
This change is in top-level settings for a given account:
* Call saveSettings async on UI changes, instead of synch at onDestroy()
* In loadSettings, get default account id async

Also sprinkled in some TODOs for future whack-a-mole fixes.

Bug: 3133639

Change-Id: I5216c78d28b35fe47e43b48ad0db3a3e57b25004
2010-12-22 13:55:42 -08:00
Makoto Onuki 22b33a5a4a Show stacktrace when failing to load message body
Change-Id: Ie6b2dda6fa32982e48e052f5f8fe2c699ebc8a01
2010-12-22 12:53:05 -08:00
Makoto Onuki ab1674a2d6 Cosmetic changes to MessageView
- Don't show the progress icon unless loading from network
- Don't show the content until LoadAttachmentsTask finishes
- Disable the fade-in animation.  It causes some weird positioning issue
  with the GL accelerated webview.
- Use WebView.clearView() to clear its content.
- Use the "normal" layout mode, otherwise WebView won't use its entire
  width
- Don't hide the vertical scrollbar

Bug 3287729
Bug 3225068
Bug 3295761
Bug 3304396

Change-Id: Ic4b8baac99b71dc0da58021849ff7c1dbd6dbe55
2010-12-21 17:57:16 -08:00
Marc Blank 9c4458dcd7 Don't try to show thumbnail for unloaded attachments
Bug: 3292689
Change-Id: I7575cb891f0b46c4a8564b5d2c4907025d91c639
2010-12-21 12:37:40 -08:00
Dianne Hackborn 8b9f2a7284 Update to use new Loader callbacks.
Change-Id: Ib478c2f2314bbae4a380539e22892d85dd9a34b5
2010-12-20 23:14:01 -08:00
Dianne Hackborn 0698f4027f Update to new Loader APIs.
Change-Id: Ic228f7b785f0d902a0188cfe995006b73b8a3c8b
2010-12-20 12:23:13 -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
Makoto Onuki a9939ab165 Merge "Disable "upgrade accounts" for now." 2010-12-16 11:09:06 -08:00
Makoto Onuki b358da3344 Disable "upgrade accounts" for now.
This will not be necessary on tablet.

Bug 3122020

Change-Id: Ifff59a11ccf628fdb5b6d007a7a6591db10153ce
2010-12-15 16:22:04 -08:00
Andy Stadler c1c3b6f21e Use generic contact icon for notifications & messages
* Copies the icon from contacts
* Used whenever the sender doesn't have a local photo
* Used in notifications and in messageview

Bug: 3282187 (notification)
Bug: 3285156 (memory leak from the placeholder graphic)
Change-Id: I528cae20355aa8cce7be37b26f32aa90e092708b
2010-12-15 15:26:30 -08:00
Andy Stadler 05340736da Only show attachments UI for downloadable attachments
Bug: 3286678
Change-Id: Ied64674cbfaef95228d5d3d8c99e5f5989b8a3c0
2010-12-14 20:19:52 -08:00
Marc Blank ef2261fa00 Merge "Fix placement of invite icon in narrow mode" 2010-12-14 16:52:02 -08:00
Marc Blank de39190bc1 Fix placement of invite icon in narrow mode
Bug: 3285416
Change-Id: I36a78eb486a45b780663a8fb24ee092b964ba1b0
2010-12-14 16:31:24 -08:00
Andy Stadler 8ec0dcfe0d Fix NPE on rotation
* onAttach is called fairly early when rotating, so it needs to do
  very little.
* or in this case, defer some work until onResume

Bug: 3170922
Change-Id: Ie760125c5f32b293f8ba1753f2993de0d7439b56
2010-12-14 11:53:41 -08:00
Makoto Onuki 9afd6bc59f Merge "Fix unit tests" 2010-12-13 16:45:50 -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 c849936a36 Fix unit tests
- Now ProviderContextSetupHelper.getProviderContext() invalidates DB cache

* MailboxAccountLoaderTestCase
- Save hostauth properly
- (ProviderContextSetupHelper invalidates cache before each test)

Bug 3280911

* SmtpSenderUnitTests
- Use ProviderContextSetupHelper to create isolated context,
  which now also invalidates DB cache

Bug 3280913

* MailboxFinderTest
- When kicking Controller.Result methods directly from tests,
  call the raw callback, rather than the one wrapped with
  ControllerResultUiThreadWrapper, to make it synchronous.

Bug 3280898

* MessageViewTest
- Disable testOpenMessage()
  This test doesn't work because it sets up test data in an isolated
  context but the activity/fragment don't see them because they
  use the real context.
  I have no idea why it worked before... Maybe because there were
  accounts/mailbox/message with the same ID in the DB by chance.

Bug 3280905

Change-Id: I6beb08c58fff102e90bebd2c35f70820268b9e62
2010-12-13 16:29:57 -08:00
Marc Blank 06a2f4a3b1 New message list formatting per pixel perfects
* Need icon assets (attachment, meeting, star on/off, and
  checkbox on/off)

Change-Id: I6780fb354584ce5ea398b555a8485cf600617586
2010-12-13 15:32:05 -08:00
Andy Stadler f946ff0019 Fixed issues that cause rotation to NPE
* Add the checker fragment (instead of replacing)
* Don't refresh progress/error dialogs until onResume (a bit later)
* Don't recreate terminal error dialogs that were automatically
  regenerated by the fragment manager.

Bug: 3020074
Change-Id: Ia2947965b758f6846c62ac394ce51da2432523ee
2010-12-13 13:58:40 -08:00
Makoto Onuki 23d6d9cf24 Merge "Controller.Result callbacks should all have accountId" 2010-12-13 10:50:18 -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
Andy Stadler 3dedc8b191 Defragment AccountSetupBasics
* This was an early attempt at fragmentation
* But it turned out that no fragment was needed here - it is
  not shared or reused in any way.
* Precursor to doing final layouts for the activity.
* Tested working:
    Automatic provider lookup
    Manual
    POP/IMAP and EAS flow modes (from accounts & sync)
    Force account creation intent
    Provider note
    Duplicate account detection

Change-Id: I434edd4b152391d36e70440873932db3ec1a1c99
2010-12-09 11:05:34 -08:00
Andy Stadler 68831e7c34 Merge "Allow non-monkey creation of test accounts" 2010-12-08 22:11:09 -08:00
Andy Stadler 6175300474 Allow non-monkey creation of test accounts
* Set the debugging flag to allow it
* Add STOPSHIP (it cannot go out like this)

Bug: 2735784
Change-Id: Id5d162f7f1879b76004a24d5d81e769b06ef8d29
2010-12-08 16:43:23 -08:00
Andy Stadler 6a78be9623 Merge "Add preference for background downloading" 2010-12-08 12:28:22 -08:00
Andy Stadler f983c75b44 Add preference for background downloading
* Defaults to false
* Placeholder text

Change-Id: I7c729eddb7b4d368a0ac47552c911d2ef11b3ee1
2010-12-08 12:28:02 -08:00
Makoto Onuki 9d2e36412d Merge "Update error banner" 2010-12-08 10:59:04 -08:00
Andy Stadler 3a4b9e140e Fix failing tests in AccountSetupExchange
A recent change was short-circuiting the logic that loads
the UI from the account.  This fix simply resets the flag
so the test can reload the UI multiple times as it tests things.

Change-Id: I7cc53e2766b78172e5a7b05088e94fdec99ae0d6
2010-12-08 00:22:23 -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 4d02297f4a MessageView: Show progress icon while loading
To avoid flicker.

Bug 3225088

Change-Id: Ic5faea4e6fc810aa751b9f0b9d04537e5dc29970
2010-12-07 14:36:09 -08:00
Makoto Onuki 2ac95b550d Message view: Use system tab style
Bug 3138021

Change-Id: I18ec66966e984a4f2b9e330d0ef14dbca5cce5e3
2010-12-06 16:51:01 -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
Andy Stadler d685b469c7 Add magic intent to force account creation
* Add entry point via com.android.email.CREATE_ACCOUNT
* Enable when in monkey mode only
* Walks through setup screens as if auto-populated and as if
  connection checking always succeeds.
* Refactored some common code in AccountSetupBasicsFragment
* Removed obsolete commentary about auto-population of EAS accts
* Also fix minor typo in FLOW_MODE_ACCOUNT_MANAGER_POP_IMAP

Bug: 2735784
Change-Id: Ie7363836cd267673e963e60ae8bc32cab422576e
2010-12-04 22:53:59 -08:00
Andy Stadler 112ed496f8 Update server settings to current look
* For each of incoming, outgoing, exchange fragment, create a "settings
  mode" which slightly alters the layout for use in AccountSettingsXL.
  * Build a settings mode wrapper layout around the basic fragment
  * Add new constructor to set "settings mode" and select layout
  * Add wiring for cancel/next buttons in the fragment
* AccountSettingsXL configures each fragment in its settings mode
* Remove old actionbar "Next" options (no longer needed)

TODO: Pixel perfect adjustments, colors, fonts, etc.

Bug: 3188951
Change-Id: Iba26281b214333db301dd40d6c016b6c5a932c2d
2010-12-02 21:45:04 -08:00
Andy Stadler 7c7bbafc16 Merge "Make sure snippet is never null" 2010-12-01 20:54:50 -08:00
Makoto Onuki d9957db874 Merge "Don't enable "save draft" when a draft is just opened." 2010-12-01 16:54:13 -08:00
Marc Blank 6e8d964faa Make sure snippet is never null
Bug: 3241603
Change-Id: I5ef35e041b70e72005204ac242b46b5747617b87
2010-12-01 15:41:16 -08:00
Christopher Tate e633b9d7c2 Merge "Track drag/drop API change; no behavioral change" 2010-12-01 14:46:19 -08:00
Makoto Onuki 8686591aa8 Don't enable "save draft" when a draft is just opened.
The problem was that setIncludeQuotedText() always set mDraftNeedsSaving,
but it shouldn't be done when loading content.
(Do it only when it's toggled by the user.)

Bug 3162882

Change-Id: I6308376020f5be6d1a15b7865f8c7e02cf875eb9
2010-12-01 14:06:01 -08:00
Marc Blank 1b9337ea4f Wireframe email widget
* Formatting and assets are preliminary
* Functionality correct
* Needs cleanup, etc.

Change-Id: I75051df93d233ef529a616c7a9efae403d320bd2
2010-12-01 13:37:57 -08:00
Adam Powell 4a54ec9b01 Update for ActionBar API change
Change-Id: I209a4409180f45146423254ed36a9859daa86547
2010-12-01 13:12:58 -08:00
Christopher Tate 2219bd0043 Track drag/drop API change; no behavioral change
Change-Id: Id5a2e1aad453663f7b8baae7e5a1aab8209e0e74
2010-12-01 13:06:32 -08:00
Makoto Onuki d1ee5b8fa5 EML viewer: Set title, and show arrow next to the app icon
- Set "Viewing FILENAME" as title.
- Home icon now has "back" arrow.  Closes the activity when clicked.

Bug 3221312

Change-Id: I689499e10704d3c5d206df4aa12e21db9687c4c5
2010-12-01 11:35:09 -08:00
Makoto Onuki 17d07ecdf7 Hide selection mode when message list is not visible.
...without clearing the selection.

Message list can be hidden on portrait.

Bug 3228718

Change-Id: Idc9eb3416e151ac0c2b851824fcee10b346d51c5
2010-11-30 14:54:04 -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 2d648f4cec Merge "Make "mark unread" close current message" 2010-11-29 16:07:09 -08:00
Andy Stadler 2148d9b2e6 Merge "Move "Add Account" to ActionBar" 2010-11-29 15:18:17 -08:00
Andy Stadler 97874770fc Move "Add Account" to ActionBar
Not currently enabling/disabling properly, filing a framework bug.

Bug: 3188951
Change-Id: I9c8900187048f548411a23c2a1b0208c79fc0a24
2010-11-29 15:00:37 -08:00
Makoto Onuki f3d43641c9 Make "mark unread" close current message
- XLFragmentManager.selectMailbox() used to hide the message view
  when it's visible, but not anymore.  Made goBackToMailbox() itself
  hide it instead.

- Also made onMarkAsUnread() not call the unread callback, which was
  already done in onMarkMessageAsRead().

Bug 3214538

Change-Id: I52fb8bb745cdaa517624a9aeec074122f10aac4a
2010-11-29 14:46:27 -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 54513ed740 Merge "pixel-almost-perfect: mailbox list" 2010-11-24 13:47:04 -08:00
Makoto Onuki 9d6d5b3091 pixel-almost-perfect: mailbox list
Bug 3137965

Change-Id: Ic5aa3327ddbd456024e1938b74c7da0452b682f5
2010-11-24 13:40:58 -08:00
Andy Stadler 0cefe81b47 Merge "Update visual style shortcut picker and make it async" 2010-11-24 11:20:06 -08:00
Makoto Onuki 2e1c3eaaf1 Merge "Don't show color chips when there's only one account" 2010-11-24 10:48:10 -08:00
Makoto Onuki e2201949ba Don't show color chips when there's only one account
Bug 3225322

Change-Id: Idb299f54dc6f746e7d451a7a04fb971a432a869a
2010-11-24 10:47:04 -08:00
Andy Stadler d87f81e901 Update visual style shortcut picker and make it async
* Use dialog when in XL screen size
* Show different strings in launcher and in dialog/activity title
* Add cancel button to picker
* Move accounts query to AsyncTask
* Remove obsolete AccountsAdapter

Bug: 3093928
Change-Id: Ief771482c6db684c434c21cf92844c37a927d34a
2010-11-23 22:54:49 -08:00
Makoto Onuki 08e1f2f782 Don't show account dropdown when there's only 1 account.
Bug 3225851

Change-Id: I7b411f8047e3b26cfe53f17c46c3e2611fb8ae9d
2010-11-23 17:23:36 -08:00
Makoto Onuki 5b81690de1 Show color chips for combined view.
Show color chips for account rows and message items on the combined view.

Moved hard-coded color values to resource.

Bug 3138001

Change-Id: Ib93fb9d6e9592ebd0c297f83c3dee2358a80508f
2010-11-23 13:03:06 -08:00
Makoto Onuki 46e60b51e2 Merge "Fix & cleanup on EML viewer (MessageFileView)" 2010-11-23 12:18:28 -08:00
Andy Stadler 5c4c0ab456 Move application icon to mipmap-* directories
Change-Id: Idc5df7046d0fa64ffbfce2869dffb4fe0fd144a0
2010-11-23 12:06:44 -08:00
Makoto Onuki a6998d39fa Merge "Implement screen transition animation." 2010-11-23 10:18:25 -08:00
Makoto Onuki d2dac0fd6c Implement screen transition animation.
Bug 3137919

Change-Id: I077768bffb1eb246fdaa7d2def30c7b132566d69
2010-11-23 10:17:54 -08:00
Andy Stadler 1f3e117951 Fix rotation problems in setup/settings
* Fix incomplete tracking of mLoaded flag
* Defer validation on automatic reload of fields (on rotation)
  until reconstruction completes and we're ready to do validation.
* (For Incoming only) Split loadSettings into configure and reload phases;
  We need to configure the UI every time we restart, but we don't want
  to reload & overwrite user-entered values on rotation.
* (For Exchange only) Properly show/hide trust certificates options on
  rotation, and show/hide divider too.

Bug: 3170922
Change-Id: If3de30ee2d4d5668b29698af73f545510692777e
2010-11-22 19:02:16 -08:00
Marc Blank c0604d9648 Merge "Don't layout with 0 width if we've got a real width" 2010-11-22 18:05:34 -08:00
Marc Blank 452b347729 Don't layout with 0 width if we've got a real width
Bug: 3221168
Change-Id: I85562cad4afe7ce494cdb4cd348cad23c6103936
2010-11-22 17:43:11 -08:00
Makoto Onuki b715ea1d76 Fix & cleanup on EML viewer (MessageFileView)
- Fix the XL layout: Don't refer to "GONE" views in RelativeLayout.
- Don't always (re-)load message on onResume().
  This will make it lose all state (e.g. webview's zoom level) when coming
  back from other activities.
- Change the default visibility of some views so that it'll look okay
  while loading the message.
- Remove the use of obsolete fragment APIs.
- And some other minor cleanups...

Bug 3221066

Change-Id: I475bc229f4ea9e0e480f528389f5180e1d63fcd6
2010-11-22 17:02:48 -08:00
Makoto Onuki deda053f7c Fix NPE in MessageViewFragment
Call clearContent() in onDestroy(), instead of cancelAllTasks().
(This is what I thought I was doing.)

Calling clearContent() tells the BG thread that the activity has already
been destroyed, and prevents them from loading a message.

Also as a precaution, don't load a message if getActivity() returns null,
which means the activity has already been destroyed.

Bug 3134403

Change-Id: I0d591e0dd147f73e70b0c027dc8037482197f7b4
2010-11-22 14:29:29 -08:00
Makoto Onuki 4c9e1a3fde Don't reset message view when becoming active again.
- We used to (re-)load the content on every onStart(),
  which is called too when coming back from other actibities.
  So if you go home and come back with the task switcher,
  all state get reset, including webview zoom/pan and the current tab.

- Introduce a new flag, mLoadWhenResumed, to tell if we really need to
  load a message.

Also:
- Start loading a message in onResume() rather than onStart()
  to keep it consistent with other fragments.

Bug 3215269

Change-Id: I1cc6e12c3cc3c08065da3696603a3247f341469a
2010-11-19 15:12:54 -08:00
Makoto Onuki 00fb407689 Merge "Show current mailbox name and unread count on action bar." 2010-11-19 13:56:36 -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
Makoto Onuki 9f04fdc555 Make home icon on action bar clickable
- Make the home icon on action bar clickable, and show the back arrow with it.
- When clicked, it'll navigate you back to the main screen.

Bug 3138037

Change-Id: Ice783e6b594347bd73b94e71d29a61ad4f5ef972
2010-11-18 16:54:00 -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 4ca7580e5d New portrait look for 3-pane
- Removed opener/collapser
- Now the "fogged glass" is 100% transparent
- Move the landscape layout to layout-land

Bug 3137919

Change-Id: I4918f905aca698c78489e340dd330c7d4da8b106
2010-11-17 15:25:58 -08:00
Makoto Onuki 6ffdecfbbb Merge "Add XL layout for message view" 2010-11-17 15:21:06 -08:00
Makoto Onuki 8e8e371260 Add XL layout for message view
- Added the xl layout
- Cleaned up the existing one

Bug 3138021

Change-Id: Ic6ab5e38c10ac12ffeeb6b12319d1e192ac2a40c
2010-11-17 15:19:00 -08:00
Marc Blank 937ea4fc87 Initial rewrite of MessageListItem for XL
* Drawing all done by MessageListItem, based on view width
* Completely functional, layout tweaks required

TODO: Consider caching drawing values for performance

Bug: 3137994

Change-Id: Ie3de79357bfe976b2fcebdedb71dea011252b445
2010-11-17 12:23:03 -08:00
Makoto Onuki 878a9da420 Merge "Three pane behavior changes" 2010-11-16 17:19:33 -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
Andy Stadler e6c6587b04 Create XL layouts for incoming, outgoing, exchange
* Create XL fragments (will be shared w/settings)
* Create XL landscape activities
* Create XL portrait activities
* Placeholders left for integration with settings - remove in settings CL
* Quick fixes (non shipping) for phone UX
* Update existing portait next/prev buttons per new wireframes

Bug: 3188940
Change-Id: Ied6e7fd1e968fd6db57607a68dabf7e00ba78ee6
2010-11-16 16:40:34 -08:00
Makoto Onuki 15f46cc715 XL layout for message compose
The layout is not final, but it's closer to the wireframe.
- All dimensions and colors are not final.  I just made them up.
- The "+cc/bcc" and "add attachment" buttons are in the wrong position.

I'll wait for the pixel perfect before addressing them.

Bug 3138037

Change-Id: I72fc7557c28e72df08a3751c3c93acfb35749d68
2010-11-16 11:28:58 -08:00
Andy Stadler 7fd78d8d61 Create XL layouts for AccountSetupOptions
* Landscape and portrait layouts
* Quick fixes to phone UX (not shippable)
* Added some CHAR_LIMIT values

Bug: 3188940
Change-Id: I093d5a6dcde2da96c173b5878900114802aead3e
2010-11-15 18:37:56 -08:00
Andy Stadler 17adb23fb4 Preliminary XL version of Account Names screen
* Add new account names layouts for XL devices
* Placeholder UX for phones

Bug: 3188940
Change-Id: I8c9d0793b004af5f5b66070fd18ecb46fc6f1612
2010-11-15 12:08:37 -08:00
Makoto Onuki 65b1eef31b Message view code change
- Show sender email address
- Show BCC for sent messages
- Don't show the default quick contact badge frame.
  (change QuickContact to ImageView)

Bug 1501239
Bug 3138021

Change-Id: I0e8d91ad3a6a3a021c8aff0945a1ce11d13b2728
2010-11-15 12:03:36 -08:00
Makoto Onuki 17670b1194 Merge "Small code change on MessageCompose" 2010-11-15 11:03:21 -08:00
Andy Stadler 27c70e3322 Preliminary XL version of Account Type screen
* Add new account type layout for XL devices

Bug: 3188940
Change-Id: I12ebe60075971fa14c7c55be65dccc0b7602f566
2010-11-14 21:37:41 -08:00
Andy Stadler 7988164ddf First pass of XL account setup
* AccountSetupBasics now has an XL version
* This is from prelim wireframes
* Final colors, text size, and positioning all TBD
* Fixed a StrictMode violation (counting #accounts in onCreate)
* Lightweight (non-shippable) fixes for functional phone UX

Bug: 3188940
Change-Id: Idf6cb514208eba07eaa20b20abfd5fcc3dae1751
2010-11-14 21:16:49 -08:00
Makoto Onuki 4977ce62f0 Small code change on MessageCompose
Change how we show/hide CC/BCC.  The new way will work for the tab UI too,
where we show the labels to these fields as well.

Also hide the "+Cc/Bcc" button when they're visible.

Bug 3138037
Bug 3192841

Change-Id: Ic78b3200c418430c8eade3ca1238b0d0f1ee4731
2010-11-12 16:19:26 -08:00
Makoto Onuki 949138d482 Merge "Fix NPE on the phone UI" 2010-11-12 16:08:28 -08:00
Makoto Onuki 05565d4e83 Fix NPE on the phone UI
It still has a problem that no menu options show up on the activity,
but it's at least useable.

Bug 3192277

Change-Id: Ia891557020c863bfa53d45b7465d012aa411d67f
2010-11-12 14:25:37 -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 6926cf85ef Merge "Fix "Parcel@406cd448: Unmarshalling unknown type code..."" 2010-11-11 17:02:52 -08:00
Makoto Onuki 5f91dd12d8 Fix "Parcel@406cd448: Unmarshalling unknown type code..."
It was a mismatch between onSaveInstanceState and onRestoreInstanceState.

Bug 3158588

Change-Id: I36ff6ee8a666ff418f3cf0da50477f9347040322
2010-11-11 17:00:28 -08:00
Makoto Onuki 2ac1eaf8c3 Account selector rework.
- Show email address
- Show inbox unread message count

Initially I thought of using a join to get accounts with their unread
counts with one query, but there were enough subtle issues that I gave up
on the idea.

Instead it uses a MatrixCursor to build a completely new cursor,
based on a regular accounts cursor.

Change-Id: I09e8762f131cc2bd3637e1a3d302088a3b5b2479
2010-11-10 17:41:29 -08:00
Makoto Onuki fd8ee7bc50 Show confirmation dialog before discarding drafts.
1. This CL implements the most common case, which is pressing the discard
  button on MessageCompose.

2. This CL doesn't change the discard on message list, which is much trickier.
   (We need to check the message type of all messages in the selection,
   as selection can contain any number of any kind of messges in "All Starred")

Bug 3072556

Change-Id: Ib270cae726f8fd5abf7e0e7dfc34ce97019d5301
2010-11-10 14:13:05 -08:00
Makoto Onuki 77303a483b Merge "New message view command layout" 2010-11-10 14:09:38 -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 6f3d167cfa Don't show non-incoming message in notification.
Filter out non-incoming messages using a subquery.
(because the message table doen't have the mailbox type.)

I was initially thinking of adding a new content URL for
the message table joined with the mailbox table, but it turned out
to be a bit of pain, so ended up using a subquery.
(one of the problems was that both tables had the "_id" field.)

Bug 3177220

Change-Id: I276efb70db1589835f3ddb8c7da4773e72d8691b
2010-11-10 10:22:41 -08:00
Makoto Onuki d12e56d321 Fix auto-refresh of mailbox list
sEnableUpdate should default to true.

Bug 3180421

Change-Id: I1145846d96bba9e962f598e785daf7ce7ad2404b
2010-11-09 15:27:55 -08:00
Makoto Onuki b70772daa5 Merge "Code change for new mailbox list layout" 2010-11-09 13:47:08 -08:00
Marc Blank 4ac5286eb9 Merge "Don't allow d&d move from boxes that don't support it" 2010-11-09 13:22:25 -08:00
Marc Blank e857ff50ec Don't allow d&d move from boxes that don't support it
Bug: 3177021
Change-Id: Ib5cfcef05794d6f83884d97f2096f3d4f6b3295c
2010-11-09 12:21:34 -08:00
Makoto Onuki 9c39deef4e Code change for new mailbox list layout
- Don't show a folder icon for regular mailboxes
- Change the count look
- Don't show counts for Sent/Trash.

Bug 3137965
Bug 3073147

Change-Id: I8fc0af8fc2d51968605fe4b570e5704453092ac7
2010-11-08 18:16:23 -08:00
Makoto Onuki 8197d84734 Don't call dismiss() in onLoadFinished().
It's prohibited.  Instead use a Handler to delay-call it.

Bug 3173317

Change-Id: Ic5ef245a65b3a4eeebabcebd6323b9a7921f34d5
2010-11-08 14:27:13 -08:00
Andy Stadler aa1259b4cf Merge "Handle clicks outside of the "checking..." dialog" 2010-11-05 17:00:53 -07:00
Andy Stadler 992b7e7ed3 Handle clicks outside of the "checking..." dialog
* Clicking outside of the dialog actually "cancels" it
* Need to shut down the checker so it doesn't keep trying to
  update it or close it when done.

Bug: 3120019
Change-Id: I5faa3c78b64d2aafc472b03b8086695edaf0b3fd
2010-11-05 15:54:28 -07: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 467eb0cceb Merge "Reverse FLAG_INCLUDE_QUOTED_TEXT" 2010-11-05 16:44:02 +00:00
Andy Stadler 9ce244b2e3 Hide vibrate notification option on no-vibrate devices
* Check for existence of vibrator, hide option if appropriate
* Notifications with vibration are still OK, they are just ignored
* Minor cleanups & renaming

Bug: 2988758
Change-Id: Ia1fd259f57d33a75a54cf1016f66a1c072aba579
2010-11-04 21:13:45 -07:00
Marc Blank bad09c18d9 Correct drag & drop mechanics; implement multiple selection
* This CL brings drag&drop move in line with the current document
  describing its functionality in the Email app

Bug: 3135124

TODO: Assets and proper creation of the drag thumbnail based on
  those assets
TODO: Review long-press behavior re: press on subject vs sender

Change-Id: I6e1ee1a1f055feb041a0338f2f5c775a88620595
2010-11-04 17:13:55 -07:00
Makoto Onuki 138abe82e6 Make "Send all messages" a menu option
- Now it's a menu command rather than a button.
- Also string changed from "Send outgoing messages".

Bug 3166218

Change-Id: I82f6188365f9f6bc5a6d40fb23d774eebe181445
2010-11-04 16:53:18 -07:00
Makoto Onuki 0e6254223a Reverse FLAG_INCLUDE_QUOTED_TEXT
To make it compatible with old databases.

(Follow-up to Ie7bcca23)

Bug 3162967

Change-Id: Ie3bbb5089900bb9dbd0834adbdd466fa009245f9
2010-11-04 16:30:03 -07:00
Makoto Onuki bf678771b7 UI change: MassageCompose
Basic changes for the new UI.  At this point we don't know what the new phone
UI will look like, so I didn't bother trying to preserve the old behavior on
the phone UI.  The changes will affect both the phone UI and the tablet UI.

- Send, Save Draft, and Discard are now action bar commands.
- Add CC/BCC and Add Attachment are now regular buttons.
- Activity title changed to "Compose"
- Some string changes per new wireframe

Further changes (actual layout changes for the latest wireframe) should be made
only for the xlarge layout.

Change-Id: I68c9c37dfdca6736b1e35053e7f196800fcfce2e
2010-11-04 15:22:25 -07:00
Marc Blank c81bef6720 Drag & Drop "move to folder"
* Drag & Drop "move to folder" preliminary implementation
* Use "drag handle" button to initiate drag
* Use the message list item itself as the drag thumbnail for
  one item; "Move N messages" for multiple (not implemented)
* Disable MailboxList update during drag
* Use ListView itself as drag/drop target

Bug: 3138004
Change-Id: I9243e4f583cf91caa1b9dd04fd64d52e8b28fa30
2010-11-04 08:45:24 -07:00
Makoto Onuki e4f8111001 Merge "Fix & clean up intent handling" 2010-11-03 16:53:02 -07:00
Andrew Stadler 997a022c9b Enable zooming in MessageView
Bug: 2282390
Change-Id: Ie5be3c4adb8cc3bef5ccf4fccbfefe8a40872b17
2010-11-03 15:31:08 -07:00
Andy Stadler ba4e72a947 Cleanup various IMAP/POP manual account setup defaults
These defaults affect manual setup only.  There should be no changes
observed in automatic setup, and no changes observed in EAS setup.

* user $email instead of $user as default login
* guess "imap." or "pop3." for server name
* propagate the incoming server name to the outgoing server name, and
  replace "imap.", "pop3." or "pop." with "smtp."

Also, fixed a couple of leftover places where we were trimming
passwords (and should not be, since some people insist on having
spaces in their passwords.)

Bug: 2978634
Change-Id: I9b0e345aa9550b5e1cc29aaa22109f03da61af20
2010-11-03 09:31:45 -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 c50f912676 Inhibit "send" when user is a monkey.
While monkey is active, any clicks on "send" will be mapped to "save".
Drafts will pile up, but nothing will get out.

Bug: 2799956
Change-Id: I300d50001b43c8b61062143f9a0ac914aa2deaca
2010-11-02 16:14:19 -07:00
Andrew Stadler ba0b1bbc8d Implement text zoom for Message View
* Add preference for default text size
* Move saveSettings logic into onPreferenceChange handler
* Per user tests, default setting is large (not "normal") for XL devices.
* Use setting in MessageView's WebView

TODO: Investigate zooming header (to/from/subject/etc) as well.

Bug: 2282390
Change-Id: If32ed3626244b046941a461f974b3dbdb535f592
2010-11-02 14:58:24 -07:00
Marc Blank 278cb8e3d5 Merge "Support EAS in providers.xml files" 2010-11-01 21:14:46 -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
Marc Blank 26e01b4ad2 Merge "Delay appearance of "stop" button when loading attachments" 2010-11-01 14:02:01 -07:00
Marc Blank fdc41d4ffc Delay appearance of "stop" button when loading attachments
Bug: 3082804
Change-Id: Ib8b0fcec36a7303b2094bd0e49645d11aa2ff2db
2010-11-01 13:48:53 -07:00
Makoto Onuki bbe25adfc8 Fix crashes related to readParcelable
We need to pass the actual class loader.  Passing null makes it use
the boot class loader, which can't find our classes.

Bug 3073304

Change-Id: I1c72c1d352cfc0a730aba1d83eb048a8cfa95b67
2010-11-01 13:47:53 -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
Brad Fitzpatrick bd29c30903 SharedPreferences commit -> apply
Change-Id: Icdca00268a8b5ea274c91366867172ee7e3841d4
2010-11-01 08:51:26 -07:00
Marc Blank 4afdd19e20 Support EAS in providers.xml files
Bug: 2962123

Change-Id: I661c52afcf36e337e29bb10fd878196a3b0147ae
2010-10-29 19:03:44 -07:00
Marc Blank 4a66884b74 Merge "Use notifications for login failures" 2010-10-27 08:57:27 -07:00
Marc Blank d3e4f3ca7e Use notifications for login failures
* For now, clicking on the notification takes the user to the
  Welcome activity, as we don't have final flows for the new
  account setup UI
* Need comment on strings; the problem is that notification
  text must be rather short if we're to use the standard
  notification display.  It looks like newer UI will allow
  3 lines instead of 2, however.
* Tested w/ IMAP, POP3, EAS, and SMTP

Bug: 2322253
Change-Id: I7ed6fa5599179870cbcdb14af062e956eff37ec5
2010-10-27 08:56:37 -07:00
Makoto Onuki ffd258d873 Fix the class name in the log.
Change-Id: Ie672f2e65b28dc742cce561d13aa3016d8bbb1f1
2010-10-26 13:45:52 -07:00
Makoto Onuki 5b072f9129 Merge "Don't use sendMailCallback() -- don't track outbox status" 2010-10-25 13:19:37 -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
Makoto Onuki a76c9cdcc7 Fix reply/forward on EAS
When removing the original, need to clear FLAG_TYPE_REPLY and FLAG_TYPE_FORWARD
flags too.

Bug 3125167

Change-Id: I64be98bc10b5e1a0b9242c1c528ed96bb0a24fc1
2010-10-22 14:43:21 -07:00
Makoto Onuki 6a2265eff2 Add checkbox to include original text or not.
Added the "Include text" checkbox according to the latest mock.

Before:
- We removed original message when the user pressed X.

Now:
- We save the original message all the way till the draft is sent.
- The "Include text" check state is saved in the db.  (to Message.mFlags)

Bug 3072414

Change-Id: Ie7bcca23bb6a02d676700027b0b6cb94b6627236
2010-10-20 14:21:17 -07:00
Marc Blank 8d70372e0a Merge "Don't duplicate attachments when saving drafts" 2010-10-20 13:20:40 -07:00
Marc Blank 3bdba62f58 Don't duplicate attachments when saving drafts
Bug: 3070196
Change-Id: Ic9dffe57cdc81615e07b1c593fc71085e1281718
2010-10-20 13:03:33 -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 7fdd88e37c Merge "Put the dest mailbox name in the "message moved" toast" 2010-10-14 15:36:37 -07:00
Makoto Onuki ee7205d100 Put the dest mailbox name in the "message moved" toast
Also removed obsolete todo

Bug 3075984

Change-Id: I10ce9df29c4913c328d2a962151d4a9f2e6e1408
2010-10-14 15:14:46 -07:00
Makoto Onuki b0ffb3e39a Merge "Don't use negative IDs with ListView" 2010-10-14 14:45:23 -07:00
Makoto Onuki 9b5001a34c Don't use negative IDs with ListView
ListView uses the _id column for some operations, including
onSave/RestoreInstanceState, and if the column contains negative values
they don't work as expected.  The same assumption seems to be in other places
as well, so let's just avoid using negative IDs.

With this CL we now use two different IDs, one for ListView, which will
never be negative, and the other for us, the actual mailbox ID.

Bug 3049315

Change-Id: I263b4895212b5f8bb80c98acaf5c4eccd0bfef55
2010-10-14 14:42:46 -07:00
Makoto Onuki 09eb977c06 Fix potential crash in MessageViewFragment.openMessageSync
The problem is that ths method is called in a worker thread, so
there's nothing to prevent it from running just after/at the same
time as clearContent() (which sets -1 to mMessageIdToOpen).
If it does, it passes -1 to restoreMessageWithId() and crashes.

Also removed a half-obsolete comment which is a bit too obvious for its length.

Bug 3077387

Change-Id: I736d696046e6d8964a16c80515544c582aca3943
2010-10-12 16:38:40 -07:00
Makoto Onuki 9c293eb65a Show "No messages" when there's no items on message list
Show this when there's no messages, and no "Load more messages" footer.
i.e. Only Outbox, Drafts, and exchange mailboxes can show "No messages".

Also removed an obsolete comment.

Bug 2363624

Change-Id: If483d33cfacb186d0fe54b4f4382333a332be84c
2010-10-12 10:36:17 -07:00
Daisuke Miyakawa 43f2321d10 Modify code style.
Change-Id: I40eeb738ca2dcc7f21ddbc603b03debde5ac27d3
2010-10-10 15:17:52 -07:00
Daisuke Miyakawa c8af3175df Merge "Use AccountAuthenticatorResponse properly." 2010-10-10 15:12:48 -07:00
Daisuke Miyakawa 9dac94975f Use AccountAuthenticatorResponse properly.
Current implementation ignores callbacks coming from
AccountManager, which should be called everytime
when this Activity finishes its job.

Bug: 3069222
Change-Id: Iea03cf94bdfe8da184e415bf7e759ddeb46ecdd9
2010-10-08 16:16:43 -07:00
Makoto Onuki 6993130a7c Auto-refresh mailbox list
Refresh mailbox list when changing the account, if it's been more than
5 minutes since the last refresh.

Change-Id: I5b1400bb881197e117b8863f850c368c2d1ccbc6
2010-10-08 15:29:38 -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
Marc Blank cae8626fb9 Handle "Sync Email" properly from AccountSettingsFragment
Bug: 3055326
Change-Id: I7ecc7eda975f0ec03d3d81ed042842eab2c94d4e
2010-10-07 15:04:20 -07:00
Makoto Onuki 60c6dc4711 Sparse message list item layout for XL
- Tested on N1 as well
- Also fixes bug 2546662 -- show both invitation & attachment icons

Change-Id: Ic2f42370be32a0beb43f9018cefdce86028e8189
2010-10-07 10:17:58 -07:00
Makoto Onuki de936b83ac Fix race condition regarding message reload.
The method to start ReloadMessageTask() when detecting content
changed events is delay-called, so need to make sure the fragment
is still in the valid state.

Bug 3069896

Change-Id: I1991d902e8044b4f8ca3ffd7d3e2e66005f1e960
2010-10-06 17:48:48 -07:00
Makoto Onuki f54e08eaee Introduce tabs to view message, attachment and invite separately
Added "tabs" to the message view according to the latset mock.
This removes the necessity of putting a WebView inside a ScrollView,
which caused the infinitely-growing email bug (issue 6882).

Right now the tabs are actually just Buttons.  Complete visual refresh
should follow it.

http://code.google.com/p/android/issues/detail?id=6882
Bug 2349275

Change-Id: I897a3a32e0dd7a90d637ac5ea1d47e5e65a1eabe
2010-10-05 16:53:59 -07:00
Makoto Onuki d058f8abcd Auto-refresh message view
Now MessageViewFragment detects changes made to the current message,
and update the UI.
(Although it doesn't really know if the message is really changed, or just
something else was changed in the DB.  It updates the header regardless.)

Change-Id: I35627c7aff129723b83605fc84521da907078571
2010-10-05 11:11:31 -07:00
Makoto Onuki 591e8fa0c9 Merge "Fix "move to" dialog style" 2010-10-05 11:06:00 -07:00
Makoto Onuki 7bfa32dbc5 Merge "Move reply/forward buttons to header" 2010-10-05 11:05:51 -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 56034cab20 Fix "move to" dialog style
- Pass the correct context to the adapter to make the text visible.
- MailboxesAdapter itself now has two modes (normal mode for MailboxList,
  and "move to" mode), and use different views for them.

Change-Id: I2bd8a7d3a99d7fa3a047e653a77ec958e37e563b
2010-10-01 11:40:09 -07:00
Makoto Onuki 1a0b0092e0 Add "Clear WebView cache" button to debug preference
Change-Id: I317b57cb06b071f9574077b58998aafcb5e0dff8
2010-09-30 15:41:40 -07:00
Marc Blank 14a5d8d947 Provide better information w/ 500 error in EAS validation
* HTTP error 500 occurs with Exchange 2003 when the user tries to
  authenticate with wrong credentials; we report this as "Cannot
  connect to server", which is wrong
* Error 500 is supposed to mean "internal server error", but since
  we know that an authentication error can cause this, we now put
  up a better error message

Bug: 2933381
Change-Id: I9319a5ed6fbf4c92739f305b42b6b1cad7036a4b
2010-09-30 11:47:20 -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 4e400caab4 Merge "Switch to tablet style notification" 2010-09-29 18:35:47 -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 62c9df806e Two bug fixes related to preserving list scroll position
* When changing account/mailbox, reset scroll position.
Applied same change as I4b368f51 to MailboxListFragment.

Also fixed a bug introduced in the same CL.
When CursorLoader detects content changed events and reloads itself,
only onLoadFinished() gets called, and in this case we should keep the scroll
position.  This means mMailboxChanging should be cleared once data is loaded
for the next content changed reload.

Bug 3015916

* Don't try to make the selection visible when reloading the list for content
changed events.

We should make the selection visible only when account/mailbox is explicitly
selected.  We can use the same mXxxChanging flags for this.

Bug 3036317

Change-Id: I93e3653da6816f491c1e99c9ef6d6b947be4de37
2010-09-29 18:28:34 -07:00
Makoto Onuki 8818a658a1 Three pane layout
Implement basic behavior of the new layout.  Supports collapsing/expanding
message list on portrait.

TODO Collapsing the middle pane should cancel the selection mode on
     message list
TODO Implement animation
TODO On STATE_PORTRAIT_MIDDLE_EXPANDED state, right pane should be pushed out,
     rather than squished.

Change-Id: I0306516845de3a1f05a102864c3dc4aba809a49a
2010-09-29 13:38:32 -07:00
Makoto Onuki 2711c16a46 Merge "Don't use QuickContactBadge.assignContactFromEmail" 2010-09-29 12:46:59 -07:00
Makoto Onuki 6740c7b5ac Merge "Don't restore list view state when changing mailbox." 2010-09-29 12:46:53 -07:00
Makoto Onuki bc9253fb9a Merge "Rely on the fact that display name won't be empty" 2010-09-29 12:46:43 -07:00
Andy Stadler d22651ccd1 am 060b1df0: am a9bc41f5: Show server name instead of account name
Merge commit '060b1df06954be1d72a659b0f00e30b8057484e0'

* commit '060b1df06954be1d72a659b0f00e30b8057484e0':
  Show server name instead of account name
2010-09-28 23:14:27 -07:00
Andy Stadler a9bc41f5ec Show server name instead of account name
The format string "The server %s requires that you allow it to remotely
control some security features of your phone." was being displayed with
the account name instead of the server name.

Bug: 3011124
Change-Id: I1aadb5790297777831dd69f04ea89641240b7b87
2010-09-28 20:15:54 -07:00
Makoto Onuki e33a317db0 Expand hit-area for checkbox and star on message list
Bug 2561779

Change-Id: I4b71d48c9440e0f3c308fbe8ff16ada04b9df54e
2010-09-28 16:56:53 -07:00
Makoto Onuki ddfae933da Don't use QuickContactBadge.assignContactFromEmail
* assignContactFromEmail("") was causing the following exception on logcat.
"java.lang.IllegalArgumentException: URI: content://com.android.contacts/data/emails/lookup/,"

* This method is to set the contact to open when the badge is tapped,
  but we trigger quick contact by ourselves, so don't have to do call this.

Bug 3013527

Change-Id: I16e1573bd82ffe5c39d30b69361354010f508f91
2010-09-28 16:32:18 -07:00
Makoto Onuki dc33d50a24 Don't restore list view state when changing mailbox.
Bug 3015916

Change-Id: I4b368f511a94ec83723b571d1cfca1b3d39e4d04
2010-09-28 15:23:39 -07:00
Makoto Onuki c3b3b7a0a3 Rely on the fact that display name won't be empty
Change-Id: Ifd17daac472c1d439ddc4bd8e6811bb13a9018fa
2010-09-28 11:29:59 -07:00
Andy Stadler e242578a49 Make WebViews clickable DO NOT MERGE
* Makes the side-scrollable again
* Required after making them non-long-clickable

Requires companion change in WebView, to allow touch events while
clickable or long clickable (it had been requiring both)

Bug: 3036477
Change-Id: I4cae46d047f825d2aab08d254287855b187e9207
2010-09-27 15:54:37 -07:00
Andy Stadler 02a0edb60d Allow spaces in passwords DO NOT MERGE
* Separate/identical fixes for incoming, outgoing, exchange
* Unit tests
* Some protocols will fail anyway (e.g. POP3)

Bug: 2981433
Backport from: I82984e5912fc7fcb88e747815d0fe33cb36605e7

Change-Id: I49d5c13137e4f78b6fa0f9ce288c1a78ff028f88
2010-09-27 13:31:04 -07:00
Andrew Stadler fb4333b3a5 Allow spaces in passwords
* Separate/identical fixes for incoming, outgoing, exchange
* Unit tests
* Some protocols will fail anyway (e.g. POP3)

TODO: Some sort of warning (master only - won't backport that)
Bug: 2981433

Change-Id: I82984e5912fc7fcb88e747815d0fe33cb36605e7
2010-09-27 10:04:03 -07:00
Makoto Onuki 08346b67b8 Refactor for new notification UI
- Move the notifiaction code into a bg thread.
  We need to access db to fetch the latest message
- Extracted ContactStatusLoader.load to synchronously load contact
  pictures.

Change-Id: I282ffb706ea8e14558bf29880a0fb952868b27e5
2010-09-24 16:22:47 -07:00
Makoto Onuki 0824439785 Workaround for ListView bug related to smoothScrollToPosition
Hopefully it'll soon be fixed in the framework, but it's blocking what
I want to do now.

Bug 3028455

Change-Id: I43ed059b7766a3bfc29166464bd449d905b207e4
2010-09-24 13:05:55 -07:00
Makoto Onuki 4209ea36b0 Make ThrottlingCursorLoader smarter
Now the class initially uses smaller timeout, and expand it when detecting
multiple changes in a short period.

This CL makes the UI look more responsive especially on the message list +
message view mode.  e.g. Starring on the message view will quickly be
reflected to the message list.

Bug 3024799
Bug 3027832

Change-Id: Ie2d44c3769d43e3fd0f54ee526556eb3bad5e288
2010-09-22 18:01:01 -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 c8fb75035f Implement latest selection mode behavior
On the message list,
- Longpress toggles selection.
- Tap opens message

Now it should be in line with gmail.

Change-Id: I1ce441a13fd9b41e3d7d10c2f2e4d43e580db708
2010-09-22 16:51:30 -07:00
Makoto Onuki 58843f0dc3 Highlight selected message on message list
Also make sure the highlighted mailbox is always visible on the mailbox list.

MessageListFragment now just uses the default background color, which means
it no longer changes background color for unread messages or checked messages.
This should be re-implemented if necessary with the newer wireframe.

Change-Id: I9bfbe9f0711ea4ab56be27778b00298d3033123b
2010-09-22 14:44:23 -07:00
Makoto Onuki b4dacf2acf Don't show only special mailboxes on mailbox list
When a new account has just been set up and the app is still loading
mailboxes, keep the mailbox list empty and let ListFragment show
the progress icon, rather than showing "Combined Inbox" "All Starred" etc
without acutal inboxes, which looks like it's broken.

Change-Id: Ia3de4377b701f0033c5dc92f8b6b14651d4d8e1e
2010-09-22 14:03:06 -07:00
Andy Stadler ed824a07ae DO NOT MERGE Harden thumbnail creation
* Catch some errors earlier;  Log all errors.

Bug: 2905324
Backport from master: Icdf4ec881f404787a0621e606d7e611d5e50aab1

Change-Id: I817a770da2d158984476cfa2b10a5de6bc0b43f8
2010-09-22 13:24:46 -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 353b75b04b Fix NPE -- check isCancelled in onPostExecute
Bug 3024665

Change-Id: I97c122a6c66a7d4245187961cb90ea874d0e305d
2010-09-22 13:12:13 -07:00