OSDN Git Service

Increment tries as we reparent to avoid looping.
[android-x86/packages-apps-Contacts.git] / src / com / android / contacts / ui / EditContactActivity.java
index 9ed3d57..3b06a48 100644 (file)
@@ -512,7 +512,7 @@ public final class EditContactActivity extends Activity
             // 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();