From 51b53d900bd1045843c0089a920372b875666419 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Sat, 28 Feb 2026 19:02:38 +0100 Subject: [PATCH] fix startup stack overflow --- .../flutter_mozilla_components/ProfileContext.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/ProfileContext.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/ProfileContext.kt index 4adfdb5d..2e82cf32 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/ProfileContext.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/ProfileContext.kt @@ -2,6 +2,7 @@ package eu.weblibre.flutter_mozilla_components import android.content.Context import android.content.ContextWrapper +import android.content.ComponentCallbacks import android.content.SharedPreferences import android.content.pm.ApplicationInfo import android.os.Build @@ -62,6 +63,14 @@ class ProfileContext(private val base: Context, val relativePath: String) : return this } + override fun registerComponentCallbacks(callback: ComponentCallbacks) { + base.applicationContext.registerComponentCallbacks(callback) + } + + override fun unregisterComponentCallbacks(callback: ComponentCallbacks) { + base.applicationContext.unregisterComponentCallbacks(callback) + } + override fun getFilesDir(): File { return customFilesDir }