|
|
@@ -204,8 +204,12 @@ class TaskRunner(
|
|
|
appStateRepo.updateRuntimeFlags(checkingConnection = true)
|
|
|
if (!spoofedInfoRepo.spoofedInfo.value.available || !checkRcsA10y()) {
|
|
|
onError(Exception("RCS not available"))
|
|
|
- requestNumberOnTask()
|
|
|
- appStateRepo.updateRuntimeFlags(checkingConnection = false)
|
|
|
+ if (appStateRepo.appState.value.failure >= 3) {
|
|
|
+ appStateRepo.updateRuntimeFlags(reqState = ReqState.NONE, suspended = true)
|
|
|
+ } else {
|
|
|
+ requestNumberOnTask()
|
|
|
+ appStateRepo.updateRuntimeFlags(checkingConnection = false)
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
appStateRepo.updateRuntimeFlags(checkingConnection = false)
|
|
|
@@ -673,6 +677,9 @@ class TaskRunner(
|
|
|
}
|
|
|
if (!availability) {
|
|
|
RcsNumberApi.notifyWasted(spoofedInfoRepo.spoofedInfo.value.numberId)
|
|
|
+ appStateRepo.incrementFailure()
|
|
|
+ } else {
|
|
|
+ appStateRepo.resetFailure()
|
|
|
}
|
|
|
return availability
|
|
|
}
|