summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-26 13:34:33 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-26 13:34:33 -0700
commitd5238cc1ab8366389b2aada228f2f2e5cbb3244e (patch)
treeec6f26829875401ac65b2f9a0235a243687149df /services
parent90856661cf07453a23c3737f421a4686b70d95c1 (diff)
parent7a09f72b8850ec22e4ca7fd50aba20ead7666f67 (diff)
downloadframeworks_base-d5238cc1ab8366389b2aada228f2f2e5cbb3244e.zip
frameworks_base-d5238cc1ab8366389b2aada228f2f2e5cbb3244e.tar.gz
frameworks_base-d5238cc1ab8366389b2aada228f2f2e5cbb3244e.tar.bz2
am 7a09f72b: Merge "Rework how we decide whether to use system or status bar." into honeycomb-mr2
* commit '7a09f72b8850ec22e4ca7fd50aba20ead7666f67': Rework how we decide whether to use system or status bar.
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java47
1 files changed, 27 insertions, 20 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 31977e4..9c98296 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -408,6 +408,8 @@ public class WindowManagerService extends IWindowManager.Stub
int mBaseDisplayHeight = 0;
int mCurDisplayWidth = 0;
int mCurDisplayHeight = 0;
+ int mAppDisplayWidth = 0;
+ int mAppDisplayHeight = 0;
int mRotation = 0;
int mRequestedRotation = 0;
int mForcedAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
@@ -1433,8 +1435,8 @@ public class WindowManagerService extends IWindowManager.Stub
int adjustWallpaperWindowsLocked() {
int changed = 0;
- final int dw = mCurDisplayWidth;
- final int dh = mCurDisplayHeight;
+ final int dw = mAppDisplayWidth;
+ final int dh = mAppDisplayHeight;
// First find top-most window that has asked to be on top of the
// wallpaper; all wallpapers go behind it.
@@ -1852,8 +1854,8 @@ public class WindowManagerService extends IWindowManager.Stub
}
boolean updateWallpaperOffsetLocked(WindowState changingTarget, boolean sync) {
- final int dw = mCurDisplayWidth;
- final int dh = mCurDisplayHeight;
+ final int dw = mAppDisplayWidth;
+ final int dh = mAppDisplayHeight;
boolean changed = false;
@@ -1893,8 +1895,8 @@ public class WindowManagerService extends IWindowManager.Stub
void updateWallpaperVisibilityLocked() {
final boolean visible = isWallpaperVisible(mWallpaperTarget);
- final int dw = mCurDisplayWidth;
- final int dh = mCurDisplayHeight;
+ final int dw = mAppDisplayWidth;
+ final int dh = mAppDisplayHeight;
int curTokenIndex = mWallpaperTokens.size();
while (curTokenIndex > 0) {
@@ -2701,7 +2703,7 @@ public class WindowManagerService extends IWindowManager.Stub
configChanged = updateOrientationFromAppTokensLocked(false);
performLayoutAndPlaceSurfacesLocked();
if (displayed && win.mIsWallpaper) {
- updateWallpaperOffsetLocked(win, mCurDisplayWidth, mCurDisplayHeight, false);
+ updateWallpaperOffsetLocked(win, mAppDisplayWidth, mAppDisplayHeight, false);
}
if (win.mAppToken != null) {
win.mAppToken.updateReportedVisibilityLocked();
@@ -4779,8 +4781,8 @@ public class WindowManagerService extends IWindowManager.Stub
synchronized(mWindowMap) {
long ident = Binder.clearCallingIdentity();
- dw = mPolicy.getNonDecorDisplayWidth(mRotation, mCurDisplayWidth);
- dh = mPolicy.getNonDecorDisplayHeight(mRotation, mCurDisplayHeight);
+ dw = mAppDisplayWidth;
+ dh = mAppDisplayHeight;
int aboveAppLayer = mPolicy.windowTypeToLayerLw(
WindowManager.LayoutParams.TYPE_APPLICATION) * TYPE_LAYER_MULTIPLIER
@@ -5555,10 +5557,10 @@ 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.realWidthPixels = mPolicy.getNonDecorDisplayWidth(
- mRotation, dw);
- dm.heightPixels = dm.realHeightPixels = mPolicy.getNonDecorDisplayHeight(
- mRotation, dh);
+ dm.widthPixels = dm.unscaledWidthPixels = mAppDisplayWidth
+ = mPolicy.getNonDecorDisplayWidth(mRotation, dw);
+ dm.heightPixels = dm.unscaledHeightPixels = mAppDisplayHeight
+ = mPolicy.getNonDecorDisplayHeight(mRotation, dh);
mCompatibleScreenScale = CompatibilityInfo.updateCompatibleScreenFrame(
dm, mCompatibleScreenFrame, null);
@@ -5986,8 +5988,8 @@ public class WindowManagerService extends IWindowManager.Stub
mInitialDisplayWidth = mInitialDisplayHeight;
mInitialDisplayHeight = tmp;
}
- mBaseDisplayWidth = mCurDisplayWidth = mInitialDisplayWidth;
- mBaseDisplayHeight = mCurDisplayHeight = mInitialDisplayHeight;
+ mBaseDisplayWidth = mCurDisplayWidth = mAppDisplayWidth = mInitialDisplayWidth;
+ mBaseDisplayHeight = mCurDisplayHeight = mAppDisplayHeight = mInitialDisplayHeight;
mInputManager.setDisplaySize(0, mDisplay.getRawWidth(), mDisplay.getRawHeight());
mPolicy.setInitialDisplaySize(mInitialDisplayWidth, mInitialDisplayHeight);
}
@@ -6489,8 +6491,8 @@ public class WindowManagerService extends IWindowManager.Stub
public void getDisplaySize(Point size) {
synchronized(mWindowMap) {
- size.x = mCurDisplayWidth;
- size.y = mCurDisplayHeight;
+ size.x = mAppDisplayWidth;
+ size.y = mAppDisplayHeight;
}
}
@@ -6622,6 +6624,10 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
+ public boolean canStatusBarHide() {
+ return mPolicy.canStatusBarHide();
+ }
+
// -------------------------------------------------------------
// Internals
// -------------------------------------------------------------
@@ -6986,9 +6992,8 @@ public class WindowManagerService extends IWindowManager.Stub
final long currentTime = SystemClock.uptimeMillis();
final int dw = mCurDisplayWidth;
final int dh = mCurDisplayHeight;
-
- final int innerDw = mPolicy.getNonDecorDisplayWidth(mRotation, dw);
- final int innerDh = mPolicy.getNonDecorDisplayHeight(mRotation, dh);
+ final int innerDw = mAppDisplayWidth;
+ final int innerDh = mAppDisplayHeight;
int i;
@@ -8960,6 +8965,8 @@ public class WindowManagerService extends IWindowManager.Stub
pw.print(mBaseDisplayWidth); pw.print("x"); pw.print(mBaseDisplayHeight);
pw.print(" cur=");
pw.print(mCurDisplayWidth); pw.print("x"); pw.print(mCurDisplayHeight);
+ pw.print(" app=");
+ pw.print(mAppDisplayWidth); pw.print("x"); pw.print(mAppDisplayHeight);
pw.print(" real="); pw.print(mDisplay.getRealWidth());
pw.print("x"); pw.print(mDisplay.getRealHeight());
pw.print(" raw="); pw.print(mDisplay.getRawWidth());