summaryrefslogtreecommitdiffstats
path: root/core/java/android/util
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-26 00:55:58 -0700
committerDianne Hackborn <hackbod@google.com>2011-05-26 10:46:19 -0700
commit81e56d535c853d73ff537357da5b935f51cb779d (patch)
treeb0d69765bbefecbdeeadebc24b7e57f902af84b9 /core/java/android/util
parent42f8094c066209a65b09d53611ef5c93daba4c51 (diff)
downloadframeworks_base-81e56d535c853d73ff537357da5b935f51cb779d.zip
frameworks_base-81e56d535c853d73ff537357da5b935f51cb779d.tar.gz
frameworks_base-81e56d535c853d73ff537357da5b935f51cb779d.tar.bz2
Rework how we decide whether to use system or status bar.
The PhoneWindowManager is now responsible for determing this, since it needs to do this before we can generate the configuration since we need to take into account the system bar size we will use. Also the Display should now report the screen height without including the system bar. Change-Id: I82dfcc5e327e4d13d82c373c6c870f557a99b757
Diffstat (limited to 'core/java/android/util')
-rw-r--r--core/java/android/util/DisplayMetrics.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index 8018ff9..60a4ef2 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -105,10 +105,18 @@ public class DisplayMetrics {
*/
public float ydpi;
- /** @hide */
- public int realWidthPixels;
- /** @hide */
- public int realHeightPixels;
+ /**
+ * The reported display width prior to any compatibility mode scaling
+ * being applied.
+ * @hide
+ */
+ public int unscaledWidthPixels;
+ /**
+ * The reported display height prior to any compatibility mode scaling
+ * being applied.
+ * @hide
+ */
+ public int unscaledHeightPixels;
public DisplayMetrics() {
}
@@ -121,8 +129,8 @@ public class DisplayMetrics {
scaledDensity = o.scaledDensity;
xdpi = o.xdpi;
ydpi = o.ydpi;
- realWidthPixels = o.realWidthPixels;
- realHeightPixels = o.realHeightPixels;
+ unscaledWidthPixels = o.unscaledWidthPixels;
+ unscaledHeightPixels = o.unscaledHeightPixels;
}
public void setToDefaults() {
@@ -133,8 +141,8 @@ public class DisplayMetrics {
scaledDensity = density;
xdpi = DENSITY_DEVICE;
ydpi = DENSITY_DEVICE;
- realWidthPixels = 0;
- realHeightPixels = 0;
+ unscaledWidthPixels = 0;
+ unscaledHeightPixels = 0;
}
@Override