k9mail/k-9 — pull request #441 by zjw (2014-01-11 17:43:07+00:00)
Title: Fix issue 6064: Inline images don't display on KitKat

It seems like there should be a simpler solution than this. In any case, this is better than nothing.

KitKat's security has been tightened so a WebView doesn't load
content:// URLs like was done in earlier Android versions.

This patch changes the URLs stored in the message body for inline
images so the URL uses the private scheme "kninecid:". Then
WebViewClient.shouldInterceptRequest is used to catch the loading of
those "kninecid:" URLs and provide an InputStream for the original
content:// URL.

(KitKat was a bit finicky regarding what it would accept for a private
scheme, only accepting alphabetic characters, which is more
restrictive than specified in RFC 3986.)