Commit Graph

15 Commits

Author SHA1 Message Date
Martin Hibdon ce6916b32a Don't allow disabling of the camera with managed profiles
Change-Id: I2e6085084682b04ef7973bc433214b5b3ab2da79
2014-09-25 13:48:11 -07:00
Tony Mantler 34662f11b2 Save policy when saving account
Also add a loader to AccountSecurity, and ignore when a policy contains unsupported requirements.

b/11790165

Change-Id: Idd651153848eea3216656047c5aba3bbd750ca0a
2013-11-27 14:42:49 -08:00
Yu Ping Hu eb190a8d9d Don't crash when the policy service is unavailable.
This isn't a great situation -- it suggests the PolicyService
is having some sort of RemoteException -- but when it happens
we should just treat it the same as if the policy is not
enforced.

Bug: 10315113
Change-Id: If2fbe1648a5c6f3df13cef02c8dc5bc6e858f2d9
2013-08-14 10:46:07 -07:00
Scott Kennedy 560bfadc31 Unify LogTag
There is now only one LogTag class. The static initializer of
GmailApplication (existing) and EmailApplication (new) will now set
the log tag to "Gmail" and "Email", respectively. Up until that code
is run, it will be "UnifiedEmail".

"setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to
be printed as long as they go through LogUtils, regardless of what tag
is used by that individual log. This lets us still turn on logging
everywhere in one command, but also lets us use more descriptive tags
(like the class name).

And since we no longer have three com.android.mail.utils.LogTag
classes, builds will be much easier.

Also, we now use LogUtils everywhere.

Change-Id: I55f1c7a66ce50ead54877a13e40256422a56dc39
2013-06-05 20:06:15 -07:00
Marc Blank e714bb9d15 Convert authorities, intents, and account manager types
* Tested ok on wiped Nexus
* Tested ok on S3
* Upgrade verified on Nexus

Change-Id: If5d4ce594f8a309cdb59589d10b1d33f3b79326c
2012-08-31 23:26:36 -07:00
Marc Blank f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -07:00
Marc Blank 03cd72805d Revert to old Email app
* These are the last sources in the ICS-MR1 tree

Change-Id: Ida4651bddd92a06a518d00f3e1f275ab3a80c8ae
2012-04-25 13:58:23 -07:00
Marc Blank 2736c1a11c Rewrite of security policy handling and service code
* Remove PolicyService APIs policiesRequired, policiesUpdated,
  isSupported, clearUnsupportedPolicies, and isActiveAdmin
* Add PolicyService API setAccountPolicy, which is the sole
  method by which security policies are promulgated
* Add protocolPoliciesEnabled and protocolPoliciesUnsupported
  to the Policy class; these are packed, localized strings
  indicating policies that the protocol itself have enabled
  and/or cannot support (i.e. these are policies that are
  unknown to the DPM, e.g. don't load attachments)
* Differentiate in security notifications between three kinds
  of policy changes - changes that don't require user
  intervention (e.g. reducing requirements), changes that
  require user intervention (the legacy notification), and
  changes that make the account unsyncable (e.g. the server
  adding an unsupportable policy). Handle all possible policy
  changes cleanly.
* Make security notifications per account (with multiple
  accounts, notifications would get arbitrarily munged)
* Expose ALL enforced policies via the account settings
  screen in two categories: policies enforced (including
  both policies enforced by the DPM and policies enforced
  by the protocol) and policies unsupported (note that these
  can only be seen if policies are changed after an account
  is created; we do not allow the creation of an account
  when any required policies are unsupported).  Add a
  button that forces a sync attempt, for accounts that
  are locked out, but whose policies have changed on
  the server (this would otherwise require a reboot).
* Updated unit tests

Bug: 5398682
Bug: 5393724
Bug: 5379682
Change-Id: I4a3df823913a809874ed959d228177f0fc799281
2011-10-25 10:32:34 -07:00
Marc Blank c28fdfeaad Throw RuntimeExceptions when PolicyService calls fail
* Rather than returning false, which can cause unexpected
  results, e.g. locking out an account until reboot
* Partial fix for the referenced bug (there might be other
  causes)

Bug: 5221119
Change-Id: I5b47093a3411deb6995624887197297323db0d2d
2011-08-29 16:18:50 -07:00
Marc Blank f5418f1f93 Move Account into its own top-level class
Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
2011-06-13 15:37:22 -07:00
Marc Blank aeee10e57e Rework of security policy storage
* Replace crazy (and soon to be "full") bit fields stored in an account's
  securityFlags with a row in a newly created Policy table (thus, fully
  expandable)
* Update code from database version 17 to 18; adds Policy table, a
  policyKey row in Account, and a revised trigger that deletes Policy
  information for deleted Accounts
* Update old PolicySet unit tests to work against the new Policy class
* Add test for the conversion of securityFlags to Policy
* Tested in a variety of scenarios; appears to be functionally equivalent

Change-Id: I1505ee75230d6a0d3c2b62a46326f39c2c7f9eb5
2011-05-03 11:11:47 -07:00
Marc Blank da3c4b8261 Remove STOPSHIP logging
Change-Id: I73786fb2f4ff10d3c0767a873e5eb1e443f1affc
2011-03-16 11:08:56 -07:00
Ying Wang 37f3385803 Split out emailcommon/Android.mk
Change-Id: I846ee2a4b541f4709e647aa537c61549db2bec2e
2011-03-01 15:56:27 -08:00
Ying Wang a07f2ae0b1 Revert "Split out emailcommon/Android.mk"
This reverts commit c28bf35319.
2011-03-01 14:52:05 -08:00
Ying Wang c28bf35319 Split out emailcommon/Android.mk
Change-Id: I90653e8601ee3ee6a8719d87ffb93222a11a22c0
2011-03-01 12:29:05 -08:00