// Attempt to persist changes
int tries = 0;
Integer result = RESULT_FAILURE;
- while (tries < PERSIST_TRIES) {
+ while (tries++ < PERSIST_TRIES) {
try {
// Build operations and try applying
final ArrayList<ContentProviderOperation> diff = state.buildDiff();