summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2012-02-21 13:54:21 -0800
committer Dianne Hackborn <hackbod@google.com> 2012-02-21 13:54:21 -0800
commit01011c3d7ce4f76c1a76b33a04fc63da784ddbea (patch)
tree8dcaf6f1e6ef5426631d2d88513fbd1218e8178b
parent2d559b5311be1cd909e5a445afe75a840688b822 (diff)
Fix issue #6037252: Screen shifts after all apps are upgraded
Two things: (1) make sure the boot message is always positioned within the entire unrestricted display, and (2) allow the dim background to go on top of the nav bar when being used for the boot message (this latter is really a hack that should be more generally fixed in the future). Change-Id: I7261b044eb802a39cadff931b50a679ff18781d6
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java10
-rw-r--r--services/java/com/android/server/wm/DimAnimator.java4
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java6
3 files changed, 17 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 59b6626f9cae..0de76a75f079 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2217,13 +2217,21 @@ public class PhoneWindowManager implements WindowManagerPolicy {
"Laying out navigation bar window: (%d,%d - %d,%d)",
pf.left, pf.top, pf.right, pf.bottom));
}
- } else if (attrs.type == TYPE_SECURE_SYSTEM_OVERLAY
+ } else if ((attrs.type == TYPE_SECURE_SYSTEM_OVERLAY
+ || attrs.type == TYPE_BOOT_PROGRESS)
&& ((fl & FLAG_FULLSCREEN) != 0)) {
// Fullscreen secure system overlays get what they ask for.
pf.left = df.left = mUnrestrictedScreenLeft;
pf.top = df.top = mUnrestrictedScreenTop;
pf.right = df.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
pf.bottom = df.bottom = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
+ } else if (attrs.type == TYPE_BOOT_PROGRESS) {
+ // Boot progress screen always covers entire display.
+ pf.left = df.left = cf.left = mUnrestrictedScreenLeft;
+ pf.top = df.top = cf.top = mUnrestrictedScreenTop;
+ pf.right = df.right = cf.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
+ pf.bottom = df.bottom = cf.bottom
+ = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
} else {
pf.left = df.left = cf.left = mRestrictedScreenLeft;
pf.top = df.top = cf.top = mRestrictedScreenTop;
diff --git a/services/java/com/android/server/wm/DimAnimator.java b/services/java/com/android/server/wm/DimAnimator.java
index a3293e8bbe87..a9d4e01aedb1 100644
--- a/services/java/com/android/server/wm/DimAnimator.java
+++ b/services/java/com/android/server/wm/DimAnimator.java
@@ -180,7 +180,9 @@ class DimAnimator {
public void printTo(String prefix, PrintWriter pw) {
pw.print(prefix);
- pw.print("mDimSurface="); pw.println(mDimSurface);
+ pw.print("mDimSurface="); pw.print(mDimSurface);
+ pw.print(" "); pw.print(mLastDimWidth); pw.print(" x ");
+ pw.println(mLastDimHeight);
pw.print(prefix);
pw.print("mDimShown="); pw.print(mDimShown);
pw.print(" current="); pw.print(mDimCurrentAlpha);
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index bd33e0c506b4..3f72dec6f8c2 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -8593,7 +8593,11 @@ public class WindowManagerService extends IWindowManager.Stub
if (mDimAnimator == null) {
mDimAnimator = new DimAnimator(mFxSession);
}
- mDimAnimator.show(innerDw, innerDh);
+ if (attrs.type == WindowManager.LayoutParams.TYPE_BOOT_PROGRESS) {
+ mDimAnimator.show(dw, dh);
+ } else {
+ mDimAnimator.show(innerDw, innerDh);
+ }
mDimAnimator.updateParameters(mContext.getResources(),
w, currentTime);
}