Skip to content

Commit

Permalink
Fix crash during sign-in when SafetyNet is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in authored and jonathanklee committed Nov 2, 2022
1 parent cedd205 commit 3d46e80
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ import java.util.*
class DroidGuardHandler(private val activity: LoginActivity) {
fun start(dg: String) {
activity.lifecycleScope.launchWhenStarted {
val result = getResult(activity, "minute_maid", Collections.singletonMap("dg_minutemaid", dg))
.toBase64(Base64.NO_WRAP, Base64.NO_PADDING, Base64.URL_SAFE)
activity.runScript("window.setDgResult('$result')");
try {
val result = getResult(activity, "minute_maid", Collections.singletonMap("dg_minutemaid", dg))
.toBase64(Base64.NO_WRAP, Base64.NO_PADDING, Base64.URL_SAFE)
activity.runScript("window.setDgResult('$result')")
} catch (e: Exception) {
// Ignore
}
}
}
}

0 comments on commit 3d46e80

Please sign in to comment.