Commit Graph

2083 Commits

Author SHA1 Message Date
Marc Blank 4ef6c2b788 Add better comment to calendar color code
Change-Id: Ic4703a98826319031f356bed6da810affe8c76c8
2010-02-10 09:18:36 -08:00
Marc Blank fcf41c4d9e Fix #2432959 (Exchange events appear transparent in Calendar)
* Forgot to add alpha value to calendar color after retrieving
  from the color array

Bug: 2432959
Change-Id: I58710a550b374443f39c0ba7acdea9792f1382db
2010-02-09 22:01:42 -08:00
Andrew Stadler d71d0b223a Force security activation after new account create
On new accounts, we can accelerate the process of setting up security
by explicitly checking (at the end of the security process).  The user
is not required to "answer" the asynchronous notification.

This is an imperfect solution, as a slow initial sync could leave the
user in a non-synced Inbox (with a notification waiting for them), but
we can come back to this after we evaluate real-world performance.

Bug: 2387961
2010-02-09 17:24:55 -08:00
Andrew Stadler 50d1610c43 Relax device admin policies when accounts deleted
If an account is deleted, immediately recompute the aggregate
security policy, and apply it immediately.

When applying policies, handle "no policy" case by releasing device admin
status entirely.
2010-02-09 11:01:01 -08:00
Andy Stadler 34716bb6f9 Merge "Rewrite notes to acknowledge wipe-after-bad-passwords" 2010-02-09 10:11:11 -08:00
Andrew Stadler 5893e9e008 Rewrite notes to acknowledge wipe-after-bad-passwords
It turns out that we have already implemented the built-in version of
local-wipe-after-failed-passwords, and the notes about it were not
necessary.

It should be possible to connect to an account with local wipe
requirements and see proper operation.
2010-02-08 23:09:05 -08:00
Doug Zongker 0f42334af2 Merge "replace Email's private base64 class with one from android-common" 2010-02-08 20:28:20 -08:00
Doug Zongker f44a40cda1 replace Email's private base64 class with one from android-common
Convert all usages of com.android.email.codec.binary.Base64 to use
com.android.common.Base64 instead, except for Base64OutputStream
(which doesn't exist in android-common yet).

Change-Id: I339a1f451245138187080c7444fcabef8d13f8aa
2010-02-08 20:26:02 -08:00
Andrew Stadler 189c22a045 resolved conflicts for merge of 5f0f1879 to master
Conflicts:
	src/com/android/exchange/SyncManager.java
2010-02-08 17:57:54 -08:00
Andrew Stadler 2a5eeea921 Adding security hold flag to accounts
* Add hold flag to Account flags
* Add code to set it (when EAS reports policy failure)
* Add code to clear it when we see changes from the device admin side
* unit tests

This should be sufficient to restart sync of an account which is on hold
due to security policy requirements.  Note, this is considered a "retry",
and if the account still does not meet requirements for some reason, it
is expected that EAS sync will call policiesRequired() again.
2010-02-08 17:42:42 -08:00
Andrew Stadler 5f0f18790f am 26c95dda: Update accounts backup when externally deleted
Merge commit '26c95ddace076ead10d5c42986bcc70b465e9791' into eclair-plus-aosp

* commit '26c95ddace076ead10d5c42986bcc70b465e9791':
  Update accounts backup when externally deleted
2010-02-08 17:21:00 -08:00
Andrew Stadler 26c95ddace Update accounts backup when externally deleted
Fix the case in which an Email account is deleted in the Account Manager
UI, and we delete the provider account, but we did not also update the
backups.  In some cases, the deleted account would be accidentally
restored from the backups.

Bug: 2414469 (internal)
Bug: 2427663 (external)
2010-02-08 16:27:05 -08:00
Marc Blank f3332ddac8 Merge "Additional work on EAS security" 2010-02-08 12:37:34 -08:00
Marc Blank d4ff80d404 Merge "Fix bug w/ all day events (hr, min, sec need to be zero in DTSTART)" 2010-02-08 09:29:22 -08:00
Marc Blank 37658316f9 Use a single account color resource table; add convenience methods
* The color chip resource table was duplicated in three files
* Move these into a common location in Email.java and add
  convenience method for retrieving color chip resource id based
  on accountId
* Simplifies future changes to account color selection
* Add RGB color information on these resources (provided by
  rfulcher) and add a convenience method for retrieving these

Change-Id: If1c2d22fba91cfce46a2618cd2b73cf7a534ce51
2010-02-08 09:21:54 -08:00
Marc Blank e81b2bfe5e Fix bug w/ all day events (hr, min, sec need to be zero in DTSTART)
* For some reason, the recurrence expansion system requires hr, min, and sec
  to be zero for DTSTART when allDay=1
* Force hr, min, and sec to zero for all day events

Bug: 2427658
Change-Id: Ief6b5b571fa6bc6947bcbc9cda02ab2c04f27549
2010-02-08 09:17:03 -08:00
Marc Blank 09b45fdcff Additional work on EAS security
* Add more final plumbing for exchange security
* If policies are supported, we now check to see if they are active;
  if so, we acknowledge this to the server, after which we are given a
  final policy key which can be used for syncing

Change-Id: I5992c790294e35b5ec5343c7665e2e7fd31a75ca
2010-02-07 13:28:18 -08:00
The Android Open Source Project f19a02ac69 am eaf951c5: am 75753107: reconcile main tree with open-source eclair
Merge commit 'eaf951c59631829c84ac71b413cf7b2ff186be17'

* commit 'eaf951c59631829c84ac71b413cf7b2ff186be17':
  android-2.1_r1 snapshot
2010-02-05 14:10:23 -08:00
Marc Blank 518a562de3 Merge "Initial implementation of EAS security" 2010-02-05 13:44:38 -08:00
Marc Blank a1c708670b Merge "Fix #2422815 (Exception in EAS calendar upsync)" 2010-02-05 12:34:25 -08:00
Marc Blank 72a5e7d7c1 Initial implementation of EAS security
* This first implementation integrates with early CLs for
  Email app integration with device security
* Check for policies added to validation process
* If the server has no policy requirements, there is no change
  to the existing process
* We automatically declare a set of policies to be unsupported
  if any are known to the sync adapter to be unsupported
  (e.g. no attachments or password history)
* We call isSupported (PolicySet) to determine whether other
  policies use values that the OS can support (e.g. password length,
  inactivity time, etc.)
* Depending on whether the server's policies are unsupported or
  supported, we throw the proper exception back to the caller

Change-Id: I704cb2151dd87f54c83c2aa23976a8ac8e2c501a
2010-02-05 12:33:07 -08:00
Marc Blank 204b7a3bf4 Fix #2422815 (Exception in EAS calendar upsync)
* Exception is due to the presence of values in ContentValues that
  are null (would normally expect those fields to be absent)
* Fix all relevant cases that might produce an NPE in this case

Bug: 2422815
Change-Id: I637a21307c2d518912edce093de90a06d94614e5
2010-02-05 11:59:22 -08:00
Andrew Stadler 3d2b3b3b35 Logic to move phone into security-admin mode
* Create notification to display when syncs fail due to security
* Create psuedo-activity (no UI) to manage device admin state transitions
* Clean up and flesh out SecurityPolicy APIs'
* Add placeholders in EasSyncService showing how to react when policies
    are not met and sync cannot continue.

Note:  There are some STOPSHIP todo's at the top of SecurityPolicy.java.
These should explain any code that you might think is "missing".
2010-02-05 11:10:39 -08:00
The Android Open Source Project eaf951c596 am 75753107: reconcile main tree with open-source eclair
Merge commit '75753107afb6a66c237f6874cc52eb48bf1d3cdf' into eclair-plus-aosp

* commit '75753107afb6a66c237f6874cc52eb48bf1d3cdf':
  android-2.1_r1 snapshot
2010-02-05 08:40:02 -08:00
The Android Open Source Project 75753107af reconcile main tree with open-source eclair 2010-02-05 08:09:39 -08:00
Marc Blank 4d2a701844 Merge "Fix #2420732 (crash in Google Services Framework)" 2010-02-04 17:31:14 -08:00
Marc Blank 0bbe34bce5 Fix #2420732 (crash in Google Services Framework)
* Exchange calendar sync created Event records for exceptions
  that didn't have a _sync_id
* This caused google calendar sync to try to upload these
  Events as new, which caused an Exception to be thrown
* Fixed EAS calendar sync adapter to generate a _sync_id for
  exceptions in the form <parentId>_<exception start time>

Bug: 2420732
Change-Id: I46769175ca89ffa4cec4fe8b0c35ef2242536185
2010-02-04 15:23:09 -08:00
Andrew Stadler a1550678af Integrate policies into account setup process
* Rename SECURITY_POLICIES_REQUIRED to SECURITY_POLICIES_UNSUPPORTED
* Create new pathway for SECURITY_POLICIES_REQUIRED, making it advisory
* Cleaned up strings for account setup error dialogs
* Refactored AccountSetupExchange.onActivityResult() to split up the
  three primary use cases, making them more readable.
* Always finish() in AcccountSetupAccountScreen, because it's usually
  cleaner to return to the previous screen (enter username & password).
2010-02-04 15:04:48 -08:00
Makoto Onuki 182ccb5002 Merge "Remove exchange readme and update script" 2010-02-04 14:42:17 -08:00
Makoto Onuki 217466edce Remove exchange readme and update script 2010-02-04 13:09:34 -08:00
Marc Blank 48e20b81e6 Fix #2415185 (Email disappears after a while)
* Exchange account validation tests security policies by sending a
  FolderSync command and determining whether this generates an
  error
* Unfortunately, we use the real deviceId when sending the command
  and this causes the next real sync to fail such that all data is
  wiped and reloaded (the bug)
* The fix is to use a false device id while doing validation

Bug: 2415185
Change-Id: Ibe577e36f770d737ba5952b347aa0d73bda3568a
2010-02-04 12:39:07 -08:00
Marc Blank 8f8179f07e Merge "Add calendar sync checkbox to account settings screen" 2010-02-04 12:24:52 -08:00
Makoto Onuki 0e4f9a834a Merge "Add a readme about removing exchange support." 2010-02-04 11:45:47 -08:00
Satoshi Kataoka dd579f49d1 Merge "Change mdpi-icon for Email Application" 2010-02-04 11:22:51 -08:00
Marc Blank 0692ec4836 Fix #2414056 (NPE after delete account)
* Add check for deleted mailbox

Bug: 2414056
Change-Id: I20aea69b0ad2c2ad2eacb76febcafb881f9eecc3
2010-02-04 10:38:18 -08:00
Marc Blank a1c997a2b6 Add calendar sync checkbox to account settings screen
Bug: 2414157
Change-Id: I60ead139552f3e7c86b113f8b8b10ef3cf57abbf
2010-02-04 10:28:37 -08:00
satok f5c8acce72 Change mdpi-icon for Email Application 2010-02-03 22:03:11 -08:00
satok d9080ed32e Add UI for Signature in Email Application
Bug: 1323618

- changed summary of signature to show hint if signature is not set
2010-02-04 10:28:55 +09:00
Makoto Onuki 235c8f6d35 Add a readme about removing exchange support. 2010-02-03 16:44:05 -08:00
Marc Blank 7c6c1fd519 Merge "Build proper TimeZoneInformation strings for upsync; fix bugs" 2010-02-03 14:42:23 -08:00
Marc Blank 6f3013b787 Build proper TimeZoneInformation strings for upsync; fix bugs
* Create full TZI strings for upload of events (previously, we
  omitted DST information)
* Add documentation to some unit tests
* Put in correct logic for determining if upload needed
* Fix problem w/ parsing empty tags

Change-Id: I268ce8a2db30b3cfdf0e44f6a78befd6bd933243
2010-02-03 14:41:45 -08:00
Makoto Onuki 91237e9dcb Adding script for building Email app without exchange.
remove-exchange-support.sh makes it possible to build the email app without
exchange support.

This script:
- removes all packages under com.android.exchange.
- removes all lines surrounded by EXCHANGE-REMOVE-SECTION-START and
  EXCHANGE-REMOVE-SECTION-END

And the resulting source should still build and run fine.

Bug: 2369784
2010-02-03 11:39:46 -08:00
Andrew Stadler 8bb0ee3b92 Fix auto-discover / account verification logic
New behavior:
 * There are two primary paths through this activity:
 *   Edit existing:
 *     Load existing values from account into fields
 *     When user clicks 'next':
 *       Confirm not a duplicate account
 *       Try new values (check settings)
 *       If new values are OK:
 *         Write new values (save to provider)
 *         finish() (pop to previous)
 *
 *   Creating New:
 *     Try Auto-discover to get details from server
 *     If Auto-discover reports an authentication failure:
 *       finish() (pop to previous, to re-enter username & password)
 *     If Auto-discover succeeds:
 *       write server's account details into account
 *     Load values from account into fields
 *     Confirm not a duplicate account
 *     Try new values (check settings)
 *     If new values are OK:
 *       Write new values (save to provider)
 *       Proceed to options screen
 *       finish() (removes self from back stack)
* Added unit test for new loadFields method

Bug: 2412300
2010-02-03 10:38:27 -08:00
Makoto Onuki b854d05a89 Change EAS authenticator's label according to the vendor policy.
Our original plan was to disable both authenticators by default, and enable
one of then on boot.  However, it turned out existing exchange accounts will
be removed if there's no enabled authenticators for the account type.
So, instead, in this patch we initially enable only the default one, and switch
to the other one on boot if the vendor policy indicates so.

(If a device has a vendor policy apk, it should also have the email app
preloaded, so changing the label at boot time isn't too late.)

Bug: 2382710
2010-02-02 16:25:29 -08:00
Makoto Onuki 130988e49d Merge "Gather common exchange related methods into one place" 2010-02-02 13:48:04 -08:00
Andy Stadler 561e10d4c0 Merge "Clean up exception handling in VendorPolicyLoader" 2010-02-02 13:39:30 -08:00
Makoto Onuki 9fe51f6329 Gather common exchange related methods into one place
So that it'll be easier to remove exchange dependency.
2010-02-02 13:36:45 -08:00
Makoto Onuki 049509d10e Merge "Move Eas.ACCOUNT_MANAGER_TYPE out of the package." 2010-02-02 13:34:04 -08:00
Andrew Stadler a6e6dd096c Clean up exception handling in VendorPolicyLoader
Per code review suggestions, clean up exception handling, and add
commentary to make intended behavior more explicit.

Followup to: 0434fef1f6
Bug: 2413388
2010-02-02 12:19:49 -08:00
Andrew Stadler 0434fef1f6 Fix crash in VendorPolicyLoader
* Create unit test to reproduce crash
* Fix handling of empty bundle (the default return value)
* Clean up some exception handling in the policy module loader, which
  reduces some unneeded logging.

Bug: 2413388
2010-02-02 10:41:56 -08:00