Commit Graph

2681 Commits

Author SHA1 Message Date
Todd Kennedy 5e4f1c3872 Allow globals in the providers.xml
There are two ways globals can be specified. There can be only one global
character ['*'] and/or multiple wildcard characters ['?']. The global
will match zero or more characters. The wildcard will match any character.

bug 4090086

Change-Id: I07e3edebd1fe989094c68cf047ce5bc9fb91aba0
2011-03-31 14:28:43 -07:00
Makoto Onuki 44f45f4221 Merge "Don't use findViewById (part 1 -- account setup)" 2011-03-31 11:06:15 -07:00
Todd Kennedy aaec6a9a2b Merge "Disallow editing username after account creation" 2011-03-30 14:47:28 -07:00
Makoto Onuki 2fbb3db5d8 Don't use findViewById (part 1 -- account setup)
Added two new functions:
- UiUtilities.getView()
  is a fail-fast version of findViewById().  Crashes when there's no view
- setVisibilitySafe()
  same as View.setVisibility, but doesn't crash even if a view doesn't exist

Let's try to avoid the use of findViewById(), and instead use getView(), *right
after* the layout is inflated, so that we'll always fail-fast if a layout
doesn't have a required view.  (Rather than getting a NPE only when the view
is really accessed, which can be in a code path which is rarely executed--e.g.
only when there's a protocol error.)

Let's only use findViewById() only when we're sure no all the variants of a
layout have the view in question and leave a comment to make it clear it's on
purpose.

(UiUtilities has been moved from com.android.email to
com.android.email.activity)

Change-Id: I36e0bab65a989f5d34cf636f13e1eaee084547af
2011-03-30 13:47:13 -07:00
Todd Kennedy 206109cf44 Disallow editing username after account creation
After the account is created, don't allow editing the user name. We want to
prevent this as the user name is core to the account and changing the user
name is tantamount to creating a new account.

bug 3502279

Change-Id: I1d89710fd48aca67ba13abea5bdbdc1d87941618
2011-03-30 08:54:34 -07:00
Todd Kennedy e369f2772c Merge "Allow globals in the providers.xml" 2011-03-29 15:28:13 -07:00
Todd Kennedy 08534762bd Allow globals in the providers.xml
We now allow a single global character ['*'] to be specified somewhere in
the domain attribute. Additionally, we will replace the string "$domain"
with the matched domain in all attributes -- user name, password and URIs.

bug 4090086

Change-Id: I46a637ed364c1a079e1230fa22393a1bac059b1f
2011-03-29 11:12:13 -07:00
Makoto Onuki 9e53322ee7 First path of MessageList cleaning up
- Menu now works
- Removed a lot of unnecessary/soon-to-be-unnecessary code.
  Especially,
  - multi-selection panel is now replaced with CAB
  - SetTitleTask will be replaced with a loader
- Removed the option menu xml for magic mailboxes
  (The regular one should work for them as well)

Bug 4184142

Change-Id: I52adff6d711232d536b6f00367a240e1faeea14b
2011-03-28 16:36:01 -07:00
Todd Kennedy d31238ca88 Add support to query for message IDs
If an IMAP server supports the UIDPLUS capability, it can return the new UID
as part of the response to the "UID COPY" command. However, if the server does
not support UIDPLUS, we perform a SEARCH to try to determine the new message
UID.

This is the second of a couple modifications.

bug 4092301

Change-Id: I1f548b63becfec8733cb8ba9a3fe6ff4be6fdd83
2011-03-24 10:56:42 -07:00
Todd Kennedy 1e3a5f3ab1 Don't load from the network until specified
We were always loading from the network for HTML messages. Now we don't
load from the network until the user clicks the "display images" button.

Change-Id: I1838b6cb09d49a2b521baa12a80239107391534f
2011-03-23 16:48:23 -07:00
Makoto Onuki 9f0283dbd7 Merge "Better fix for the PendingIntent issue." 2011-03-23 15:30:51 -07:00
Todd Kennedy 284d8d7db5 Add support for UIDPLUS capability
When copying messages between mailboxes using standard IMAP, we must perform
a QUERY or FETCH in order to determine the new message UID. However, if the
server supports the UIDPLUS capability, the server will return the new UID
as part of the response to the "UID COPY" command.

This is the first of a couple modifications. We still need to fallback to a
less efficient QUERY/FETCH if the server does not support UIDPLUS.

bug 4092301

Change-Id: I9279f7fd70daf85adba3b3e202c12d67ddf91f22
2011-03-23 15:15:45 -07:00
Makoto Onuki 308ce92847 Better fix for the PendingIntent issue.
Refactor the changes introduced in Ib02842bb.

- Now Welcome and AccountSettingsXL accept intents with URLs of the following
style, and get IDs from query params, rather than extras.

Welcome:
content://ui.email.android.com/view/mailbox?ACCOUNT_ID=1&MAILBOX_ID=2&MESSAGE_ID=3

AccountSettingsXL:
content://ui.email.android.com/settings?ACCOUNT_ID=1

- Now the "new message" and "login failed" notifications use these new style
intents, so the system wouldn't merge PendingIntents for different accounts.

Also:
- Moved all notification creation logic to NotificationController.
  (Except the one in CalendarSyncEnabler; which is used only to support
  upgrading from pre-froyo and I don't think it's worth refactoring.)

- Note the "password expired/expiring" and "security needed" notifications
aren't changed; they still use extras to store account IDs.  This is okay
because these notifications are not per-account.

Bug 4065269

Change-Id: I70737438d2e7c45fd7488a5b0a7105c8568e02f7
2011-03-23 14:49:38 -07:00
Makoto Onuki ae72ec88ce Compose: Set focus to the To field by default
We initialize the focus with setNewMessageFocus(), but it's only called
from processSourceMessage() (for EDIT_DRAFT) initFromIntent() (for other
actions, except for "new draft").  We didn't intialize the focus for new
drafts.  Let's just get the To field to get the focus by default to
cover this case.

Bug 4048238

Change-Id: I50cd69b8813198c96beab2025576d390520dc6a4
2011-03-22 11:43:12 -07:00
Makoto Onuki ca64197427 Merge "Improve EmailAsyncTask" 2011-03-21 17:31:48 -07:00
Makoto Onuki d72f7bdf11 Improve EmailAsyncTask
Added 6 methods:
- execute{Parallel,Serial}
- cancelPreviousAndExecute{Parallel,Serial}
- runAsyncParallel{Parallel,Serial} (replacement for Utility.runAsync)

Bug 4083415

Change-Id: I5ca33000e52fc5265ccc84a6e5acb0d3359d0eb4
2011-03-21 16:41:08 -07:00
Todd Kennedy a3bc8a2a9f Merge "Don't sync messages moved from the sent folder" 2011-03-21 16:41:00 -07:00
Todd Kennedy 9134916c39 Make method forceLoadSettings() private
Change-Id: Idc36fa205046d19f9a6a9c92c10a9a6f637f1663
2011-03-21 16:18:03 -07:00
Todd Kennedy c17e9ce85f Don't sync messages moved from the sent folder
Modified location of the test to processUploadMessage() method. We do this to
prevent creating multiple EmailContent.Message objects.

bug 4096266

Change-Id: Id83d3703283c0cd89a60c6210976093d39fb6934
2011-03-21 16:13:15 -07:00
Todd Kennedy 5a50442874 Reload server settings after auto discover
There is an optimization to prevent re-loading server settings if they've
arlready been loaded once. However, in certain circumstances (e.g., server
setting auto discover), we want to be able to reload the server settings.

bug 4091290

Change-Id: I03c47a7fe3b45d1c581401ac891895a00315d45b
2011-03-18 08:56:13 -07:00
Todd Kennedy dece5050c2 Don't sync messages moved from the sent folder
When processing message updates, we handle messages in the "sent" folder
specially. We continue to do that. However, we must also check that the
given message is still in the "sent" folder.

bug 4096266

Change-Id: Iaa47512fad287e63d8216b755a761b52b324cfff
2011-03-17 13:16:36 -07:00
Andy Stadler b959d9b9b2 am 22759bac: Handle complex chars policy correctly
* commit '22759bacd95385d95d3d9321f490763df1aba89d':
  Handle complex chars policy correctly
2011-03-16 12:38:57 -07:00
Andy Stadler 22759bacd9 Handle complex chars policy correctly
* We needed to set DevicePolicyMnager.PASSWORD_QUALITY_COMPLEX
* Setting this, we also need to clear some of the defaults for complex
  mode that are not correct for Exchange's definition of "complex".
* Unit tests

Bug: 4092218
Change-Id: Iea7bd05d48f1aa9406222c1db5937cfd7f2662b8
2011-03-16 09:48:08 -07:00
Andy Stadler 033d911dce am 714b2f2d: Merge "Reduce chance of crash when dismissing dialogs asynchronously" into honeycomb-mr1
* commit '714b2f2da36d750eb4acbf505398a44b93546322':
  Reduce chance of crash when dismissing dialogs asynchronously
2011-03-15 23:51:02 -07:00
Andy Stadler a685d3b019 Reduce chance of crash when dismissing dialogs asynchronously
* Caught & diagnosed by crash while checking settings
* Also possible in MoveMessageToDialog

Bug: 3412875
Change-Id: Ie78c61cf5ca10ce1eedc25ba2eb97ed0ac5bc615
2011-03-15 15:02:48 -07:00
Andy Stadler ee6686043a am 0820e008: Merge "Fix race condition NPE caught by monkey" into honeycomb-mr1
* commit '0820e00841aca88e70a88a25e891c156fa578088':
  Fix race condition NPE caught by monkey
2011-03-11 08:56:59 -08:00
Andy Stadler 5f830f8608 Fix race condition NPE caught by monkey
Bug: 4080321
Change-Id: Ia6ef0a47f87ffdc96269a95cc3bc5564d2e98440
2011-03-10 14:56:10 -08:00
Todd Kennedy d43ebd7804 am 19829ef7: Merge "Fix NPE when trying to open attachments" into honeycomb-mr1
* commit '19829ef7edfe1a72a88e0ba57f3ce6c57d9ae8f6':
  Fix NPE when trying to open attachments
2011-03-10 14:27:19 -08:00
Todd Kennedy f94fdfd4b5 am d135ac61: Merge "Update attachment buttons after loading attachment" into honeycomb-mr1
* commit 'd135ac61ee22c81509c71273b2d053fc36ea210a':
  Update attachment buttons after loading attachment
2011-03-10 14:25:40 -08:00
Todd Kennedy 19829ef7ed Merge "Fix NPE when trying to open attachments" into honeycomb-mr1 2011-03-10 14:23:05 -08:00
Todd Kennedy 074cc5869d Update attachment buttons after loading attachment
We would update the attachment buttons if the UI was becoming visible (i.e.
coming back from a settings page), but, we weren't updating them after the
attachment finished loading.

bug 4074694

Change-Id: I9d235620b5a92c2bbb871f70c9d97350cc151ce8
2011-03-10 09:06:13 -08:00
Todd Kennedy edd1c9ac7e Fix NPE when trying to open attachments
The attachment info may be null when we attempt to mark them for downloading.
Add a null-check before we try to dereference the info structure.

bug 4053184

Change-Id: I831e3abd100664c92f7af585014a03250e40ff64
2011-03-09 17:00:46 -08:00
Marc Blank 225a3ea0b6 am 70e99aa9: Merge "Fix download of non-smart-forwarded attachments" into honeycomb-mr1
* commit '70e99aa97f027f9a7dd19e28f978258025f7d9ed':
  Fix download of non-smart-forwarded attachments
2011-03-09 16:17:33 -08:00
Marc Blank 180b6bdaac am 0af709c2: Merge "Make sure services are started when Email application starts" into honeycomb-mr1
* commit '0af709c2c5f953d8f519af8672c01473d7eed2a3':
  Make sure services are started when Email application starts
2011-03-09 16:15:30 -08:00
Marc Blank 4af17a654b am e233fe31: Merge "Only allow prefetch when on a WiFi network" into honeycomb-mr1
* commit 'e233fe315b5fdc5050ea4e3428856a5370567062':
  Only allow prefetch when on a WiFi network
2011-03-09 16:13:14 -08:00
Marc Blank 70e99aa97f Merge "Fix download of non-smart-forwarded attachments" into honeycomb-mr1 2011-03-09 16:12:10 -08:00
Marc Blank 0af709c2c5 Merge "Make sure services are started when Email application starts" into honeycomb-mr1 2011-03-09 16:10:16 -08:00
Makoto Onuki 2a47caef7d am 553037ba: Merge "Fix NPE in NotificationController" into honeycomb-mr1
* commit '553037ba4ecfc72d68743eff223e16fb9511d7c1':
  Fix NPE in NotificationController
2011-03-09 16:09:00 -08:00
Marc Blank e233fe315b Merge "Only allow prefetch when on a WiFi network" into honeycomb-mr1 2011-03-09 16:08:32 -08:00
Makoto Onuki 27372998d6 am dd6e6b85: Fix bug 3509555 make notification always open right account
* commit 'dd6e6b850462fd8617a73dd40b5e7d32f0aaf5ed':
  Fix bug 3509555 make notification always open right account
2011-03-09 16:06:48 -08:00
Makoto Onuki 553037ba4e Merge "Fix NPE in NotificationController" into honeycomb-mr1 2011-03-09 16:03:17 -08:00
Makoto Onuki 43c455eb26 Fix NPE in NotificationController
This would happen when a message has no from addresses.

Bug 4027170

Change-Id: I1da091a6a55b274805ee6b3e109cbeb55a21fae1
2011-03-09 15:12:30 -08:00
Marc Blank 308ecfcc7e Fix download of non-smart-forwarded attachments
Bug: 3506114
Change-Id: Id3166402b0922eb1774ff484de249391fcc5e17c
2011-03-09 14:34:24 -08:00
Makoto Onuki dd6e6b8504 Fix bug 3509555 make notification always open right account
The problem was that:
- Each account now has own new message notification
- But PendingIntens for these all point to the same activity,
  only with different long extras (for acount IDs).
- Framework merges these intents, because extras don't count
  as a "difference"  in this case.
- So when multiple new message notifications are shown, they'll
  all share the same intent internally, so they'll all open the
  same account.

A quick workaround seems to be to set a unique URI to each intents.

Bug 3509555

Change-Id: Ib02842bb32634cfdf01ae2d684dd04dfede23832
2011-03-09 10:24:36 -08:00
Marc Blank 88b502c70a Make sure services are started when Email application starts
Bug: 4020337
Change-Id: I6c645800c75a4f1b80c5c3d081c4292b6db81f57
2011-03-08 16:44:08 -08:00
Todd Kennedy 0c149eef41 am ccc0e10b: Merge "Only delete attachments from drafts" into honeycomb-mr1
* commit 'ccc0e10bc7b62e38aa0c329e69941bcda9b338e4':
  Only delete attachments from drafts
2011-03-08 11:04:29 -08:00
Todd Kennedy ccc0e10bc7 Merge "Only delete attachments from drafts" into honeycomb-mr1 2011-03-08 10:59:23 -08:00
Makoto Onuki 665b180147 Merge "DO NOT MERGE: Make ACTION_SEND_MULTIPLE work with file: URI" into honeycomb-mr1 2011-03-08 10:32:34 -08:00
Todd Kennedy a94804c49e Only delete attachments from drafts
We should only be deleting attachments from draft messages and not all
messages.

bug 3489176

Change-Id: Ia1bd2894f3aabc1bfbfb36e2f5c486b47d6edf4f
2011-03-08 10:32:32 -08:00
Todd Kennedy 9106c9d245 am f42d5c62: Implement UI tweaks
* commit 'f42d5c6234bfb26f63a711fd59076964283fb7f0':
  Implement UI tweaks
2011-03-08 07:58:46 -08:00