Skip to content

Commit 9ee5c22

Browse files
Maciej BiałkaJohan Redestig
authored andcommitted
Set alpha value for newly created dim surface.
Newly created dim surface has alpha set to 1 (opaque), but it is assumed in dim animation code that it is 0 (transparent). When new dim surface is created and expected dim value is calculated to 0 then alpha is never set making screen black (dut to default aplha=1) when dim surface is shown.
1 parent 392fc35 commit 9ee5c22

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10986,6 +10986,7 @@ private static class DimAnimator {
1098610986
try {
1098710987
mDimSurface = new Surface(session, 0, -1, 16, 16, PixelFormat.OPAQUE,
1098810988
Surface.FX_SURFACE_DIM);
10989+
mDimSurface.setAlpha(0.0f);
1098910990
} catch (Exception e) {
1099010991
Log.e(TAG, "Exception creating Dim surface", e);
1099110992
}

0 commit comments

Comments
 (0)