diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-05-29 11:41:02 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-05-29 11:41:02 +0200 |
commit | e174b8af3b4aaacf11a161de5ad78cf4bc6518f7 (patch) | |
tree | d4c7460e0e3f788f3adb7dd45c87b76778a96149 | |
parent | 25d0325c5f9f0afde59a7cb355a759b42602d978 (diff) | |
parent | 0bbd23538065ae6531e56194ff7bd4641879b674 (diff) | |
download | open-keychain-e174b8af3b4aaacf11a161de5ad78cf4bc6518f7.tar.gz open-keychain-e174b8af3b4aaacf11a161de5ad78cf4bc6518f7.tar.bz2 open-keychain-e174b8af3b4aaacf11a161de5ad78cf4bc6518f7.zip |
Merge remote-tracking branch 'origin/master' into development
2 files changed, 19 insertions, 7 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java index ff661e494..8253801d9 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/KeychainDatabase.java @@ -53,7 +53,7 @@ import java.io.IOException; */ public class KeychainDatabase extends SQLiteOpenHelper { private static final String DATABASE_NAME = "openkeychain.db"; - private static final int DATABASE_VERSION = 9; + private static final int DATABASE_VERSION = 10; static Boolean apgHack = false; private Context mContext; @@ -272,6 +272,8 @@ public class KeychainDatabase extends SQLiteOpenHelper { db.execSQL("DROP TABLE IF EXISTS user_ids"); db.execSQL(CREATE_USER_PACKETS); db.execSQL(CREATE_CERTS); + case 10: + // do nothing here, just consolidate } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/input/RequiredInputParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/input/RequiredInputParcel.java index ca6412445..930c2ee4f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/input/RequiredInputParcel.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/input/RequiredInputParcel.java @@ -22,8 +22,8 @@ public class RequiredInputParcel implements Parcelable { public final byte[][] mInputHashes; public final int[] mSignAlgos; - private long mMasterKeyId; - private long mSubKeyId; + private Long mMasterKeyId; + private Long mSubKeyId; private RequiredInputParcel(RequiredInputType type, byte[][] inputHashes, int[] signAlgos, Date signatureTime, Long masterKeyId, Long subKeyId) { @@ -61,8 +61,8 @@ public class RequiredInputParcel implements Parcelable { } mSignatureTime = source.readInt() != 0 ? new Date(source.readLong()) : null; - mMasterKeyId = source.readLong(); - mSubKeyId = source.readLong(); + mMasterKeyId = source.readInt() != 0 ? source.readLong() : null; + mSubKeyId = source.readInt() != 0 ? source.readLong() : null; } @@ -137,8 +137,18 @@ public class RequiredInputParcel implements Parcelable { } else { dest.writeInt(0); } - dest.writeLong(mMasterKeyId); - dest.writeLong(mSubKeyId); + if (mMasterKeyId != null) { + dest.writeInt(1); + dest.writeLong(mMasterKeyId); + } else { + dest.writeInt(0); + } + if (mSubKeyId != null) { + dest.writeInt(1); + dest.writeLong(mSubKeyId); + } else { + dest.writeInt(0); + } } |