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

Commit cb5f9db4 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #7651552 resetRtlProperties() is called way too often

- remove unnecessary calls to resetRtlProperties().
- now reset of RTL properties will only be done when adding a View
(and no more when removing it)

Change-Id: I0d42128c9f7df6085fb92bb5af5c9bd4d1ba88a3
parent 05db19bc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -11854,8 +11854,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        mCurrentAnimation = null;
        resetRtlProperties();
        onRtlPropertiesChanged(LAYOUT_DIRECTION_DEFAULT);
        resetAccessibilityStateChanged();
    }
+0 −17
Original line number Diff line number Diff line
@@ -3620,8 +3620,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            childHasTransientStateChanged(view, false);
        }

        view.resetRtlProperties();

        onViewRemoved(view);

        needGlobalAttributesUpdate(false);
@@ -5368,21 +5366,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        }
    }

    /**
     * @hide
     */
    @Override
    public void resetRtlProperties() {
        super.resetRtlProperties();
        int count = getChildCount();
        for (int i = 0; i < count; i++) {
            final View child = getChildAt(i);
            if (child.isLayoutDirectionInherited()) {
                child.resetRtlProperties();
            }
        }
    }

    /**
     * @hide
     */