File tree Expand file tree Collapse file tree
main/java/com/firebase/ui/auth
test/java/com/firebase/ui/auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import android.app.Activity
1818import android.content.Context
1919import android.content.Intent
2020import android.os.Bundle
21+ import androidx.annotation.RestrictTo
2122import androidx.activity.ComponentActivity
2223import androidx.activity.compose.setContent
2324import androidx.activity.enableEdgeToEdge
@@ -219,6 +220,19 @@ class FirebaseAuthActivity : ComponentActivity() {
219220 }
220221 }
221222
223+ /* *
224+ * Clears cached launch state. This method is intended for testing purposes only.
225+ *
226+ * @suppress This is an internal API and should not be used in production code.
227+ * @RestrictTo RestrictTo.Scope.TESTS
228+ */
229+ @JvmStatic
230+ @RestrictTo(RestrictTo .Scope .TESTS )
231+ fun clearLaunchStateCache () {
232+ configurationCache.clear()
233+ authUICache.clear()
234+ }
235+
222236 private val authUICache = ConcurrentHashMap <String , FirebaseAuthUI >()
223237 }
224238}
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ class FirebaseAuthActivityTest {
111111
112112 @After
113113 fun tearDown () {
114+ FirebaseAuthActivity .clearLaunchStateCache()
114115 FirebaseAuthUI .clearInstanceCache()
115116 FirebaseApp .getApps(applicationContext).forEach { app ->
116117 try {
You can’t perform that action at this time.
0 commit comments