You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2dccf71
Browse filesBrowse the repository at this point in the historyBrowse files
fix(shared_preferences_android): keep APIs registered until the last engine detaches
Resolvesflutter/flutter#194920 by adding a reference count for engines attaching and detaching from the SharedPreferences plugins. The process-wide Pigeon APIs are only unregistered when the reference count drops to 0, preventing background tasks from clearing the API registration used by the main isolate.
Copy file name to clipboardExpand all lines: packages/shared_preferences/shared_preferences_android/android/src/main/kotlin/io/flutter/plugins/sharedpreferences/LegacySharedPreferencesPlugin.kt
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,10 +45,14 @@ internal constructor(private val listEncoder: SharedPreferencesListEncoder) :
Copy file name to clipboardExpand all lines: packages/shared_preferences/shared_preferences_android/android/src/main/kotlin/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.kt
+15-6Lines changed: 15 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,15 @@ const val DOUBLE_PREFIX = "VGhpcyBpcyB0aGUgcHJlZml4IGZvciBEb3VibGUu"
Copy file name to clipboardExpand all lines: packages/shared_preferences/shared_preferences_android/android/src/test/kotlin/io/flutter/plugins/sharedpreferences/LegacySharedPreferencesTest.kt
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,11 @@ class LegacySharedPreferencesTest {
Copy file name to clipboardExpand all lines: packages/shared_preferences/shared_preferences_android/android/src/test/kotlin/io/flutter/plugins/sharedpreferences/MultipleEngineReproduceTest.kt
+30-8Lines changed: 30 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,12 @@ class MultipleEngineReproduceTest {
Copy file name to clipboardExpand all lines: packages/shared_preferences/shared_preferences_android/android/src/test/kotlin/io/flutter/plugins/sharedpreferences/SharedPreferencesTest.kt
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,12 @@ internal class SharedPreferencesTest {
0 commit comments