Skip to content

Commit 96d35df

Browse files
authored
fix(auth, android): fix crash on Android where detaching from engine was not properly resetting the Pigeon handler (#9218)
1 parent 641ece1 commit 96d35df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/firebase_auth/firebase_auth/android/src/main/java/io/flutter/plugins/firebase/auth/FlutterFirebaseAuthPlugin.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
128128
channel.setMethodCallHandler(null);
129129
channel = null;
130130
messenger = null;
131-
GeneratedAndroidFirebaseAuth.MultiFactorUserHostApi.setup(null, this);
132-
GeneratedAndroidFirebaseAuth.MultiFactoResolverHostApi.setup(null, this);
131+
GeneratedAndroidFirebaseAuth.MultiFactorUserHostApi.setup(binding.getBinaryMessenger(), null);
132+
GeneratedAndroidFirebaseAuth.MultiFactoResolverHostApi.setup(
133+
binding.getBinaryMessenger(), null);
133134

134135
removeEventListeners();
135136
}

0 commit comments

Comments
 (0)