summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-06-23 11:58:50 -0700
committerDianne Hackborn <hackbod@google.com>2011-06-23 12:29:03 -0700
commit83e0bc18e03868295f8358d875f2b67cb78f16a8 (patch)
treef85ba242db27fc838b3f8e26a35236111211495a /services
parent9a05cfe5427a6cee988333e0d65f17b9854554a3 (diff)
downloadframeworks_base-83e0bc18e03868295f8358d875f2b67cb78f16a8.zip
frameworks_base-83e0bc18e03868295f8358d875f2b67cb78f16a8.tar.gz
frameworks_base-83e0bc18e03868295f8358d875f2b67cb78f16a8.tar.bz2
DO NOT MERGE. Fix density compat mode.
Fix issue #4770360: older app compatibility mode is really tiny on ICS phones We were applying the density compat mode scaling multiple times to display metrics, causing bad values. Change-Id: Iafafd9a5e94b9d774cd2715bf968e91602a1bd82
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index c40c7fc..f7fd8f4 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -5552,10 +5552,10 @@ public class WindowManagerService extends IWindowManager.Stub
private int reduceCompatConfigWidthSize(int curSize, int rotation, DisplayMetrics dm,
int dw, int dh) {
- dm.unscaledWidthPixels = mPolicy.getNonDecorDisplayWidth(rotation, dw);
- dm.unscaledHeightPixels = mPolicy.getNonDecorDisplayHeight(rotation, dh);
+ dm.noncompatWidthPixels = mPolicy.getNonDecorDisplayWidth(rotation, dw);
+ dm.noncompatHeightPixels = mPolicy.getNonDecorDisplayHeight(rotation, dh);
float scale = CompatibilityInfo.computeCompatibleScaling(dm, null);
- int size = (int)(((dm.unscaledWidthPixels / scale) / dm.density) + .5f);
+ int size = (int)(((dm.noncompatWidthPixels / scale) / dm.density) + .5f);
if (curSize == 0 || size < curSize) {
curSize = size;
}
@@ -5630,9 +5630,9 @@ public class WindowManagerService extends IWindowManager.Stub
// Override display width and height with what we are computing,
// to be sure they remain consistent.
- dm.widthPixels = dm.unscaledWidthPixels = mAppDisplayWidth
+ dm.widthPixels = dm.noncompatWidthPixels = mAppDisplayWidth
= mPolicy.getNonDecorDisplayWidth(mRotation, dw);
- dm.heightPixels = dm.unscaledHeightPixels = mAppDisplayHeight
+ dm.heightPixels = dm.noncompatHeightPixels = mAppDisplayHeight
= mPolicy.getNonDecorDisplayHeight(mRotation, dh);
mCompatibleScreenScale = CompatibilityInfo.computeCompatibleScaling(dm,