Fix attachment previews from letterboxing

* Fix scaling regression caused by BitmapFactory.decodeByteArray()
* Smarter handling of different preview sizes. There are now 3 classes of
preview images: large, long/skinny, and small.

Bug: 7148589
Change-Id: Ie232cc00cd5a8adeed3309aa4615b28de2c37b1f
diff --git a/res/values/constants.xml b/res/values/constants.xml
index 74e44f3..bd3ee1b 100644
--- a/res/values/constants.xml
+++ b/res/values/constants.xml
@@ -89,4 +89,7 @@
     <integer name="title_bar_show_animation_duration">300</integer>
 
     <integer name="webview_initial_delay">1000</integer>
+
+    <!-- The width or height of the preview will not exceed this -->
+    <integer name="attachment_preview_max_size">256</integer>
 </resources>