- 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
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
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
MessageView for regular messages and MessageFileView for EML files.
I'll break down MessageViewFragment too.
Change-Id: Iae66f33d8fb5de58084ab4aef31588e9743c5a18
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
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
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
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
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
- 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
* Introduce AccountFolderListFragment and its layout
* Extract all list-related UI into it
* Fix leaking cursor in AccountsAdapter and add unit test
Change-Id: Ica566847d97927b736f515d434c6691c82343290
- 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
* 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
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
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
* 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
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
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
* 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
* 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
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?
* 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
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
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
* Improve appearance of basics screen and use simplified text
* Provide alternate text when in EAS account setup flow (from acct mgr)
* Change "Exchange/ActiveSync" button to "Exchange account"
* Add some spacing to the three buttons, to improve appearance
Bugs addressed:
2128055 Change string in account picker activity to Exchange
2132713 Welcome message for Email app is inappropriate when coming from
Settings -> Accounts & sync -> New account
We lost the reporting of connection errors in the UI. These were
originally displayed in FolderMessageList, under the name of each folder.
In the new implementation, we borrow the "undo" banner from Gmail and
display it whenever there is a connection error in a mailbox.
* Add banner, and code to animate it on/off the top of the list.
* Toggle banner whenever a connection state change occurs in MessageList
* Toggle banner whenever a connection state change occurs in MailboxList
* Slight change to callback semantics for sendMailCallback