History log of /packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6e418aa41a17136be0dddb816d843428a0a1e722 19-Jun-2011 Marc Blank <mblank@google.com> Improve EmailContent caching...

* Guarantee that up to 16 Account (with HostAuths), and Policy rows
are always cached. Also, 6 commonly used Mailboxes per Account
(Inbox, Outbox, Drafts, Sent, Trash, and Search)
* Precache these rows when EmailProvider starts up
* Ensure that newly added, precachable rows are cached when created
* Clean up some inefficient/wrong caching code
* Fix a commonly called method in NotificationManager in which we
load a single Mailbox row using selection vs withAppendedId
* Confirm that we don't read from the database in typical use and
heavy message loading
* Add a special URI for finding mailbox by type (using the cache)
* Add special-case code for EmailContent.count(Account.CONTENT_URI)
which is used in a number of places (including on the UI thread)
and whose value is easily determined
* Add a special URI to get the default account id
* Confirm that all unit tests work

The goal here is to be able to load all Account, HostAuth, Policy,
and Mailbox objects (by id) without worrying about disk access.
There will still be a single disk read for uncommon Mailbox reads,
but this should be considered acceptable.

Change-Id: Ibc9aa7acc73185e360b0b6f3053b90a985e97210
TODO: Unit tests
/packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java
f5418f1f93b02e7fab9f15eb201800b65510998e 14-Jun-2011 Marc Blank <mblank@google.com> Move Account into its own top-level class

Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
/packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java
fae5ebbfd202b930296a1bbc67459152f1a6c6ce 26-May-2011 Marc Blank <mblank@google.com> Cleanup code in Policy

* Use a single method for setting/clearing an account's policy

Change-Id: I90fd97d4a5ba452d4656bbabd06a40797c82e10c
/packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java
53ea83ebf91f820692e8fa8e781f5cc982dd94db 14-May-2011 Ben Komalo <benkomalo@google.com> Move Mailbox to top level class.

No other changes made.

Change-Id: I3d8f3c521dc0d902be313b25252b4b6a4a96e7ee
/packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java
b2a909598ba78783b05c58508310f864c56c897b 11-May-2011 Marc Blank <mblank@google.com> Create/test method to set "not downloadable" flag based on policy

Change-Id: I08bec46d0c961bdc9530768f5198346338b3e2f3
/packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java
f91a03f5203bb64ae0726596d65ac90c35088666 05-May-2011 Marc Blank <mblank@google.com> Add new policies to Policy and associated data structures

* Update Policy unit test

Change-Id: I24a980537a73e40fca9fceb1b6ad6b2feaa9c342
/packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java
aeee10e57ef4d931e7708fde218d590453a82aea 28-Apr-2011 Marc Blank <mblank@google.com> 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
/packages/apps/Email/tests/src/com/android/email/provider/PolicyTests.java