Add snakbar message when STT is cancelled for the 3rd time

This commit is contained in:
adrienmalin
2018-12-05 12:17:09 +01:00
parent 2c64cac3c2
commit b92b0acd89
3 changed files with 9 additions and 1 deletions

View File

@ -277,8 +277,14 @@ class MatchActivity : AppCompatActivity() {
}
} else {
numSttCancelled++
if (numSttCancelled >= STT_RETRIES)
if (numSttCancelled >= STT_RETRIES) {
sttEnabled = false
Snackbar.make(
findViewById(R.id.coordinatorLayout),
R.string.STT_disabled,
Snackbar.LENGTH_SHORT
).show()
}
}
}
}