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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user