The current design for Store classes (e.g. IMAP) did not provide for
any persistent storage. This is the beginning of a mechanism to
provide that. It's quite simplisitic - each Store can read/write one
persistent string - but that's enough for the first simple use case
(saving some sync data for EAS).
The core changes here - suggest reviewing first - are in Account.java,
Store.java, and AccountUnitTests.java. Everything else is just
following the API change that was necessary.
Note that, by definition, this only applies to remote stores (e.g.
IMAP, POP3). You'll see everywhere that LocalStore is passed null, and
this is correct - LocalStore *is* persistent storage and does not need
access (so far, at least).
Original author: stadler
Automated import of CL 146514
*** Reason for rollback ***
Despite the markings in the CL, this was inadvertently merged.
This CL restores donut & downstream branches to the desired state.
*** Original change description ***
am: CL 146359 D* N*T M***E - we'll keep the fix for donut+
Automated g4 rollback of changelist 146273.
*** Reason for rollback ***
Inadvertently approved for cupcake, past deadline.
*** Original change description ***
Fixed "show pictures" button isnot displayed for HTML messages.
Original author: stadler
Merged from: //branches/cupcake/...
BUG=1766880
Automated import of CL 146366
Automated g4 rollback of changelist 146273.
*** Reason for rollback ***
Inadvertently approved for cupcake, past deadline.
*** Original change description ***
Fixed "show pictures" button isnot displayed for HTML messages.
Original author: stadler
Merged from: //branches/cupcake/...
Automated import of CL 146361
of the role-specific folders such as Drafts, Sent, or Trash.
This allows us to properly target these folders even on
systems where they have different names. I capture the
tagged names into the existing columns in the account data,
where they are used elsewhere in the code (no changes
necessary).
Use default implementations on POP3 and IMAP for now -
no change from original behavior. The new code is
primarily to support EAS (for now).
BUG=1790798
Automated import of CL 146360
Automated g4 rollback of changelist 146273.
*** Reason for rollback ***
Inadvertently approved for cupcake, past deadline.
*** Original change description ***
Fixed "show pictures" button isnot displayed for HTML messages.
BUG=1766880
Automated import of CL 146359
The default values are 25 (default) and 25 (increment). This is fine
for Stores that control downloads by # of messages, but won't work for
stores that use other measurements - e.g. EAS windows the download in #
of days. So for this change:
1. Allow the StoreInfo to provide non-default values
2. Remove the hardcoded references to the default values
3. Use StoreInfo values everywhere
4. Set the values to 1,1 in EAS store info
BUG=1789913
Automated import of CL 146331
syncing. This provides a key-value store, per folder, that
can be used by network Stores to record persistent data such
as sync status, server keys, etc.
Note that, by definition, this only applies to remote folders
(e.g. IMAP, POP3). You'll see everywhere that LocalFolder is
passed null, and this is correct - LocalFolder *is* persistent
storage and does not need external help.
Note to reviewers: The core changes are Folder.java,
LocalStore.java, and LocalStoreUnitTests.java, so please give
them the bulk of your reviewer attention. The other files
are just following along with minor API changes. Of those,
the one worth close examination is MessagingController.java,
which is the only place in the system where remote Folders
are bonded with Local Folders and thus where this new API
comes into play.
Note to jham: Can you please take a look at
LocalStore.LocalFolder.setPersistentString() and recommend
better SQL foo than my primitive test-then-update-or-insert
logic, which is not transactional or threadsafe.
BUG=1786939
Automated import of CL 146134
The current design for Store classes (e.g. IMAP) did not provide for
any persistent storage. This is the beginning of a mechanism to
provide that. It's quite simplisitic - each Store can read/write one
persistent string - but that's enough for the first simple use case
(saving some sync data for EAS).
The core changes here - suggest reviewing first - are in Account.java,
Store.java, and AccountUnitTests.java. Everything else is just
following the API change that was necessary.
Note that, by definition, this only applies to remote stores (e.g.
IMAP, POP3). You'll see everywhere that LocalStore is passed null, and
this is correct - LocalStore *is* persistent storage and does not need
access (so far, at least).
BUG=1786939
Automated import of CL 146061
The logic for this is quite simplistic, for now: When the store
reports that it has new messages, it triggers a service refresh,
just as if a pull-mode interval had expired and it is time to
check the server.
Note, unfortunately at this time there are no tests, because there
are not currently any good test seams in MailService.java.
Original author: stadler
Automated import of CL 145230
The logic for this is quite simplistic, for now: When the store
reports that it has new messages, it triggers a service refresh,
just as if a pull-mode interval had expired and it is time to
check the server.
Note, unfortunately at this time there are no tests, because there
are not currently any good test seams in MailService.java.
BUG=1776149
Automated import of CL 145227
1. Generalize the code for the various spinners that control
account check frequency.
2. Provide an API for looking up store attributes (and refactor
existing instatiateStore logic to use it).
3. Cleanup the old code that was used to setup frequency spinners.
4. Hardwire Exchange accounts to default into push mode.
Notes to tester:
1. For each account type (POP, IMAP, EAS) we need to check that
auto & manual creation "do the right thing" for frequencies.
POP & IMAP should offer "none" or time intervals, while EAS
should offer "push", "none", or time intervals.
2. EAS accounts should default to "push", all others to "15 min"
3. Make sure that you can edit existing account settings and see
the right choices (only EAS should be offered push).
4. I couldn't write an automated test for the mail checker service,
please confirm that POP & IMAP accounts are checked at the right
intervals (or never, if set for "none".)
Original author: stadler
Automated import of CL 145128
1. Generalize the code for the various spinners that control
account check frequency.
2. Provide an API for looking up store attributes (and refactor
existing instatiateStore logic to use it).
3. Cleanup the old code that was used to setup frequency spinners.
4. Hardwire Exchange accounts to default into push mode.
Notes to tester:
1. For each account type (POP, IMAP, EAS) we need to check that
auto & manual creation "do the right thing" for frequencies.
POP & IMAP should offer "none" or time intervals, while EAS
should offer "push", "none", or time intervals.
2. EAS accounts should default to "push", all others to "15 min"
3. Make sure that you can edit existing account settings and see
the right choices (only EAS should be offered push).
4. I couldn't write an automated test for the mail checker service,
please confirm that POP & IMAP accounts are checked at the right
intervals (or never, if set for "none".)
BUG=1776149
Automated import of CL 144953
the shipping client will include the necessary generic pieces for
configuring an Exchange client (e.g. account setup) but will not
include actual Exchange client code (e.g. transport / protocol).
Also added a "sample code" implementation of Exchange for use
as a starting point for implementors. (Note, this will not ship
in Donut, it's a placeholder for working on the "framework"
aspects.)
Original author: stadler
Automated import of CL 144527
the shipping client will include the necessary generic pieces for
configuring an Exchange client (e.g. account setup) but will not
include actual Exchange client code (e.g. transport / protocol).
Also added a "sample code" implementation of Exchange for use
as a starting point for implementors. (Note, this will not ship
in Donut, it's a placeholder for working on the "framework"
aspects.)
BUG=1740621,1740626
Automated import of CL 144525
errors, inconsistencies in passing Application/Activity/Context, and
some error handling cleanups. These are all changes that would have
probably been made before the original submits, but I didn't want
to fix them in the integration step.
Original author: stadler
Automated import of CL 144522
errors, inconsistencies in passing Application/Activity/Context, and
some error handling cleanups. These are all changes that would have
probably been made before the original submits, but I didn't want
to fix them in the integration step.
BUG=1740621
Automated import of CL 144520
*** Reason for rollback ***
Roll back US Spanish import because it made the build too big.
*** Original change description ***
Import US Spanish translations, and a few Japanese changes.
Automated import of CL 144355
If you absolutely must add a string after string freeze, and that
same string has already been translated for another application
in a similar context, you can copy the translation by specifying
it by numeric message ID.
Fix the incorrect IDs I had told people for a couple of strings,
add the script that will make a flat-file version of translations
so you can find out the IDs yourself, and reimport the translations
for the couple of applications that wanted to copy translations.
Original author: enf
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 143313
If you absolutely must add a string after string freeze, and that
same string has already been translated for another application
in a similar context, you can copy the translation by specifying
it by numeric message ID.
Fix the incorrect IDs I had told people for a couple of strings,
add the script that will make a flat-file version of translations
so you can find out the IDs yourself, and reimport the translations
for the couple of applications that wanted to copy translations.
Original author: enf
Merged from: //branches/cupcake/...
Automated import of CL 143164