android: hiding BOINC client cpu throttling suspension from GUI

This commit is contained in:
Joachim Fritzsch 2013-05-18 21:18:00 +02:00
parent 7680f94c41
commit e350b8ef72
2 changed files with 11 additions and 1 deletions

View File

@ -249,7 +249,7 @@
<string name="suspend_tod">Out of computation time-frame.</string>
<string name="suspend_bm">BOINC is benchmarking your device&#8230;</string>
<string name="suspend_disksize">Out of disk space.</string>
<string name="suspend_cputhrottle">Your device is busy.</string>
<string name="suspend_cputhrottle">Scheduled CPU throttle.</string>
<string name="suspend_noinput">No recent tasks available.</string>
<string name="suspend_delay">Initialisation delay.</string>
<string name="suspend_exclusiveapp">An exclusive app is running.</string>

View File

@ -377,6 +377,16 @@ public class ClientStatus {
setWifiLock(false);
return;
}
if(status.task_mode == BOINCDefs.RUN_MODE_AUTO && status.task_suspend_reason == BOINCDefs.SUSPEND_REASON_CPU_THROTTLE) {
// suspended due to CPU throttling, treat as if was running!
computingStatus = COMPUTING_STATUS_COMPUTING;
computingSuspendReason = status.task_suspend_reason; // = 64 - SUSPEND_REASON_CPU_THROTTLE
computingParseError = false;
setWakeLock(true);
setWifiLock(true);
return;
}
if((status.task_mode == BOINCDefs.RUN_MODE_AUTO) && (status.task_suspend_reason != BOINCDefs.SUSPEND_NOT_SUSPENDED)) {
computingStatus = COMPUTING_STATUS_SUSPENDED;
computingSuspendReason = status.task_suspend_reason;