From 7c733c39c6c5b02cdae9c3d536ea62f01f6fd2a2 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 28 Jun 2020 09:53:19 +0200 Subject: [PATCH] Prevent crash --- .../main/java/eu/faircode/email/FixedEditText.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FixedEditText.java b/app/src/main/java/eu/faircode/email/FixedEditText.java index 104238b9cc..76f3370cbc 100644 --- a/app/src/main/java/eu/faircode/email/FixedEditText.java +++ b/app/src/main/java/eu/faircode/email/FixedEditText.java @@ -21,6 +21,7 @@ package eu.faircode.email; import android.content.Context; import android.util.AttributeSet; +import android.view.MotionEvent; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -68,6 +69,16 @@ public class FixedEditText extends AppCompatEditText { } } + @Override + public boolean onTouchEvent(MotionEvent event) { + try { + return super.onTouchEvent(event); + } catch (Throwable ex) { + Log.w(ex); + return false; + } + } + @Override public boolean performLongClick() { try {