History log of /packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2871511a6076f92b4c7d017f0d7c1b8c4ec69a05 26-Aug-2014 Jin Cao <jinyan@google.com> Change logging level of htmlToSpan so we can see it in bugreports

Change-Id: I74cd6e48c74d8775f0e588ee6c941cf3602649c5
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
1d70245949b109f2e66779d0038b1f6bfd4f102d 23-Jul-2014 Jin Cao <jinyan@google.com> Add logging for htmlToSpan

Add logging for htmlToSpan to check the length
of input/output.

b/16489004

Change-Id: I40e0ea1f1b4799a2d021f42dc98bcef54f6e3aff
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
7b966b191f98c818170609c2fe5af4478d6a23b2 25-Jun-2014 Jin Cao <jinyan@google.com> Refactor SpannedConverter to use PlainTextConverter

Change SpannedConverter so it only handles the spans
and use the DefaultPlainTextConverter to handle all
of the underlying text string.

b/15838526

Change-Id: I94c986a2efc4e67985415d4539e4601b0ebe7e63
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
783e81cd330a20eb44e5ab81ba5d5c0df5152450 26-Jun-2014 Jin Cao <jinyan@google.com> Use AbsoluteSizeSpan instead of RelativeSizeSpan

Since Html.toHtml only checks for AbsoluteSizeSpan, we'll use
that instead of RelativeSizeSpan.

b/15909781

Change-Id: Ifd68ca2b3d9f93af0e49c35f88e2efb4bd35ca76
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
6c369ca7cd069c62ae839125088dffafb688631f 24-Jun-2014 Jin Cao <jinyan@google.com> HtmlUtils cleanup to use HTML4 constants

Instead of hardcoding strings, we use HTML4 constants for all
comparisons.

Change-Id: I818ba731b71996b60ec886e90855d32cac93bfd9
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
e26a92adf3f39d36995c67d31fe8eae3481f22d5 24-Jun-2014 Andy Huang <ath@google.com> improve whitespace handling on resumed HTML drafts

HTML whitespace needs to be trimmed and collapsed.
(except in <pre> cases, support for which is filed as b/15838526).
Quick/dirty code copy from HtmlTree.PlainTextConverter.
(Full implementation to come in b/15838526.)

Bug: 15830162
Change-Id: I0b8f9d7457d6d2d262eee90951467f7da9b83e6f
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
9ed742cd9b19ab9390c97b3c35f7af443428ccbf 18-Jun-2014 Andy Huang <ath@google.com> support for subclass-custom span convert behavior

support pluggable HtmlTree.Converter behavior.

Bug: 15429227
Change-Id: I6e7f8a65f9dfe3085399300b99a6fea0f2525cfb
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java
77b4c2c31d7601665c337ce5cbc9d84fb9332be8 20-May-2014 Jin Cao <jinyan@google.com> Minimum html support using Html class (no ol/ul)

Support basic html in ComposeActivity using Html and HtmlTree class.

- Extended HtmlTree to take in any arbitrary html -> object converter
so we can use it to convert html to spanned as well as plaintext.
- Added custom SpannedConverter to feed into HtmlTree.
- Added async task to load Utils.htmlToSpan in the background.
- Moved ComposeActivity#sendOrSaveInternal to a handler thread in
case Utils.spanToHtml takes a long time.

Note that we only support a subset of the html tags. To see the full
list of tags we currently support, refer to HtmlUtils#SpannedConverter.

Performance:
About 3x faster than using Html.fromHtml (yay!).
Performance should not be an issue for >99% of the users.

b/7406122

Change-Id: I484d7fc7d2f36c4724d9e4cb90fa1d65eadcb903
/packages/apps/UnifiedEmail/src/com/android/mail/utils/HtmlUtils.java