From 4aa6e37ac6a57a9afcaa8deab9b45d886ec76979 Mon Sep 17 00:00:00 2001 From: ligi Date: Thu, 29 Jan 2015 20:28:58 +0100 Subject: [PATCH 1/2] Use latest buildTools --- OpenKeychain/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle index 3bcfdda5e..eca62026a 100644 --- a/OpenKeychain/build.gradle +++ b/OpenKeychain/build.gradle @@ -32,7 +32,7 @@ dependencies { android { compileSdkVersion 21 - buildToolsVersion '21.1.1' + buildToolsVersion '21.1.2' defaultConfig { minSdkVersion 15 From fcd91d881eda698e69ca00ed6cdedc1e0a9d2394 Mon Sep 17 00:00:00 2001 From: ligi Date: Thu, 29 Jan 2015 20:30:26 +0100 Subject: [PATCH 2/2] Add explicit casting to be able to compile with java8 --- .../sufficientlysecure/keychain/provider/KeychainProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java index 72475472e..1fc14e59f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainProvider.java @@ -683,7 +683,7 @@ public class KeychainProvider extends ContentProvider { )) { throw new AssertionError("Incorrect type for user packet! This is a bug!"); } - if (values.get(UserPacketsColumns.RANK) == 0 && values.get(UserPacketsColumns.USER_ID) == null) { + if (((Number)values.get(UserPacketsColumns.RANK)).intValue() == 0 && values.get(UserPacketsColumns.USER_ID) == null) { throw new AssertionError("Rank 0 user packet must be a user id!"); } db.insertOrThrow(Tables.USER_PACKETS, null, values);