Invalidate text display list when text properties change.
Bug 5887530, Bug 5945886, Bug 5904371
Added more invalidation when other properties of the text are changed.
Change-Id: I618dbaae9da64bf72dd29e444215b7de1c644573
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 164bc64..53107cb 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -1205,6 +1205,7 @@
if (imm != null) imm.restartInput(this);
}
+ mTextDisplayListIsValid = false;
prepareCursorControllers();
// start or stop the cursor blinking as appropriate
@@ -2310,6 +2311,7 @@
public void setHighlightColor(int color) {
if (mHighlightColor != color) {
mHighlightColor = color;
+ mTextDisplayListIsValid = false;
invalidate();
}
}
@@ -2330,6 +2332,7 @@
mShadowDx = dx;
mShadowDy = dy;
+ mTextDisplayListIsValid = false;
invalidate();
}
@@ -2821,6 +2824,7 @@
}
}
if (inval) {
+ mTextDisplayListIsValid = false;
invalidate();
}
}