Skip to content

Commit 1a9a89b

Browse files
linxs0211jianliang00
authored andcommitted
[BugFix][Android] Avoid null drawable invalidation for TextService images
- Pass the loaded inline image drawable to Drawable.Callback instead of invalidating with null. - Handle TextService and null drawable invalidation in AndroidText by redrawing the host view directly. - Verified with git diff --check and Android noasan debug build/install.
1 parent 9aecc72 commit 1a9a89b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • platform/android/lynx_android/src/main/java/com/lynx/tasm/behavior/ui/text

platform/android/lynx_android/src/main/java/com/lynx/tasm/behavior/ui/text/AndroidText.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,10 @@ public void invalidateDrawable(Drawable drawable) {
653653
// TextLayoutWarmer may invalidate AndroidText
654654
return;
655655
}
656+
if (mTextraPage != null || drawable == null) {
657+
invalidate();
658+
return;
659+
}
656660
if (mHasImage && getText() instanceof Spanned) {
657661
Spanned text = (Spanned) getText();
658662
AbsInlineImageSpan[] spans = text.getSpans(0, text.length(), AbsInlineImageSpan.class);

0 commit comments

Comments
 (0)