Skip to content

Commit 01011c3

Browse files
author
Dianne Hackborn
committed
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
1 parent 2d559b5 commit 01011c3

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2217,13 +2217,21 @@ public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
22172217
"Laying out navigation bar window: (%d,%d - %d,%d)",
22182218
pf.left, pf.top, pf.right, pf.bottom));
22192219
}
2220-
} else if (attrs.type == TYPE_SECURE_SYSTEM_OVERLAY
2220+
} else if ((attrs.type == TYPE_SECURE_SYSTEM_OVERLAY
2221+
|| attrs.type == TYPE_BOOT_PROGRESS)
22212222
&& ((fl & FLAG_FULLSCREEN) != 0)) {
22222223
// Fullscreen secure system overlays get what they ask for.
22232224
pf.left = df.left = mUnrestrictedScreenLeft;
22242225
pf.top = df.top = mUnrestrictedScreenTop;
22252226
pf.right = df.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
22262227
pf.bottom = df.bottom = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
2228+
} else if (attrs.type == TYPE_BOOT_PROGRESS) {
2229+
// Boot progress screen always covers entire display.
2230+
pf.left = df.left = cf.left = mUnrestrictedScreenLeft;
2231+
pf.top = df.top = cf.top = mUnrestrictedScreenTop;
2232+
pf.right = df.right = cf.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
2233+
pf.bottom = df.bottom = cf.bottom
2234+
= mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
22272235
} else {
22282236
pf.left = df.left = cf.left = mRestrictedScreenLeft;
22292237
pf.top = df.top = cf.top = mRestrictedScreenTop;

services/java/com/android/server/wm/DimAnimator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ boolean updateSurface(boolean dimming, long currentTime, boolean displayFrozen)
180180

181181
public void printTo(String prefix, PrintWriter pw) {
182182
pw.print(prefix);
183-
pw.print("mDimSurface="); pw.println(mDimSurface);
183+
pw.print("mDimSurface="); pw.print(mDimSurface);
184+
pw.print(" "); pw.print(mLastDimWidth); pw.print(" x ");
185+
pw.println(mLastDimHeight);
184186
pw.print(prefix);
185187
pw.print("mDimShown="); pw.print(mDimShown);
186188
pw.print(" current="); pw.print(mDimCurrentAlpha);

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8593,7 +8593,11 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
85938593
if (mDimAnimator == null) {
85948594
mDimAnimator = new DimAnimator(mFxSession);
85958595
}
8596-
mDimAnimator.show(innerDw, innerDh);
8596+
if (attrs.type == WindowManager.LayoutParams.TYPE_BOOT_PROGRESS) {
8597+
mDimAnimator.show(dw, dh);
8598+
} else {
8599+
mDimAnimator.show(innerDw, innerDh);
8600+
}
85978601
mDimAnimator.updateParameters(mContext.getResources(),
85988602
w, currentTime);
85998603
}

0 commit comments

Comments
 (0)