Commit Graph

2920 Commits

Author SHA1 Message Date
Andrew Stadler
e4ecb50091 Convert AccountFolderList to use a Fragment
* Introduce AccountFolderListFragment and its layout
* Extract all list-related UI into it
* Fix leaking cursor in AccountsAdapter and add unit test

Change-Id: Ica566847d97927b736f515d434c6691c82343290
2010-06-18 15:32:10 -07:00
Makoto Onuki
91d47ccb47 Cleaning up MessageListFragment.
- Introduced EmptyCallback to avoid the flood of null checks.

- Fixed some TODOs in MessageListFragment.
  - Notably, sendPendingMessages() is now handled by the fragment itself,
    rather than by the activity.
  - Moved two DB accesss from the UI thread to a worker thread.

- Replaced the 'mailboxid < 0' check with isMagicMailbox(), which is more
  explicit and easier to understand.

- Renamed some methods in preparation of moving to the activity.

Change-Id: Ie730c2c561050bbfa83a38252fcf09d59238f7ea
2010-06-18 10:55:57 -07:00
Makoto Onuki
8d37132496 Merge "Don't use internal resources." 2010-06-16 14:32:52 -07:00
Marc Blank
e6cbf94202 Merge "Handle "Allow non-provisionable devices" properly" 2010-06-16 14:32:06 -07:00
Makoto Onuki
4df94867b4 Don't use internal resources.
Change-Id: I0edce125b3544724ad74e72d91b4abd40c244b09
2010-06-16 14:07:17 -07:00
Marc Blank
1d6dab2956 Handle "Allow non-provisionable devices" properly
* 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: I5f354a0e2d81844aff75d8a8a6de3b97f0020c1f
2010-06-16 13:14:36 -07:00
Marc Blank
8b7cb9cf03 Fix broken build
Change-Id: Ic6d1187ac475754057dd319684f59aa9ce9eeceb
2010-06-16 11:27:15 -07:00
Marc Blank
ca6647a679 Merge "Add tests for CalendarSyncAdapter" 2010-06-16 10:53:43 -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
Marc Blank
1a3b2f7de2 Add tests for CalendarSyncAdapter
* Test for creation of a typical event
* Test for creation of an event with redacted attendees
* More to come

Change-Id: Ica117cd20a9e270ffe49efed75607e92b4d8ac90
2010-06-11 16:31:15 -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