diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-04 01:07:09 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-04 01:56:02 +0200 |
commit | d921cca91312e5888f98b178252efa2f5db103cf (patch) | |
tree | 2df5180644b302bd5360f8963a73237d6ae12a14 /OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | |
parent | 59f4b4e3e7cc27981e66f140030bef9a3fce3d25 (diff) | |
download | open-keychain-d921cca91312e5888f98b178252efa2f5db103cf.tar.gz open-keychain-d921cca91312e5888f98b178252efa2f5db103cf.tar.bz2 open-keychain-d921cca91312e5888f98b178252efa2f5db103cf.zip |
db-overhaul: reintroduce by-mail and by-subkey queries
the only thing left to fix after the db upgrade (that I can think of
right now) are key exports
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java')
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java index ccae6b2f2..c640bdb7c 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -61,15 +61,15 @@ public class OpenPgpService extends RemoteService { ArrayList<Long> keyIds = new ArrayList<Long>(); boolean missingUserIdsCheck = false; - boolean dublicateUserIdsCheck = false; + boolean duplicateUserIdsCheck = false; ArrayList<String> missingUserIds = new ArrayList<String>(); - ArrayList<String> dublicateUserIds = new ArrayList<String>(); + ArrayList<String> duplicateUserIds = new ArrayList<String>(); for (String email : encryptionUserIds) { - Uri uri = KeychainContract.KeyRings.buildUnifiedKeyRingsByEmailUri(email); + Uri uri = KeyRings.buildUnifiedKeyRingsFindByEmailUri(email); Cursor cur = getContentResolver().query(uri, null, null, null, null); if (cur.moveToFirst()) { - long id = cur.getLong(cur.getColumnIndex(KeychainContract.KeyRings.MASTER_KEY_ID)); + long id = cur.getLong(cur.getColumnIndex(KeyRings.MASTER_KEY_ID)); keyIds.add(id); } else { missingUserIdsCheck = true; @@ -77,8 +77,8 @@ public class OpenPgpService extends RemoteService { Log.d(Constants.TAG, "user id missing"); } if (cur.moveToNext()) { - dublicateUserIdsCheck = true; - dublicateUserIds.add(email); + duplicateUserIdsCheck = true; + duplicateUserIds.add(email); Log.d(Constants.TAG, "more than one user id with the same email"); } } @@ -90,13 +90,13 @@ public class OpenPgpService extends RemoteService { } // allow the user to verify pub key selection - if (missingUserIdsCheck || dublicateUserIdsCheck) { + if (missingUserIdsCheck || duplicateUserIdsCheck) { // build PendingIntent Intent intent = new Intent(getBaseContext(), RemoteServiceActivity.class); intent.setAction(RemoteServiceActivity.ACTION_SELECT_PUB_KEYS); intent.putExtra(RemoteServiceActivity.EXTRA_SELECTED_MASTER_KEY_IDS, keyIdsArray); intent.putExtra(RemoteServiceActivity.EXTRA_MISSING_USER_IDS, missingUserIds); - intent.putExtra(RemoteServiceActivity.EXTRA_DUBLICATE_USER_IDS, dublicateUserIds); + intent.putExtra(RemoteServiceActivity.EXTRA_DUBLICATE_USER_IDS, duplicateUserIds); intent.putExtra(RemoteServiceActivity.EXTRA_DATA, data); PendingIntent pi = PendingIntent.getActivity(getBaseContext(), 0, |