Add a null check to avoid NPE.
Because getTextCursorDrawable() can return null, this CL adds a null check so that it won't cause a NPE on ARC++. Bug: 244632907 Test: Manual Change-Id: I96a7817b2697eedff9f35762124a97d9e04992a8
This commit is contained in:
committed by
Merissa Mitchell
parent
ff008f0747
commit
59b90a43bd
@@ -221,8 +221,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
|
||||
|
||||
mEditText.setTextColor(textColor);
|
||||
mEditText.setHintTextColor(hintColor);
|
||||
mEditText.getTextCursorDrawable().setColorFilter(
|
||||
accentColor.getDefaultColor(), PorterDuff.Mode.SRC_IN);
|
||||
if (mEditText.getTextCursorDrawable() != null) {
|
||||
mEditText.getTextCursorDrawable().setColorFilter(
|
||||
accentColor.getDefaultColor(), PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
mContentBackground.setColor(editBgColor);
|
||||
mContentBackground.setStroke(stroke, accentColor);
|
||||
mDelete.setImageTintList(ColorStateList.valueOf(deleteFgColor));
|
||||
|
||||
Reference in New Issue
Block a user