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 committed Oct 30, 2022
1 parent 45b2973 commit 2a19ef4
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 2a19ef4

Please sign in to comment.