Loading core/java/com/android/internal/policy/DecorView.java +21 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.Region; import android.graphics.Shader; import android.graphics.drawable.Drawable; import android.os.RemoteException; Loading Loading @@ -258,6 +259,26 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind setWillNotDraw(getBackground() == null && !mBackgroundFallback.hasFallback()); } @Override public boolean gatherTransparentRegion(Region region) { boolean statusOpaque = gatherTransparentRegion(mStatusColorViewState, region); boolean navOpaque = gatherTransparentRegion(mNavigationColorViewState, region); boolean decorOpaque = super.gatherTransparentRegion(region); // combine bools after computation, so each method above always executes return statusOpaque || navOpaque || decorOpaque; } boolean gatherTransparentRegion(ColorViewState colorViewState, Region region) { if (colorViewState.view != null && colorViewState.visible && isResizing()) { // If a visible ColorViewState is in a resizing host DecorView, forcibly register its // opaque area, since it's drawn by a different root RenderNode. It would otherwise be // rejected by ViewGroup#gatherTransparentRegion() for the view not being VISIBLE. return colorViewState.view.gatherTransparentRegion(region); } return false; // no opaque area added } @Override public void onDraw(Canvas c) { super.onDraw(c); Loading Loading
core/java/com/android/internal/policy/DecorView.java +21 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.Region; import android.graphics.Shader; import android.graphics.drawable.Drawable; import android.os.RemoteException; Loading Loading @@ -258,6 +259,26 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind setWillNotDraw(getBackground() == null && !mBackgroundFallback.hasFallback()); } @Override public boolean gatherTransparentRegion(Region region) { boolean statusOpaque = gatherTransparentRegion(mStatusColorViewState, region); boolean navOpaque = gatherTransparentRegion(mNavigationColorViewState, region); boolean decorOpaque = super.gatherTransparentRegion(region); // combine bools after computation, so each method above always executes return statusOpaque || navOpaque || decorOpaque; } boolean gatherTransparentRegion(ColorViewState colorViewState, Region region) { if (colorViewState.view != null && colorViewState.visible && isResizing()) { // If a visible ColorViewState is in a resizing host DecorView, forcibly register its // opaque area, since it's drawn by a different root RenderNode. It would otherwise be // rejected by ViewGroup#gatherTransparentRegion() for the view not being VISIBLE. return colorViewState.view.gatherTransparentRegion(region); } return false; // no opaque area added } @Override public void onDraw(Canvas c) { super.onDraw(c); Loading