/** * We call this to guarantee that we fetch a fresh policy from the server. * This is to be used if the URL is invalid. */ public void resetPolicy() { mPreferences.putString(PREF_LAST_RESPONSE, Integer.toString(Policy.RETRY)); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES); setRetryCount(Long.parseLong(DEFAULT_RETRY_COUNT)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); mPreferences.commit(); }
/** * We call this to guarantee that we fetch a fresh policy from the server. * This is to be used if the URL is invalid. */ public void resetPolicy() { mPreferences.putString(PREF_LAST_RESPONSE, Integer.toString(Policy.RETRY)); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES); setRetryCount(Long.parseLong(DEFAULT_RETRY_COUNT)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); mPreferences.commit(); }
/** * We call this to guarantee that we fetch a fresh policy from the server. * This is to be used if the URL is invalid. */ public void resetPolicy() { mPreferences.putString(PREF_LAST_RESPONSE, Integer.toString(Policy.RETRY)); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES); setRetryCount(Long.parseLong(DEFAULT_RETRY_COUNT)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); mPreferences.commit(); }
/** * We call this to guarantee that we fetch a fresh policy from the server. * This is to be used if the URL is invalid. */ public void resetPolicy() { mPreferences.putString(PREF_LAST_RESPONSE, Integer.toString(Policy.RETRY)); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES); setRetryCount(Long.parseLong(DEFAULT_RETRY_COUNT)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); mPreferences.commit(); }
setValidityTimestamp(Long.toString(System.currentTimeMillis() + MILLIS_PER_MINUTE)); Set<String> keys = extras.keySet(); for (String key : keys) { if (key.equals("VT")) { setValidityTimestamp(extras.get(key)); } else if (key.equals("GT")) { setRetryUntil(extras.get(key)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES);
setValidityTimestamp(Long.toString(System.currentTimeMillis() + MILLIS_PER_MINUTE)); Set<String> keys = extras.keySet(); for (String key : keys) { if (key.equals("VT")) { setValidityTimestamp(extras.get(key)); } else if (key.equals("GT")) { setRetryUntil(extras.get(key)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES);
setValidityTimestamp(Long.toString(System.currentTimeMillis() + MILLIS_PER_MINUTE)); Set<String> keys = extras.keySet(); for (String key : keys) { if (key.equals("VT")) { setValidityTimestamp(extras.get(key)); } else if (key.equals("GT")) { setRetryUntil(extras.get(key)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES);
setValidityTimestamp(Long.toString(System.currentTimeMillis() + MILLIS_PER_MINUTE)); Set<String> keys = extras.keySet(); for (String key : keys) { if (key.equals("VT")) { setValidityTimestamp(extras.get(key)); } else if (key.equals("GT")) { setRetryUntil(extras.get(key)); setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP); setRetryUntil(DEFAULT_RETRY_UNTIL); setMaxRetries(DEFAULT_MAX_RETRIES);