Lines Matching refs:sharedPref
51 SharedPreferences sharedPref = in generateAndSetId() local
53 if (sharedPref.contains(KEY_ID)) { in generateAndSetId()
59 SharedPreferences.Editor editor = sharedPref.edit(); in generateAndSetId()
68 SharedPreferences sharedPref = in getId() local
71 return sharedPref.getInt(KEY_ID, rand.nextInt(ID_UPPER_BOUND) /* defaultValue */); in getId()
87 SharedPreferences sharedPref = in setDeviceConfig() local
89 SharedPreferences.Editor editor = sharedPref.edit(); in setDeviceConfig()
92 && sharedPref.getInt(KEY_EXTRA_KEYS, -5) != extraKeys) { in setDeviceConfig()
97 && sharedPref.getLong(KEY_EXPIRING_BY, -1) != expiringBy.toMillis()) { in setDeviceConfig()
101 if (url != null && !sharedPref.getString(KEY_URL, "").equals(url)) { in setDeviceConfig()
115 SharedPreferences sharedPref = in getExtraSignedKeysAvailable() local
117 return sharedPref.getInt(KEY_EXTRA_KEYS, EXTRA_SIGNED_KEYS_AVAILABLE_DEFAULT); in getExtraSignedKeysAvailable()
124 SharedPreferences sharedPref = in getExpiringBy() local
126 return Duration.ofMillis(sharedPref.getLong(KEY_EXPIRING_BY, EXPIRING_BY_MS_DEFAULT)); in getExpiringBy()
134 SharedPreferences sharedPref = in getUrl() local
136 return sharedPref.getString(KEY_URL, URL_DEFAULT); in getUrl()
147 SharedPreferences sharedPref = in incrementFailureCounter() local
149 SharedPreferences.Editor editor = sharedPref.edit(); in incrementFailureCounter()
150 int failures = sharedPref.getInt(KEY_FAILURE_COUNTER, 0 /* defaultValue */); in incrementFailureCounter()
160 SharedPreferences sharedPref = in getFailureCounter() local
162 return sharedPref.getInt(KEY_FAILURE_COUNTER, 0 /* defaultValue */); in getFailureCounter()
169 SharedPreferences sharedPref = in clearFailureCounter() local
171 if (sharedPref.getInt(KEY_FAILURE_COUNTER, 0) != 0) { in clearFailureCounter()
172 SharedPreferences.Editor editor = sharedPref.edit(); in clearFailureCounter()
182 SharedPreferences sharedPref = in clearPreferences() local
184 SharedPreferences.Editor editor = sharedPref.edit(); in clearPreferences()