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

Commit 9ad4a552 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Prevent exception when temporarily detaching the RemoteInputView's EditText.

Fixes: 187195960
Test: unable to repro crash, either before or after the fix. :/
Change-Id: I9a97df5e77fc9173ca9ae4416986f979b41d564b
parent 6c9c6cb6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -749,7 +749,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
        super.dispatchStartTemporaryDetach();
        // Detach the EditText temporarily such that it doesn't get onDetachedFromWindow and
        // won't lose IME focus.
        detachViewFromParent(mEditText);
        final int iEditText = indexOfChild(mEditText);
        if (iEditText != -1) {
            detachViewFromParent(iEditText);
        }
    }

    @Override