Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe455af2 authored by Romain Guy's avatar Romain Guy
Browse files

Add a compile time condition to remove unnecessary code

Change-Id: Ia44916af8e22e548fbb62cb2b53da285d5959102
parent b04f7e94
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -6818,8 +6818,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
        if ((changed & VISIBILITY_MASK) != 0) {
        if ((changed & VISIBILITY_MASK) != 0) {
            if (mParent instanceof ViewGroup) {
            if (mParent instanceof ViewGroup) {
                ((ViewGroup) mParent).onChildVisibilityChanged(this, (changed & VISIBILITY_MASK),
                ((ViewGroup) mParent).onChildVisibilityChanged(this,
                        (flags & VISIBILITY_MASK));
                        (changed & VISIBILITY_MASK), (flags & VISIBILITY_MASK));
                ((View) mParent).invalidate(true);
                ((View) mParent).invalidate(true);
            } else if (mParent != null) {
            } else if (mParent != null) {
                mParent.invalidateChild(this, null);
                mParent.invalidateChild(this, null);
+114 −109
Original line number Original line Diff line number Diff line
@@ -3601,6 +3601,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            // through
            // through
            final boolean drawAnimation = (child.mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION;
            final boolean drawAnimation = (child.mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION;


            //noinspection PointlessBooleanExpression
            if (!HardwareRenderer.RENDER_DIRTY_REGIONS) {
                if (dirty == null) {
                if (dirty == null) {
                    if (child.mLayerType != LAYER_TYPE_NONE) {
                    if (child.mLayerType != LAYER_TYPE_NONE) {
                        mPrivateFlags |= INVALIDATED;
                        mPrivateFlags |= INVALIDATED;
@@ -3647,7 +3649,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                            }
                            }
                        }
                        }
                    } while (parent != null);
                    } while (parent != null);
            } else {
                }

                return;
            }

            // Check whether the child that requests the invalidate is fully opaque
            // Check whether the child that requests the invalidate is fully opaque
            // Views being animated or transformed are not considered opaque because we may
            // Views being animated or transformed are not considered opaque because we may
            // be invalidating their old position and need the parent to paint behind them.
            // be invalidating their old position and need the parent to paint behind them.
@@ -3726,7 +3732,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            } while (parent != null);
            } while (parent != null);
        }
        }
    }
    }
    }


    /**
    /**
     * Don't call or override this method. It is used for the implementation of
     * Don't call or override this method. It is used for the implementation of