move IS_REVOKED table prefix to the right places

Fixes #849
This commit is contained in:
Vincent Breitmoser
2014-09-13 22:08:49 +02:00
parent 3b8c171ecb
commit ff65733ed3
5 changed files with 9 additions and 6 deletions

View File

@@ -27,6 +27,7 @@ import android.util.AttributeSet;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.provider.KeychainContract;
import org.sufficientlysecure.keychain.provider.KeychainDatabase;
import org.sufficientlysecure.keychain.provider.KeychainDatabase.Tables;
public class CertifyKeySpinner extends KeySpinner {
private long mHiddenMasterKeyId = Constants.key.none;
@@ -67,7 +68,7 @@ public class CertifyKeySpinner extends KeySpinner {
String where = KeychainContract.KeyRings.HAS_ANY_SECRET + " = 1 AND "
+ KeychainContract.KeyRings.HAS_CERTIFY + " NOT NULL AND "
+ KeychainContract.KeyRings.IS_REVOKED + " = 0 AND "
+ Tables.KEYS + "." + KeychainContract.KeyRings.IS_REVOKED + " = 0 AND "
+ KeychainContract.KeyRings.IS_EXPIRED + " = 0 AND " + KeychainDatabase.Tables.KEYS + "."
+ KeychainContract.KeyRings.MASTER_KEY_ID + " != " + mHiddenMasterKeyId;

View File

@@ -47,6 +47,7 @@ import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
import org.sufficientlysecure.keychain.provider.CachedPublicKeyRing;
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
import org.sufficientlysecure.keychain.provider.KeychainDatabase.Tables;
import org.sufficientlysecure.keychain.util.Log;
import java.util.ArrayList;
@@ -128,7 +129,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView {
};
String where = KeyRings.HAS_ENCRYPT + " NOT NULL AND " + KeyRings.IS_EXPIRED + " = 0 AND "
+ KeyRings.IS_REVOKED + " = 0";
+ Tables.KEYS + "." + KeyRings.IS_REVOKED + " = 0";
return new CursorLoader(getContext(), baseUri, projection, where, null, null);
}