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
Merge commit 'c257cfe6d38a59b9abd6dbe01558927062c088a9' into gingerbread-plus-aosp
* commit 'c257cfe6d38a59b9abd6dbe01558927062c088a9':
add meta-files about 3rd party projects
* Backport from master branch
* Send policy key of "0" when validating; this gets us the policies
even if "Allow..." is enabled (currently, we simply don't see the
policies)
* If we don't support all of the policies, send back the response
code indicating support for partial support. If we get a positive
response back, then we're good to go - the server allows devices
with partial support. Otherwise, we fail as we always have - with
the toast indicating that the device doesn't support required
policies
* Remove PolicySet.isSupported() and ensure proper field ranges
within the constructor
* Update tests as appropriate
Bug: 2759782
Change-Id: Ida5663a9b35c75ecc61a5f442be0bd60b433cb73
* Add this to processSourceMessage in the reply/forward cases
* Add unit tests for reply and forward case
Bug: 2734321
Change-Id: I6be8383fe5f217a4bda8e669cb69f439bc8e96b6
* During refactor of referenced change, a critical line of code
got lost; it's replaced in this CL
Change-Id: Ib6f405cdfa120f5cb5c879ab0f7df52d54970cb7
* Handle status 5 for Ping command (heartbeat of out range)
* Write unit test for heartbeat reset
Bug: 2834195
Change-Id: Ic7952a4b296cf15c6ba895d6579fe7956b171e5b
Introducing MessageOrderManager which maintains a message list for
MessageView. It's used to tell if there is newer/older messages
in a mailbox, and the id of them.
Also, slightly related to this, moved mWaitForLoadMessageId to
ControllerResults where it should belong.
Change-Id: I84e32180c7e84a317f2204bb10ad7245ec022dca
- These tests will probably not make sense with the upcoming UI change.
- Moved testAttachmentWritePermissions to UtilityUnitTests.
It's a test for createUniqueFile, which is now owned by Utility.
- Removed Long.MIN_VALUE hack from MessageView.
New tests should have something better.
Change-Id: I9a09e5e8080a165b010607d1fa3112bcaaab4f90
* Created MockProvider that can be used for testing the results of
ContentProviderOperation's for Calendar/Contacts (we can't use these
within our mock contexts because we can't instantiate the provider
classes within the Email package)
* Wrote some unit tests for MockProvider
* Use MockProvider to test addEvent, in particular how a user's attendee
status is stored, depending on whether the event is new or updated
Change-Id: I97f02d125eb7347726261e12ce70aadc539be1d4
* We need to include the intro text (--Original Message--, etc.) to
SmartForwards, and somehow this got in a past updat
* Add unit test for forwarding
* Fix unit test for reply so that it works localized
Bug: 2477988
Bug: 2685784
Change-Id: I8d92f00d37a434840ec3eb237f3901cd5dc7ad09
* We inadvertently broke this with a recent update that uses Uri
encoding for ItemId and CollectionId in SmartForward/Reply commands.
We need to allow colon (:) however for EAS 2.5; otherwise, sends
fail with HTTP 500
* Update unit test
Bug: 2821684
Change-Id: Ia6bdd2169513d1c13a8174dd599477a35df950f2
* The meaning of a busy status of "Busy" is uncertain; it could mean
"Accepted" or "Tentative", depending on whether the event was
created via OWA/Outlook or EAS
* We have interpreted it as "Accepted", which prevents the user from
actually accepting the event (as a state change is required for us
to send updates to the server/organizer)
* This CL changes the behavior such that a newly arriving event with
a "Busy" status is shown as "No response" in the Calendar, thereby
allowing the user to pick from any of the three possible options.
Bug: 2811859
Change-Id: Ie2c375278b79b47dedac02472dfe6e4cf1182b65
For EML,
- No menu
- No older/newer buttons
- No star
- No bottom buttons.
I've started to feel like the two UIs (one for regular messages and the
other for EML files) shouldn't be handled by one class; we probably
should separate them into two different classes. I'll see if I can
do that after fragmentize it.
Bug 2804147
Change-Id: I5ae162af546bfc21af27352c642d6b2a1e16cf0f
- Removed dead code/dead comment.
- Moved static utility methods to Utility.
- Renamed some methods.
- Changed the timing to call super methods.
Also:
- Internationalized formatSize()
- Added unit tests for createUniqueFile() and formatSize()
- createUniqueFile now uses File.createNewFile() instead of exists().
Change-Id: Ibc30e15b029ed5088954bd6fc9032e25dddf176e
* The code assumed that all accounts used the scheduler in MailService
whereas only those using MessagingController do so (i.e. EAS does
not)
* Change setupSyncReportsLocked to set the syncInterval for accounts
that don't use MessagingController to Account.CHECK_INTERVAL_NEVER
* Add unit test for the changed code
Change-Id: I74a3dae21d9ec16f9903bdf2a1c28092ae89cc50
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
When connecting to an IMAP, POP3, or SMTP server using SSL, perform
an explicit test of the certificate's host name against the server's
host name. Refuse connection if they do not match.
Bug: 2807409
Change-Id: Ib223170f1a5d57323a88037ad30fec15c6bbce20
* During the fix of a previous late-Froyo issue, a change was made that
appeared superficially correct, but was semantically incorrect. This
changed the sense of the test for whether a reply email was required
and caused the referenced bug.
* The trivial fix is to replace the test with the (older) proper one
Bug: 2764551
Change-Id: I7c72366252cf0607aee31ee0d76aca96a7d5fc2b
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