Merge "Fix: TextView makes new layouts too frequently." into mnc-dev

This commit is contained in:
Keisuke Kuroyanagi
2015-06-23 17:56:46 +00:00
committed by Android (Google) Code Review

View File

@@ -9443,10 +9443,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
public void onRtlPropertiesChanged(int layoutDirection) {
super.onRtlPropertiesChanged(layoutDirection);
mTextDir = getTextDirectionHeuristic();
if (mLayout != null) {
checkForRelayout();
final TextDirectionHeuristic newTextDir = getTextDirectionHeuristic();
if (mTextDir != newTextDir) {
mTextDir = newTextDir;
if (mLayout != null) {
checkForRelayout();
}
}
}