From a50cf27648c07b7003d61feae3474f1b2414ec1b Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Mon, 28 Sep 2020 15:42:14 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/13959: fix startup crash by using arg Context. The `context` member function returns null in attachBaseContext so we need to use the Context that's being attached instead. --- app/src/main/java/org/mozilla/fenix/HomeActivity.kt | 2 +- 1 file changed, 1 insertion(+), 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 b0615d7dab..333fb7ba52 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -756,7 +756,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { } override fun attachBaseContext(base: Context) { - components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) { + base.components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) { super.attachBaseContext(base) } }