Commit Graph

2912 Commits

Author SHA1 Message Date
Makoto Onuki
4df94867b4 Don't use internal resources.
Change-Id: I0edce125b3544724ad74e72d91b4abd40c244b09
2010-06-16 14:07:17 -07:00
Makoto Onuki
34f29c8a74 Test for interaction between ImapStore and vendor policy.
Change-Id: I092b3a0f2f40d9aa19f2f61066362099c8b3f50b
2010-06-15 13:44:31 -07:00
Fabrice Di Meglio
200afe8c36 Merge "Fix bug #1661857 (switch from using meta feed to the new allcalendars feed)" 2010-06-14 15:11:40 -07:00
Fabrice Di Meglio
ecaddea386 Fix bug #1661857 (switch from using meta feed to the new allcalendars feed)
- update Events.DELETE constant

Change-Id: I3876025d8052d291029ad2bc2bfde2ed241dda2d
2010-06-14 15:11:12 -07:00
Makoto Onuki
3cbf0267eb Merge "Use Fragment's context menu API." 2010-06-14 15:04:21 -07:00
Makoto Onuki
2aa8ea4399 Use Fragment's context menu API.
Change-Id: I1be6b17ff5bc7fd5258366bc064251c6f79c0cc8
2010-06-14 14:49:02 -07:00
The Android Open Source Project
c537b7018e am 7a9b65fc: merge from froyo-plus-aosp
Merge commit '7a9b65fc1306714db3eaac604b0b95960b3e783a'

* commit '7a9b65fc1306714db3eaac604b0b95960b3e783a':
2010-06-14 11:46:38 -07:00
The Android Open Source Project
7a9b65fc13 merge from froyo-plus-aosp
Change-Id: I5c020c7dd4e9b0629254ff027f11af484d47ba8c
2010-06-14 11:44:20 -07:00
Makoto Onuki
62c316531c Merge "Introducing MessageListFragment." 2010-06-14 10:21:45 -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
Dianne Hackborn
75939a7dc8 Update to match new fragment context menu API.
Change-Id: I18950e55abd1e72d97f7a62393abe422001ee2f5
2010-06-12 11:28:26 -07:00
Makoto Onuki
9cbc6721c7 Merge "Fix NPE in Controller and MessagingController." 2010-06-11 16:34:36 -07:00
Makoto Onuki
7e1de3c484 Fix NPE in Controller and MessagingController.
Bug 2553401
Bug 2186777
Bug 2721133
Bug 2684365
Bug 2530534

Change-Id: I5185d9196deab5ba3a9866e2de2a9be04a04ca03
2010-06-11 15:54:41 -07:00
Makoto Onuki
5dfc6c9125 Merge "Extract MockVendorPolicy, add standard mechanism to inject it." 2010-06-11 15:13:00 -07:00
Makoto Onuki
36d3dfaeac Extract MockVendorPolicy, add standard mechanism to inject it.
One thing that bothers me regarding the new ImapStore is that there is no
tests to verify if the way how getImapId() uses a vendor policy hasn't changed.
This part is hard to test with a real vendor policy, and it can easily be
overlooked even if it's broken.

This CL offers ImapStoreUnitTests a way to test the interaction between
getImapId() and a vendor policy.

Also fixed a bug in VendorPolicyLoaderTest where it assumed the test apk
package name is "com.android.email.tests", but it may actually be
"com.google.android.email.tests" now.  (Broken since the test makefile
used inherit-package.)

Change-Id: I8feb616ea28cb5cae5b4fba57e363771014ac599
2010-06-11 15:11:15 -07:00
Marc Blank
3fa4e06cab am 1e7009c8: am b2422f28: am 7a358316: Merge "Work around problem w/ large CalendarProvider2 transactions" into froyo
Merge commit '1e7009c89e7e9aa7b2434ea4dac9a998c03ac373'

* commit '1e7009c89e7e9aa7b2434ea4dac9a998c03ac373':
  Work around problem w/ large CalendarProvider2 transactions
2010-06-11 11:33:03 -07:00
Marc Blank
1e7009c89e am b2422f28: am 7a358316: Merge "Work around problem w/ large CalendarProvider2 transactions" into froyo
Merge commit 'b2422f28d0897f9795e698c2aaba68156e794cbd' into gingerbread-plus-aosp

* commit 'b2422f28d0897f9795e698c2aaba68156e794cbd':
  Work around problem w/ large CalendarProvider2 transactions
2010-06-11 11:31:47 -07:00
Marc Blank
b2422f28d0 am 7a358316: Merge "Work around problem w/ large CalendarProvider2 transactions" into froyo
Merge commit '7a358316ae1c52fadf7ce8470fc5d257d1a71eaa' into gingerbread

* commit '7a358316ae1c52fadf7ce8470fc5d257d1a71eaa':
  Work around problem w/ large CalendarProvider2 transactions
2010-06-11 11:29:48 -07:00
Marc Blank
195f943548 am 7a358316: Merge "Work around problem w/ large CalendarProvider2 transactions" into froyo
Merge commit '7a358316ae1c52fadf7ce8470fc5d257d1a71eaa' into froyo-plus-aosp

* commit '7a358316ae1c52fadf7ce8470fc5d257d1a71eaa':
  Work around problem w/ large CalendarProvider2 transactions
2010-06-11 11:29:02 -07:00
Marc Blank
7a358316ae Merge "Work around problem w/ large CalendarProvider2 transactions" into froyo 2010-06-11 11:27:28 -07:00
Andrew Stadler
c82a73cc35 am a3b18142: (-s ours) am a3962dc7: am 572c06f9: (-s ours) DO NOT MERGE - Revert workaround for KeyguardLock problem
Merge commit 'a3b1814284a059f7728410eddb84986022d34685'

* commit 'a3b1814284a059f7728410eddb84986022d34685':
  DO NOT MERGE - Revert workaround for KeyguardLock problem
2010-06-11 11:27:13 -07:00
Andrew Stadler
a3b1814284 am a3962dc7: am 572c06f9: (-s ours) DO NOT MERGE - Revert workaround for KeyguardLock problem
Merge commit 'a3962dc7cf7df3ed7f135bdd4f6b934f75b51ee4' into gingerbread-plus-aosp

* commit 'a3962dc7cf7df3ed7f135bdd4f6b934f75b51ee4':
  DO NOT MERGE - Revert workaround for KeyguardLock problem
2010-06-11 11:25:56 -07:00
Andrew Stadler
057ee26f5b am 572c06f9: DO NOT MERGE - Revert workaround for KeyguardLock problem
Merge commit '572c06f91be8c809b8978d985259564f88c6f212' into froyo-plus-aosp

* commit '572c06f91be8c809b8978d985259564f88c6f212':
  DO NOT MERGE - Revert workaround for KeyguardLock problem
2010-06-11 11:24:27 -07:00
Andrew Stadler
a3962dc7cf am 572c06f9: (-s ours) DO NOT MERGE - Revert workaround for KeyguardLock problem
Merge commit '572c06f91be8c809b8978d985259564f88c6f212' into gingerbread

* commit '572c06f91be8c809b8978d985259564f88c6f212':
  DO NOT MERGE - Revert workaround for KeyguardLock problem
2010-06-11 11:23:54 -07:00
Andrew Stadler
572c06f91b DO NOT MERGE - Revert workaround for KeyguardLock problem
This reverts commit 3ee0cad5f5.

Because commit 284b62e1b8c3419bfd02c6fea5ba0a68146c06f8 fixes the underlying
conflict between DeviceAdmin policies and apps attempting to disable the
Keyguard Lock, this patch is no longer required.

Accounts with a server policy requiring a device PIN or Password will
now work properly.

Bug: 2737842
Change-Id: I533c27a01a8a331dc11a0cb84bcc78f48edf621c
2010-06-11 11:21:41 -07:00
Marc Blank
826c83a231 Work around problem w/ large CalendarProvider2 transactions
* We're seeing binder transaction failures when we try to send more than around
  1500 CPO's to CalendarProvider2 in a batch (the limit is related to memory
  usage in binder transactions)
* When an event has A attendees and E exceptions in an event, we currently must
  create A*E CPO's; this number can become very large and cause a binder failure
* The result of a failure is looping behavior, resulting in failed sync and very
  much reduced battery life
* The workaround here is to redact all non-organizer and non-user attendees from
  exceptions once we reach half of the maximum number of CPO's.  This has been
  determined empirically and is set to 500 CPO's in this CL
* We also reduce our sync "window" to 4 calendar/contact items per sync command
  to help limit the potential size of our batch
* For later releases, we should reconsider this and see if something that is more
  of a "fix", rather than a workaround, can be implemented

Bug: 2760514
Change-Id: I06ca1a1ae88c772342a9e46b5997c41678e95144
2010-06-11 10:44:39 -07:00
Marc Blank
9d56a515e6 Merge "Work around problem w/ large CalendarProvider2 transactions" 2010-06-11 10:34:07 -07:00
Marc Blank
5c34594dba Work around problem w/ large CalendarProvider2 transactions
* We're seeing binder transaction failures when we try to send more than around
  1500 CPO's to CalendarProvider2 in a batch (the limit is related to memory
  usage in binder transactions)
* When an event has A attendees and E exceptions in an event, we currently must
  create A*E CPO's; this number can become very large and cause a binder failure
* The result of a failure is looping behavior, resulting in failed sync and very
  much reduced battery life
* The workaround here is to redact all non-organizer and non-user attendees from
  exceptions once we reach half of the maximum number of CPO's.  This has been
  determined empirically and is set to 500 CPO's in this CL
* We also reduce our sync "window" to 4 calendar/contact items per sync command
  to help limit the potential size of our batch
* For later releases, we should reconsider this and see if something that is more
  of a "fix", rather than a workaround, can be implemented

Bug: 2760514
Change-Id: I2941b392ae1058a9ead8a79f0ac73f4eb345917d
2010-06-10 18:37:21 -07:00
Makoto Onuki
8cd8694b63 Merge "Renaming MessageListAdapter to MessagesAdapter" 2010-06-10 14:17:18 -07:00
Kenny Root
cf988934c8 am 45f86bbb: am be21f272: am 8cfeacdc: Import revised translations 2010-06-09 22:48:30 -07:00
Kenny Root
45f86bbbc3 am be21f272: am 8cfeacdc: Import revised translations 2010-06-09 22:47:27 -07:00
Kenny Root
23e8bd1b7f am 8cfeacdc: Import revised translations
Merge commit '8cfeacdcb371f0f7df5e3532a96fd75125f15224' into froyo-plus-aosp

* commit '8cfeacdcb371f0f7df5e3532a96fd75125f15224':
  Import revised translations
2010-06-09 22:46:33 -07:00
Kenny Root
be21f272a2 am 8cfeacdc: Import revised translations
Merge commit '8cfeacdcb371f0f7df5e3532a96fd75125f15224' into kraken

* commit '8cfeacdcb371f0f7df5e3532a96fd75125f15224':
  Import revised translations
2010-06-09 22:46:12 -07:00
Kenny Root
8cfeacdcb3 Import revised translations
Change-Id: Ic8818f3a44fe8cd06241ecdbad4082bf5afc828c
2010-06-09 22:41:54 -07:00
Jean-Baptiste Queru
65bca31122 am e70f4e74: merge from froyo-plus-aosp 2010-06-09 16:24:15 -07:00
Jean-Baptiste Queru
e70f4e74c8 merge from froyo-plus-aosp
Change-Id: Ibbc09c6cacf9d0f06ff88eec0fcf3a245e2e2535
2010-06-09 16:21:55 -07:00
Makoto Onuki
851f3219e2 Renaming MessageListAdapter to MessagesAdapter
in line with MailboxesAdapter.

Change-Id: I4ed387db2f5ce1f9bad282521c62eeec0c697db4
2010-06-09 14:43:43 -07:00
Marc Blank
d92abd08fc Stop log spew from SyncManager
Bug: 2734841
Change-Id: I9f14e4a4bfcd09c4e60ec4df2d7fc5cc7ef0aa51
2010-06-08 16:41:21 -07:00
Makoto Onuki
954bcd45b0 Move account deletion feature to Controller.
Change-Id: Icd3a7cc4ff0db8fb65d3e01868543e7ce8ea79e7
2010-06-08 10:25:09 -07:00
Andrew Stadler
96d40ec87b am 285486a2: (-s ours) am 3ee0cad5: (-s ours) DO NOT MERGE Workaround for KeyguardLock problem 2010-06-08 10:14:53 -07:00
Andrew Stadler
f184bba2c3 am 3ee0cad5: DO NOT MERGE Workaround for KeyguardLock problem
Merge commit '3ee0cad5f5e21a24dbe43d21afaac1dd76a2059b' into froyo-plus-aosp

* commit '3ee0cad5f5e21a24dbe43d21afaac1dd76a2059b':
  DO NOT MERGE Workaround for KeyguardLock problem
2010-06-07 18:32:45 -07:00
Andrew Stadler
285486a278 am 3ee0cad5: (-s ours) DO NOT MERGE Workaround for KeyguardLock problem
Merge commit '3ee0cad5f5e21a24dbe43d21afaac1dd76a2059b' into kraken

* commit '3ee0cad5f5e21a24dbe43d21afaac1dd76a2059b':
  DO NOT MERGE Workaround for KeyguardLock problem
2010-06-07 18:32:09 -07:00
Makoto Onuki
3f545a4060 Controller rework.
- Controller.Result is now a class rather than an interface,
  so subclasses don't have to implement empty methods.

- Replaced Threads with AsyncTasks, which is more light weighted
  because it uses pooled threads.

- Removed the Result argument from Controller's methods.
  These argumetns weren't used, except in serviceCheckMail.

  Regarding serviceCheckMail, the new code behave differenly from the old code.
  If there's already listeners registered when it's colled, they wouldn't get
  called in the old code, but they will in the new code.
  But I think this difference is okay because that's how it works for
  POP/IMAP accounts.

Change-Id: I37a857ce7c089c1a411cb7f1fcfcb72c9f5fd2a6
2010-06-07 16:33:44 -07:00
Makoto Onuki
f11399b1ea Merge "Fix for failing SecurityPolicyTests." 2010-06-07 16:16:00 -07:00
Makoto Onuki
0fb092b389 Fix for failing SecurityPolicyTests.
This fixes the following exception.

java.lang.UnsupportedOperationException
        at android.test.mock.MockContext.getApplicationContext(MockContext.java:82)

Bug 2725552

Change-Id: Iaca177defe5f5e836211c58270379da056fa64e0
2010-06-07 16:14:53 -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
afa85bb102 Fix typo on exchange server setting screen.
Bug 2742113

Change-Id: I43bd3d6328745169bacb1fd750cce0a08dc18742
2010-06-04 13:10:58 -07:00
Andrew Stadler
3ee0cad5f5 DO NOT MERGE Workaround for KeyguardLock problem
* The device policies that enforce the use of a device PIN or password
  can be sidestepped by apps that implement KeyguardManager.KeyguardLock
* This renders the policies unuseable
* To prevent this, the email app now scans for any packages holding the
  DISABLE_KEYGUARD permission.  The existence of any non-system app
  with this permission will put all security-enabled EAS accounts into
  a security hold, and post a dialog describing the problem.
* The user must uninstall any such app(s) in order to sync their EAS data.

Bug: 2737842
Change-Id: I4c96d76b12d9242b5c755dd60d7578a825fae597
2010-06-04 11:10:03 -07:00
Makoto Onuki
c7b6145c12 Fix the cache in Controller.
Turned out we can't reuse EmailServiceProxy, so only cache the account type.

Change-Id: I5499c2440082580d6f0739ae85b888f1afb65ba8
2010-06-03 16:31:20 -07:00
Makoto Onuki
a00bf4e0d0 Merge "Cache for Controller.getServiceForAccount." 2010-06-03 15:47:23 -07:00