From 9d728ec168eab5d3621f4f6707d6d03eb5021a50 Mon Sep 17 00:00:00 2001 From: MarcLeclair Date: Thu, 8 Apr 2021 15:20:18 -0400 Subject: [PATCH] For #17759: Added min SDK 23 to avoid crashes on android 5.0 and 5.1 (#18832) * For #17759: Added min SDK 23 to avoid crashes on android 5.0 and 5.1 * For #17759: fixed Android code from INT to actual version name --- app/src/main/java/org/mozilla/fenix/HomeActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt index 45fd06439e..faaaf6dd28 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -896,7 +896,11 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { } override fun getSystemService(name: String): Any? { - if (LAYOUT_INFLATER_SERVICE == name) { + // Issue #17759 had a crash with the PerformanceInflater.kt on Android 5.0 and 5.1 + // when using the TimePicker. Since the inflater was created for performance monitoring + // purposes and that we test on new android versions, this means that any difference in + // inflation will be caught on those devices. + if (LAYOUT_INFLATER_SERVICE == name && Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) { if (inflater == null) { inflater = PerformanceInflater(LayoutInflater.from(baseContext), this) }