aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider
diff options
context:
space:
mode:
authorAdithya Abraham Philip <adithyaphilip@gmail.com>2015-08-19 01:13:12 +0530
committerAdithya Abraham Philip <adithyaphilip@gmail.com>2015-08-20 21:02:29 +0530
commit0251f0e41695d3961dde553ba9ab76fa46583abb (patch)
tree2aa105658d112f1ac213dc106d87072a814bd2a2 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider
parentf625a26bbd9e4e1049480028b7738ff4e37fd712 (diff)
downloadopen-keychain-0251f0e41695d3961dde553ba9ab76fa46583abb.tar.gz
open-keychain-0251f0e41695d3961dde553ba9ab76fa46583abb.tar.bz2
open-keychain-0251f0e41695d3961dde553ba9ab76fa46583abb.zip
introduced constants for keyserver sync, fixed sync issue
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
index e8eea6831..cbb71276c 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
@@ -700,20 +700,14 @@ public class ProviderHelper {
new String[]{"" + masterKeyId},
null
);
- ContentValues lastUpdatedEntry = null;
if (lastUpdatedCursor.moveToNext()) {
- lastUpdatedEntry = new ContentValues(2);
+ // there was an entry to re-insert
+ // this operation must happen after the new key is inserted
+ ContentValues lastUpdatedEntry = new ContentValues(2);
lastUpdatedEntry.put(UpdatedKeys.MASTER_KEY_ID,
lastUpdatedCursor.getLong(INDEX_MASTER_KEY_ID));
lastUpdatedEntry.put(UpdatedKeys.LAST_UPDATED,
lastUpdatedCursor.getLong(INDEX_LAST_UPDATED));
- Log.e("PHILIP", "cv: " + lastUpdatedEntry + " actual: " + masterKeyId);
- }
- lastUpdatedCursor.close();
-
- if (lastUpdatedEntry != null) {
- // there was an entry to re-insert
- // this operation must happen after the new key is inserted
operations.add(
ContentProviderOperation
.newInsert(UpdatedKeys.CONTENT_URI)
@@ -721,6 +715,7 @@ public class ProviderHelper {
.build()
);
}
+ lastUpdatedCursor.close();
try {
// delete old version of this keyRing, which also deletes all keys and userIds on cascade