android: fixes bug reported through PlayStore system: IllegalStateException of Timer.

occured when forceRefresh() in Monitor was called after a manual studown, which cancels the timer.
This commit is contained in:
Joachim Fritzsch 2013-07-24 13:40:48 +02:00
parent 3b76b22bba
commit 91f3fa1bed
1 changed files with 3 additions and 1 deletions

View File

@ -741,7 +741,9 @@ public class Monitor extends Service {
// will fire clientstatuschange Broadcast updon completion
public void forceRefresh() {
if(Logging.DEBUG) Log.d(Logging.TAG,"forceRefresh()");
updateTimer.schedule(new StatusUpdateTimerTask(), 0);
try{
updateTimer.schedule(new StatusUpdateTimerTask(), 0);
} catch (Exception e){} // throws IllegalStateException if called after timer got cancelled, i.e. after manual shutdown
}
// exits both, UI and BOINC client.