From 18a0b9e041a2489d9ebf2339c80fbdb4495b03f6 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Fri, 10 Jul 2015 15:49:03 -0700 Subject: [PATCH] Fix flash of uninitialized surface Fixes a bug where during the animation of the backdrop uninitialized memory was showing because the backdrop's alpha was zero, so RenderNode didn't issue any drawing commands. Bug: 21472158 Change-Id: I7ad6bb64e739059febffca10463c8097693a9563 --- .../com/android/systemui/statusbar/phone/PhoneStatusBar.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index ea59ecd10e2dd..a078519729ff6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1706,7 +1706,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, Log.v(TAG, "DEBUG_MEDIA: Fading out album artwork"); } mBackdrop.animate() - .alpha(0f) + // Never let the alpha become zero - otherwise the RenderNode + // won't draw anything and uninitialized memory will show through + // if mScrimSrcModeEnabled. Note that 0.001 is rounded down to 0 in libhwui. + .alpha(0.002f) .setInterpolator(mBackdropInterpolator) .setDuration(300) .setStartDelay(0)