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
upstream-sync
MarcLeclair 3 years ago committed by GitHub
parent 10f75a3606
commit 9d728ec168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)
}

Loading…
Cancel
Save