private void setupRefreshPredictionTimer() { final boolean wantRefresh = TheApp.getPrefs() .getBoolean( TheApp.getResString(R.string.pref_auto_refresh_key), TheApp.getResBool(R.bool.pref_auto_refresh_default)); if (wantRefresh) { Log.i(LOG_NAME, "Setting up refresh predictions timer"); theRefreshPredictionTimer = new Timer(); theRefreshPredictionTimer.schedule( new TimerTask() { @Override public void run() { runRefreshPredictionTimer(); } }, 250, TheApp.getPredictionRefreshDelay()); } }
private void setupRotateTimer() { final boolean wantRefresh = TheApp.getPrefs() .getBoolean( TheApp.getResString(R.string.pref_auto_refresh_key), TheApp.getResBool(R.bool.pref_auto_refresh_default)); if (wantRefresh) { Log.i(LOG_NAME, "We're gonna set up a timer"); theRotateTimer = new Timer(); theRotateTimer.schedule( new TimerTask() { @Override public void run() { runRotateTimer(); } }, CYCLE_PREDICTIONS_DURATION, CYCLE_PREDICTIONS_DURATION); } }