Fix issue #2561067: Screen Display half faded...

Also a little tweak to the activity manager to behave better when
an application crash, to hopefully mostly avoid situations where
you get into a crash loop.

Change-Id: I627cc1da3a0f16a180957f02bfbe5c81ecd31758
This commit is contained in:
Dianne Hackborn
2010-03-31 22:19:32 -07:00
parent 058e385b8b
commit f83c555d8a
2 changed files with 37 additions and 3 deletions

View File

@ -11269,6 +11269,8 @@ public class WindowManagerService extends IWindowManager.Stub
float mDimTargetAlpha;
float mDimDeltaPerMs;
long mLastDimAnimTime;
int mLastDimWidth, mLastDimHeight;
DimAnimator (SurfaceSession session) {
if (mDimSurface == null) {
@ -11294,12 +11296,18 @@ public class WindowManagerService extends IWindowManager.Stub
dw + "x" + dh + ")");
mDimShown = true;
try {
mLastDimWidth = dw;
mLastDimHeight = dh;
mDimSurface.setPosition(0, 0);
mDimSurface.setSize(dw, dh);
mDimSurface.show();
} catch (RuntimeException e) {
Slog.w(TAG, "Failure showing dim surface", e);
}
} else if (mLastDimWidth != dw || mLastDimHeight != dh) {
mLastDimWidth = dw;
mLastDimHeight = dh;
mDimSurface.setSize(dw, dh);
}
}