am 7d0d51e9: am a91aff96: Merge "Revert "Dont take density into account when setting initial zoom values."" into ics-mr1

* commit '7d0d51e981eacd9c79e892cc501ecf2f0e41023b':
  Revert "Dont take density into account when setting initial zoom values."
This commit is contained in:
Mindy Pereira 2011-11-15 13:10:35 -08:00 committed by Android Git Automerger
commit 6e2af506f4

View File

@ -515,14 +515,14 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
/** /**
* Returns the zoom scale (in percent) which is a combination of the user setting * Returns the zoom scale (in percent) which is a combination of the user setting
* (tiny, small, normal, large, huge). The intention * (tiny, small, normal, large, huge) and the device density. The intention
* is for the text to be physically equal in size over different density * is for the text to be physically equal in size over different density
* screens. We do not need to multiply by the density as webview already takes this * screens.
* into account when setting the initial scale.
*/ */
private int getWebViewZoom() { private int getWebViewZoom() {
float density = mContext.getResources().getDisplayMetrics().density;
int zoom = Preferences.getPreferences(mContext).getTextZoom(); int zoom = Preferences.getPreferences(mContext).getTextZoom();
return (int) (ZOOM_SCALE_ARRAY[zoom] * 100); return (int) (ZOOM_SCALE_ARRAY[zoom] * density * 100);
} }
private void initContactStatusViews() { private void initContactStatusViews() {