Skip to content

Commit cb5f9db

Browse files
author
Fabrice Di Meglio
committed
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
1 parent 05db19b commit cb5f9db

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

core/java/android/view/View.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11854,8 +11854,6 @@ protected void onDetachedFromWindow() {
1185411854

1185511855
mCurrentAnimation = null;
1185611856

11857-
resetRtlProperties();
11858-
onRtlPropertiesChanged(LAYOUT_DIRECTION_DEFAULT);
1185911857
resetAccessibilityStateChanged();
1186011858
}
1186111859

core/java/android/view/ViewGroup.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3620,8 +3620,6 @@ private void removeViewInternal(int index, View view) {
36203620
childHasTransientStateChanged(view, false);
36213621
}
36223622

3623-
view.resetRtlProperties();
3624-
36253623
onViewRemoved(view);
36263624

36273625
needGlobalAttributesUpdate(false);
@@ -5368,21 +5366,6 @@ public void resolveLayoutParams() {
53685366
}
53695367
}
53705368

5371-
/**
5372-
* @hide
5373-
*/
5374-
@Override
5375-
public void resetRtlProperties() {
5376-
super.resetRtlProperties();
5377-
int count = getChildCount();
5378-
for (int i = 0; i < count; i++) {
5379-
final View child = getChildAt(i);
5380-
if (child.isLayoutDirectionInherited()) {
5381-
child.resetRtlProperties();
5382-
}
5383-
}
5384-
}
5385-
53865369
/**
53875370
* @hide
53885371
*/

0 commit comments

Comments
 (0)