Revert "Attempt to workaround Android 8 block index bug"

This reverts commit 388af6e7c5.
This commit is contained in:
M66B 2022-06-14 07:02:38 +02:00
parent 6cbcfb57d4
commit 64c0b5fa95
1 changed files with 10 additions and 19 deletions

View File

@ -25,7 +25,6 @@ import android.os.Build;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View;
import android.view.textclassifier.TextClassifier; import android.view.textclassifier.TextClassifier;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -124,8 +123,6 @@ public class FixedEditText extends AppCompatEditText {
super.onDraw(canvas); super.onDraw(canvas);
} catch (Throwable ex) { } catch (Throwable ex) {
Log.w(ex); Log.w(ex);
if (ex instanceof ArrayIndexOutOfBoundsException)
try {
/* /*
java.lang.ArrayIndexOutOfBoundsException: length=39; index=-3 java.lang.ArrayIndexOutOfBoundsException: length=39; index=-3
at android.text.DynamicLayout.getBlockIndex(DynamicLayout.java:648) at android.text.DynamicLayout.getBlockIndex(DynamicLayout.java:648)
@ -133,15 +130,9 @@ public class FixedEditText extends AppCompatEditText {
at android.widget.Editor.onDraw(Editor.java:1672) at android.widget.Editor.onDraw(Editor.java:1672)
at android.widget.TextView.onDraw(TextView.java:6914) at android.widget.TextView.onDraw(TextView.java:6914)
at android.view.View.draw(View.java:19200) at android.view.View.draw(View.java:19200)
Fixed in Android 9: Fixed in Android 9:
https://android-review.googlesource.com/c/platform/frameworks/base/+/634929 https://android-review.googlesource.com/c/platform/frameworks/base/+/634929
*/ */
setLayerType(View.LAYER_TYPE_SOFTWARE, null);
super.onDraw(canvas);
} catch (Throwable exex) {
Log.w(exex);
}
} }
} }