Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59b90a43 authored by Merissa Tan's avatar Merissa Tan Committed by Merissa Mitchell
Browse files

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
parent ff008f07
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -221,8 +221,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene

        mEditText.setTextColor(textColor);
        mEditText.setHintTextColor(hintColor);
        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));