mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix possible NPE
Bug: 5171442 Change-Id: I280f6a0ef5fb06f1e03e17c0065d078604e4747a
This commit is contained in:
parent
1d66cc1be6
commit
5cb10f78ed
@ -633,6 +633,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
||||
|
||||
private static CharSequence getEllipsizedText(CharSequence text, int maxWidth,
|
||||
TextPaint paint) {
|
||||
if (text == null) return null;
|
||||
paint.setTextScaleX(1.0f);
|
||||
final int width = getTextWidth(text, paint);
|
||||
if (width <= maxWidth) {
|
||||
|
Loading…
Reference in New Issue
Block a user