UnifiedEmail: Use the cached attachment to save first

Now try to use the cached attachment to save first. If the attachment
is not cached, send the command to download it.

CRs-Fixed: 601682

Change-Id: I16917c192c76a077dcf478001e276c3b6a7f7e93
UnifiedEmail: Save the copied size as the file size

The downloadedSize of the attachment is the uiDownloadSize record in
the database, and it is not the size of the stored file.

Use the copied bytes count as the size of the saved attachment.

CRs-Fixed: 642897

Change-Id: Iff25c6181e07ec5d8dcafe3fee0e6168a4b6cfb4
UnifiedEmail: Display the load more view at the bottom of the mail.

 - Display the load more view at the bottom of the uncompleted mail.
 - Update the mail list if some mail's attachment flag changed.
 - Fix the test build error.

CRs-fixed: 642921

Change-Id: I1dabef5d52cf0f221843627bacbc8093616664a8
Email: Should back to Email after recording audio as attachment

When attach file in a new email, doAttach() will call
Intent.createChooser() to create an app list for usr
to choose. The Intent being sended to Sound Recorder
doesn't contain value of "exit_after_record". Thus,
when finish recording the audio, Sound Recorder will
not automatically exit and return to Email UI.

Add true value for "exit_after_record" to the Intent
that will be sended to Sound Recorder in doAttach().

CRs-Fixed: 646256

Change-Id: I4b9c846763f5100cdca12cbf7e9df7db22cc8b45
Email: Update the menu after the folder is changed

Since the supported options vary with different mailboxes and folders,
the option menu should changes with the folder. But before the folder
changing is finished, the menu is already prepared. So if the user
tries to click a non-supported menu option item, an exception will be
thrown.

Re-prepare the option menu after the folder is changed.

CRs-fixed: 650798

Change-Id: I931b484e299ed79e38f5651fd57e97f4d7b7253a
Email:Move the mails belong to the swiping folder

Since the record in mCurrView is not always cleared before it is
reused, when try to swipe a non-swipeable item, the cached item in
mCurrView might be used to swipe.

Clear the content of mCurrView if the touched item is not swipeable.

CRs-fixed: 649478

Change-Id: I18c19a1c1a661d0ce68481351376c2948210e617
UnifiedEmail: Fix unit test failure.

Some test cases are not suitable, need change them.

CRs-fixed: 652947

Change-Id: Iac2cc573fd57f68c193e2dcc9b1a0ef93d13dc72
Email: Do not invalidate the option menu when the search view expanded.

It will invalidate the option menu when the mail update. So the searchview
will request focus, lead the keypad flash.

Don't invalidate the option menu when the search option was expanded.

CRs-fixed: 675187

Change-Id: I834750410121e55b82395c8a16cae276ce161af3
UnifiedEmail: cleanup cmcc strings

Change-Id: I861cf754b23b940d1971aa3c64143f410420ac1e
Signed-off-by: Roman Birg <roman@cyngn.com>