Handle keys without expiry date right

Fixes #765
This commit is contained in:
mar-v-in 2014-08-14 11:21:59 +02:00
parent f941431d63
commit b8f7dd5676

View File

@ -272,8 +272,8 @@ public class KeychainProvider extends ContentProvider {
projectionMap.put(KeyRings.HAS_SIGN,
"kS." + Keys.KEY_ID + " AS " + KeyRings.HAS_SIGN);
projectionMap.put(KeyRings.IS_EXPIRED,
"(" + Tables.KEYS + "." + Keys.EXPIRY + " < " + new Date().getTime() / 1000 + ") AS "
+ KeyRings.IS_EXPIRED);
"(" + Tables.KEYS + "." + Keys.EXPIRY + " IS NOT NULL AND " + Tables.KEYS + "." + Keys.EXPIRY
+ " < " + new Date().getTime() / 1000 + ") AS " + KeyRings.IS_EXPIRED);
qb.setProjectionMap(projectionMap);
// Need this as list so we can search in it