Commit Graph

106 Commits

Author SHA1 Message Date
Marc Blank
09fd4d0a18 New asynchronous attachment loading code
* Create AttachmentDownloadService to manage all attachment downloads
  1) User requested
  2) Required for email forwarding
  3) Opportunistic downloads to enhance offline use
* New attachment related UI (pending UX approval, of course)
  1) MessageView (attachment actions, progress bar, etc.)
  2) MessageCompose (attachments for forwarded messages)
  3) Associated toasts, notifications, etc.

TODO:
* Unit tests
* Cache Management (separate CL)

Change-Id: I7864a5fb1c3f4f2be68d98341a971edc6cbacfe1
2010-08-19 14:01:08 -07:00
Makoto Onuki
715a19be28 Show "Send outgoing mesasges" button in outbox.
It works for regular outboxes.  Unfortunately it doesn't for
Combined Outbox, due to a bug in RefreshManager, which I'll fix
in a separate CL.  (The fix might be rather large.)

Change-Id: Ib904e2c672801debe3dd64e4bb0a464564d098da
2010-08-18 14:23:09 -07:00
Makoto Onuki
6956533103 Deal with fragment API change.
- Use the class attribute instead of android:name in fragment tags.
- Use FragmentManager rather than openFragmentTransaction.

(There's a change on the PreferenceHeader tag too, but seems like we're
not using it.)

Bug 2922220

Change-Id: If604a97ac73b9ad7d84e453d36beb84bf31ff98f
2010-08-16 14:10:47 -07:00
Andrew Stadler
641ae45358 Fragmentize Exchange setup
Change-Id: Ib331d9a7f7be7acbfe355d6a03d9ae07af0cc627
2010-08-11 16:07:26 -07:00
Andrew Stadler
faaa115e1a Fragmentize outgoing settings (SMTP)
Also fix a small NPE in AccountSetupIncoming

Change-Id: I5728a10889a3f0f35d31962f4a13ccae4ec0393b
2010-08-10 17:45:57 -07:00
Andrew Stadler
1b156352f3 Fragmentize Incoming settings (IMAP/POP server)
Also, extract DuplicateAccountDialogFragment for reuse.

Change-Id: I042a158e264d949024347d477d6e9ec999c244d3
2010-08-10 14:28:20 -07:00
Andrew Stadler
a75bab5504 Fragmentize AccountSetupBasics
Change-Id: I99eb4cd4f8aa80d25a01d720244ccee599cba1d8
2010-08-09 22:44:41 -07:00
Andrew Stadler
71cc035c55 Fragmentize AccountSettings
This is phase 1, which simply replaces the phone UX with a fragment-based
equivalent.  A subsequent CL will convert it to a large-format multi-pane
version.

Also fix a latent bug in the signatures of the Incoming & Outgoing
settings, both in the reflection code and in the proguard flags.

Change-Id: I86e857af8b9573c0d6070bb21053ce65bb7fe8a0
2010-08-09 10:36:50 -07:00
Makoto Onuki
7ef278202e Clean up MailboxListFragment.
- Remove AsyncTasks, and use CursorLoader to load data.
- Get message counts for the drafts/trash mailboxes directly from
  the db column.
- Remove obsolete code from MailboxesAdapter.

Change-Id: I93c72977c19b60581e1169ba9bd429912ba3e68f
2010-08-02 16:33:23 -07:00
Makoto Onuki
2a9f783e34 Fix crash in one-pane message view
Forgot to fix the resource file.

Two-pane is okay because we don't put the class name in layouts.
(We create fragments at runtime.)

Bug 2887134

Change-Id: I033c2283be4b104941af34a1fbb5e4663337ef68
2010-08-02 11:47:10 -07:00
Makoto Onuki
206d4e842d Split up MessageViewFragment like we did to MessageView.
Break MessageViewFragment up into two fragments, MessageViewFragment, which
is used to show regular messages, and MessageFileViewFragment, which shows
EML messages.  (And their base class, MessageViewFragmentBase.)

MessageViewFragmentBase's javadoc has a class diagram.

MessageViewFragment is actually named MessageViewFragment2 at this point
so that GIT correctly finds out the rename from MessageViewFragment to
MessageViewFragmentBase.  I'll rename it back in a following CL.

Also added very basic unit tests for MessageView and MessageFileView.
At this point, they just make sure the activities really open and show
messages without exceptions.

I feel like the current naming schema for the activities/fragments is
kinda confusing.  Let me know if you come up with better names.

Change-Id: Iff948f4b68cfdb7c1e68f225927b0ce58d34766b
2010-07-30 15:38:53 -07:00
Makoto Onuki
e105fbe510 Break MessageView into 2 separate activities.
MessageView for regular messages and MessageFileView for EML files.

I'll break down MessageViewFragment too.

Change-Id: Iae66f33d8fb5de58084ab4aef31588e9743c5a18
2010-07-27 15:45:58 -07:00
Makoto Onuki
3918b0dbfc Merge "Renaming message_view_header.xml to message_view_fragment.xml" 2010-07-22 10:33:12 -07:00
Marc Blank
e6cc662abc Use AccountManager for POP/IMAP; refactor setup classes
There are two major, interrelated parts to this CL:

1) Clean up the activities to reduce the use of Intents to pass
   information between activities; instead, we use a common
   SetupData structure that automatically saved/restored as necessary
   during the setup flow.  A fair amount of code and inconsistent
   use of Bundle extras has been eliminated in the process.

   * Create SetupData structure, setters/getters, and initialization
     methods to simplify the preservation of state during setup flow
   * Remove all state/flow extras from Intents; Intents now only
     specify the Activity to be started, which should greatly simplify
     the transition to Fragments.
   * Remove all state/flow fields from Activities
   * Modify existing setup activity unit tests and confirm tests pass

2) Create AccountManager accounts for POP/IMAP email accounts to
   provide consistency in user experience.  Also, internal flows are
   now identical as between account types.

   * Move account reconciliation from SyncManager to MailService, so
     that reconciliation is consistent between email and exchange
     accounts; move unit tests as appropriate
   * Add a "Sync Email" setting for POP/IMAP/EAS
   * Change MailService to respect the "Sync Email" setting in
     Settings -> Accounts & sync
   * Create PopImapSyncAdapterService to handle manual POP/IMAP sync as
     requested by SyncManager; add EmailSyncAdapterService to perform
     the same function for EAS
   * Use new PopImapAuthenticatorService to add AccountManager accounts
     for POP/IMAP accounts; setup appropriate stanzas in AndroidManifest
     and add related xml files
   * Update AccountSettings to use SetupData

Miscellaneous other changes:

   * Only allow valid port numbers in incoming/outgoing setup

Bug: 1712475

Change-Id: Ibdac52fb2c5578b86bf3992ddb1acd10f162391a
2010-07-21 19:01:41 -07:00
Makoto Onuki
411314990d Renaming message_view_header.xml to message_view_fragment.xml
Change-Id: Id0ccc13bfd8dfa63b450d46989938295ba8e78e0
2010-07-21 17:23:39 -07:00
Makoto Onuki
d6a2978857 First cut of two pane activity.
How to launch:
- Kick "Email 2 Pane" in the app drawer.

Major known issues:
- When you launches "Email 2 Pane", it starts directly; the logic in Welcom
  won't be executed.
- There's no UI to add accounts.  Use the old UI.
- There's no way to select non-default accounts.
- The on-screen buttons except for older/newer don't work.
- No contex menus work.

Change-Id: I38374acafafbae62e46f84294a7677e54686cfc2
2010-07-21 16:30:52 -07:00
Makoto Onuki
16a60dca84 Fragmentize MessageView.
This version is hybrid of the old design and what Andy's suggested.
- MessageViewFragment is responsible to show a single message at a time.
- Call MVF.openMessage() to tell it to open another message.
  No need to re-create a new MVF to do this.
- MessageView manages the message list, and handles "move-to-newer/older"
  buttons.

Reason for not re-creating a fragment when opening another message is:
- Re-using the same fragment doesn't make it as complecated/ugly as I
  was initially afraid.
  It's basically cancelling all running tasks, re-initializee some views,
  and load a message.
- We don't have to run MVF.onCreate() over and over again when moving through
  messages.
We may change the strategy later, but I think it's suffice for now.
(Changing this might affect how the back key works, so let's revisit it
when the fragment manager supports back.)

Basically this CL is all about internal changes.
No UI should have changed except for:
- Moved "Move to newer/older" buttons to the bottom.

Also fixes:
Bug: 2849129

Change-Id: I00c05069231afded9d98d3d52dd9a7925ebdee9d
2010-07-19 18:34:40 -07:00
Makoto Onuki
7daacf83a4 Switch to ListFragment, and use its default layout.
Change-Id: If8dead170a3662cbde87e6ead244363b11db01f6
2010-07-09 13:22:53 -07:00
Makoto Onuki
42e3f10a95 Use "*#*#36245#*#*" to activate the debug screen.
Dial *#*#36245#*#* on the dialer to activate the debug screen.
"36245" = "email"

It's useful when
- There's no keyboard.
- There's no account set up yet.
  (You can do it by entering the special username/password on new account
  screen, but that's a bit of a pain.)

It's also easier to tell to people.

Also, removed "sensitive logging", which should never be used.

Change-Id: Id692f8b216f2d85abe1880c452d2067f170dac83
2010-07-01 16:15:07 -07:00
Andrew Stadler
d5b2da3716 Add ActionBar to MailboxList
Note: This does not appear in UX wireframes, this activity is going
away eventually, but it's a good testbed for ActionBar to be tried out.

Open issues:
1.  Waiting for progress indicator support, using unattractive hack
2.  Subtitle doesn't seem to work so putting account name in title
    (which is the wrong font size for phone portrait mode).

Change-Id: Iee3cac7d4f30ea210bd8f3838b69ed12cd498375
2010-06-29 16:49:47 -07:00
Makoto Onuki
91093ee6e8 MessageList: Introducing "selection mode".
- Long-press an item to go into the selection mode.
- In the selection mode, tap items to toggle selected/non-selected.

This also means:
- No checkboxes any more.
- No context menu any more.

Color scheme hasn't been updated yet, so it looks a bit ugly for now.

Change-Id: I3cb6c45c1dc5461a234c9e9ab9e038c90a9fe8b2
2010-06-23 16:23:41 -07:00
Andrew Stadler
e4ecb50091 Convert AccountFolderList to use a Fragment
* Introduce AccountFolderListFragment and its layout
* Extract all list-related UI into it
* Fix leaking cursor in AccountsAdapter and add unit test

Change-Id: Ica566847d97927b736f515d434c6691c82343290
2010-06-18 15:32:10 -07:00
Makoto Onuki
4df94867b4 Don't use internal resources.
Change-Id: I0edce125b3544724ad74e72d91b4abd40c244b09
2010-06-16 14:07:17 -07:00
Makoto Onuki
601187db42 Introducing MessageListFragment.
- Extracted MessageListFragment out of the MessageList activity.
- This is basically pure extraction, with the following conceptual change.
  - Now the MessageList activity doesn't know the mailbox id or
    the account id.  If it needs these ids, it needs to ask the fragment.
  - MessageListFragment.LoadMessagesTask tries to determine the account ID
    if it's unknown.

Most code in MessageListFragment is directly copied from MessageList
with minimal changes (e.g. pass mActivity instead of 'this' as a Context).
There's a few cleaning up oppotunities.  I'll work on them later in a separate
CL.

Change-Id: Ie004cc49b429f2cd8f9de73df5abb94f3054ea0a
2010-06-14 10:20:29 -07:00
Andrew Stadler
80091c8ef7 Refactor MailboxList to use Fragment API
* Moves all list-related implementation to new MailboxListFragment
* One item that remains to be done is to remove the dependency on the
  activity for handling context menu (longpress) in the list.

Change-Id: I7b5769d9d81fb685cf480de3d3e18b4e1c078f2d
2010-06-07 16:02:52 -07:00
Makoto Onuki
cfe95a8333 Added a label to Exchange device ID.
Bug 2610257

Change-Id: Ie065514e942a01dc5ae3c81bc79a2501f67390e1
2010-05-17 14:30:15 -07:00
Makoto Onuki
12b4bc9e80 Show device id on the exchange setting screen.
I've attached a screenshot on the referenced bug.

Also fixed a bug in SyncManager.getDeviceId() where sDeviceId cache wasn't
working.

Bug 2591124

Change-Id: I4b58517c095a96d47fb57179d70091b2c7af5249
2010-04-13 17:10:26 -07:00
Makoto Onuki
75e31dc17b Fix layout issue introduced with I5b680418
I shouldn't have changed the layout_height.
I changed it as a trial, and the final version of the fix didn't require this.

Bug 2581421

Change-Id: Ie06f813ed6d65a128381a99b9efeaa8d9275b5bf
2010-04-08 15:00:35 -07:00
Makoto Onuki
9623a4ce6f Increase usability of invite components in MessageView
* Make yes, no, maybe, etc. larger (easier to touch)
  (bug #2561772)
* Make the accept/decline/maybe buttons focusable
  Make the "View in Calender" a button
  (bug #2561767)

Change-Id: I5b68041835e9d85e5290a30fe7910837b577c003
2010-04-07 16:45:23 -07:00
Adam Powell
4e1c6d3c36 Remove overscroll
Change-Id: Ie0dc5c4d58a9e970b47aa7bcc33586d5f690adeb
2010-03-29 16:46:19 -07:00
Romain Guy
7b9ad4720a Fit & finish for the Email application.
This change removes unnecessary padding, enables overscrolling only when the content
of the various scrollviews is larger than the scrollview and makes sure the content
of the scroll views is measured correctly.

This fit and finish applies to the new account setup wizard only.

Change-Id: Ia5b5e66782b842e52f7acf8e3f84ce922a594eb3
2010-03-16 14:00:28 -07:00
Andrew Stadler
26b4b47fb3 GAL UI cleanup work (in progress)
Provider:
  * Move UI (e.g. separator) out of provider, create it entirely in adapter
  * Remove timestamp based disambiguation (TODO throttling some other way)
  * Add cursor "extras" to report total # of results on server
UI:
  * Rewrite background-foreground threading to be more efficient and
    signal changes back to UI by calling notifyDataSetChanged())
  * Separator strings per Rich's UI (not using real strings yet)
  * Remove link back to AutoCompleteTextView

NOTE:  There's a bug in ACTV that is causing the window size not to
change properly on notifyDataSetChanged().  Framework team to investigate.

Bug: 2249514
Change-Id: I183b200dcdaa268f0612d2de6442db28e1491d40
2010-03-15 19:17:03 -07:00
Andrew Stadler
e2c56fc88c GAL support
* Provides GAL autocomplete in email address fields in message composition.

General TODO list:
UI: Implement divider in adapter, not in GAL provider
UI: Use listview_separator for divider
UI: Clean up strings, move all to resources
UI: Only have one GAL lookup in flight at any time
UI: Unit tests

GAL: Use side channel for status, not a row
GAL: Shorten timeout for interactive GAL lookup
GAL: Make watchdogs work
GAL: Figure out why some calls never return (conn pool exhaustion?)
GAL: Unit tests

Bug: 2249514
Change-Id: I513e25628bc2f5ed0920e0ee509cd598b1817b3a
2010-03-15 11:12:34 -07:00
Mihai Preda
794f29176d MessageView: EAS calendar meeting invite answer buttons. 2010-02-26 21:12:24 +01:00
Marc Blank
5b46171b83 Fix #2443881 (Don't display User name field for EAS account)
* Make the field and label GONE for EAS accounts
* Enable the "Done" button at all times for EAS accounts
* Add test case for this, and clean up bad formatting in tests

Bug: 2443881
Change-Id: Ic80b001e443fa37b7cfeb810b1f31edf22b065b9
2010-02-20 15:05:39 -08:00
Andrew Stadler
643ca675b6 Placeholder invite-accept UI
This is a lightweight placeholder so calendar functionality can be
tested.  Simply presents a message about the invitation, and a set of
yes/maybe/no buttons to click.

The UI is shown whenever the message appears to contain an invite.

There are many elements left to be done here:
TODO: response code (EAS protocol) doesn't seem to work
TODO: use real assets & design
TODO: provide a click-link into calendar event
TODO: show calendar icon in messagelist too
TODO: (if possible) persist user's response in button state?
2010-02-16 22:02:50 -08:00
Mihai Preda
b052885ea3 Email: husky title for MessageList & MailboxList.
Bug: 2419716
2010-02-11 17:59:00 +01:00
Andrew Stadler
842ac04828 Legacy account migration
* Create new activity to encapsulate account upgrade
* Populate it with a list of legacy accounts, and progress bars for each
* Sidestep Welcome when there are legacy accounts to convert
* Super lightweight account migration:
  - Account login info only
  - no folders, messages, or attachments
* Scrub out old data
* Return to Welcome screen

As noted, the copies working (useable) POP & IMAP accounts, but does
not try to deal with folders, messages, or attachments.

Bug: 2065528
2010-02-10 23:18:19 -08:00
Makoto Onuki
91237e9dcb Adding script for building Email app without exchange.
remove-exchange-support.sh makes it possible to build the email app without
exchange support.

This script:
- removes all packages under com.android.exchange.
- removes all lines surrounded by EXCHANGE-REMOVE-SECTION-START and
  EXCHANGE-REMOVE-SECTION-END

And the resulting source should still build and run fine.

Bug: 2369784
2010-02-03 11:39:46 -08:00
Marc Blank
f3fcb8929e Implement Exchange calendar sync support
What should be working:
* Events sync down from server and appear in calendar
* Recurrences and exceptions appear in calendar
* Changed events on server should be reflected in calendar
* Deletions on server should be reflected in calendar
* Push of new/changed/deleted events should work
* Changes on device are NOT synced back to server
* New, single events on device are synced back to server
  (no time zone, attendee, or recurrence support)
* Checkbox for syncing calendar added to setup flow
* System sync glue in manifest, etc.
* Bugs are to be expected
* A few unit tests; needs more

Change-Id: I7ca262eaba562ccb9d1af5b0cd948c6bac30e5dd
2010-01-28 09:18:48 -08:00
Romain Guy
a4d32a8fec Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
2010-01-08 15:11:47 -08:00
Mihai Preda
af1bf48773 MessageView: upon delete move to older instead of newer.
Bug 2233586
2009-12-22 15:16:14 +01:00
Mihai Preda
77ee78152b MessageView: center the presence dot with the From text.
Bug: 2216938
2009-10-28 17:54:52 +01:00
satok
3045bb967f Add view of all counts in AccountFolderList
BUG: 2201097
2009-10-21 07:19:10 +09:00
satok
fa368b50d6 Clean up appearance of unread counters
BUG: 2161746
2009-10-20 03:18:27 +09:00
satok
7b16a280d9 Fix the apparance of title according to Gmail
BUG: 2161477
2009-10-15 08:46:52 +09:00
Andrew Stadler
d5e7afa1eb Remove obsolete resources & code
* FolderMessageList
* Fat title bar (remnants)
* Drawables

Bug # http://b/2071133
2009-10-11 22:09:39 -07:00
Mihai Preda
affa5660e7 MessageView: UI change prev/next arrows.
Bug: 2149187

The prev/next buttons now each extends half the width, and are on black background.
2009-10-09 14:17:49 +02:00
Mihai Preda
1ef86a50f8 MessageView: scroll to (0,0) on message change.
Bug 2156934.
2009-10-06 16:36:44 +02:00
Evan Millar
82d201b33a FastTrack->QuickContact
Change-Id: I7fc4b053ef86c9bc8374167dc11b1c04934a77bb
2009-09-30 19:49:39 -07:00