From e7b656eff326292d5106b61c32df1f853bf07164 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 8 Aug 2022 22:37:13 +0200 Subject: [PATCH] Unsupported HWBAH2 --- .../java/eu/faircode/email/ActivitySetup.java | 3 ++ .../java/eu/faircode/email/ApplicationEx.java | 3 +- .../main/java/eu/faircode/email/Helper.java | 38 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ActivitySetup.java b/app/src/main/java/eu/faircode/email/ActivitySetup.java index eefb53cc70..b77fd4c4a9 100644 --- a/app/src/main/java/eu/faircode/email/ActivitySetup.java +++ b/app/src/main/java/eu/faircode/email/ActivitySetup.java @@ -1310,6 +1310,9 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac if ("pro".equals(key) && !BuildConfig.DEBUG) continue; + if ("accept_unsupported".equals(key)) + continue; + if ("biometrics".equals(key) || "pin".equals(key)) continue; diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index 41c219f975..d24683f5ed 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -643,7 +643,8 @@ public class ApplicationEx extends Application editor.putBoolean("use_top", !prefs.getBoolean("disable_top", false)); editor.remove("disable_top"); } - } + } else if (version < 1947) + editor.putBoolean("accept_unsupported", true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG) editor.remove("background_service"); diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 6be0b0fd91..b47ae617da 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -1241,6 +1241,44 @@ public class Helper { return false; } + /* + Brand: HUAWEI + Manufacturer: HUAWEI + Model: BAH2-L09 + Product: BAH2-L09 + Device: HWBAH2 + Android: 8.0.0 + + java.lang.ArrayIndexOutOfBoundsException: length=3; index=-1 + at android.text.DynamicLayout.getBlockIndex(DynamicLayout.java:646) + at android.widget.Editor.drawHardwareAccelerated(Editor.java:1744) + at android.widget.Editor.onDraw(Editor.java:1713) + at android.widget.TextView.onDraw(TextView.java:7051) + at eu.faircode.email.FixedEditText.onDraw(SourceFile:1) + at android.view.View.draw(View.java:19314) + at android.view.View.updateDisplayListIfDirty(View.java:18250) + at android.view.View.draw(View.java:19042) + at android.view.ViewGroup.drawChild(ViewGroup.java:4271) + at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054) + at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(SourceFile:5) + at android.view.View.updateDisplayListIfDirty(View.java:18241) + at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4252) + at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4232) + at android.view.View.updateDisplayListIfDirty(View.java:18209) + at android.view.View.draw(View.java:19042) + at android.view.ViewGroup.drawChild(ViewGroup.java:4271) + at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054) + at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(SourceFile:5) + at android.view.View.updateDisplayListIfDirty(View.java:18241) + at android.view.View.draw(View.java:19042) + at android.view.ViewGroup.drawChild(ViewGroup.java:4271) + at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(SourceFile:17) + at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4054) + at android.view.View.draw(View.java:19317) + */ + if ("HWBAH2".equals(Build.DEVICE)) + return false; + return true; }