diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-13 10:03:26 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-13 10:03:26 +0200 |
commit | 86c84ddbb34c44f127a0f1d4a6031d02e1b76779 (patch) | |
tree | 5d5f82db5ac4a30cbb3c11573048e7ac3083b336 | |
parent | 473dd75f4f91df915d5b7c62d536c1b0261b6cfb (diff) | |
download | open-keychain-86c84ddbb34c44f127a0f1d4a6031d02e1b76779.tar.gz open-keychain-86c84ddbb34c44f127a0f1d4a6031d02e1b76779.tar.bz2 open-keychain-86c84ddbb34c44f127a0f1d4a6031d02e1b76779.zip |
remove unnecessary boolean from SignatureResult
3 files changed, 10 insertions, 24 deletions
diff --git a/OpenPGP-Keychain-API-Demo/src/org/openintents/openpgp/OpenPgpSignatureResult.java b/OpenPGP-Keychain-API-Demo/src/org/openintents/openpgp/OpenPgpSignatureResult.java index d8642664f..d0712df1c 100644 --- a/OpenPGP-Keychain-API-Demo/src/org/openintents/openpgp/OpenPgpSignatureResult.java +++ b/OpenPGP-Keychain-API-Demo/src/org/openintents/openpgp/OpenPgpSignatureResult.java @@ -20,9 +20,8 @@ import android.os.Parcel; import android.os.Parcelable; public class OpenPgpSignatureResult implements Parcelable { - String signatureUserId; - boolean signature; + String signatureUserId; boolean signatureSuccess; boolean signatureUnknown; @@ -30,19 +29,15 @@ public class OpenPgpSignatureResult implements Parcelable { } - public OpenPgpSignatureResult(String signatureUserId, boolean signature, - boolean signatureSuccess, boolean signatureUnknown) { + public OpenPgpSignatureResult(String signatureUserId, boolean signatureSuccess, + boolean signatureUnknown) { this.signatureUserId = signatureUserId; - - this.signature = signature; this.signatureSuccess = signatureSuccess; this.signatureUnknown = signatureUnknown; } public OpenPgpSignatureResult(OpenPgpSignatureResult b) { this.signatureUserId = b.signatureUserId; - - this.signature = b.signature; this.signatureSuccess = b.signatureSuccess; this.signatureUnknown = b.signatureUnknown; } @@ -54,7 +49,6 @@ public class OpenPgpSignatureResult implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeString(signatureUserId); - dest.writeByte((byte) (signature ? 1 : 0)); dest.writeByte((byte) (signatureSuccess ? 1 : 0)); dest.writeByte((byte) (signatureUnknown ? 1 : 0)); } @@ -63,7 +57,6 @@ public class OpenPgpSignatureResult implements Parcelable { public OpenPgpSignatureResult createFromParcel(final Parcel source) { OpenPgpSignatureResult vr = new OpenPgpSignatureResult(); vr.signatureUserId = source.readString(); - vr.signature = source.readByte() == 1; vr.signatureSuccess = source.readByte() == 1; vr.signatureUnknown = source.readByte() == 1; return vr; @@ -77,7 +70,7 @@ public class OpenPgpSignatureResult implements Parcelable { @Override public String toString() { String out = new String(); - out += "signature: " + signature; + out += "signatureUserId: " + signatureUserId; out += "\nsignatureSuccess: " + signatureSuccess; out += "\nsignatureUnknown: " + signatureUnknown; return out; diff --git a/OpenPGP-Keychain/src/org/openintents/openpgp/OpenPgpSignatureResult.java b/OpenPGP-Keychain/src/org/openintents/openpgp/OpenPgpSignatureResult.java index d8642664f..d0712df1c 100644 --- a/OpenPGP-Keychain/src/org/openintents/openpgp/OpenPgpSignatureResult.java +++ b/OpenPGP-Keychain/src/org/openintents/openpgp/OpenPgpSignatureResult.java @@ -20,9 +20,8 @@ import android.os.Parcel; import android.os.Parcelable; public class OpenPgpSignatureResult implements Parcelable { - String signatureUserId; - boolean signature; + String signatureUserId; boolean signatureSuccess; boolean signatureUnknown; @@ -30,19 +29,15 @@ public class OpenPgpSignatureResult implements Parcelable { } - public OpenPgpSignatureResult(String signatureUserId, boolean signature, - boolean signatureSuccess, boolean signatureUnknown) { + public OpenPgpSignatureResult(String signatureUserId, boolean signatureSuccess, + boolean signatureUnknown) { this.signatureUserId = signatureUserId; - - this.signature = signature; this.signatureSuccess = signatureSuccess; this.signatureUnknown = signatureUnknown; } public OpenPgpSignatureResult(OpenPgpSignatureResult b) { this.signatureUserId = b.signatureUserId; - - this.signature = b.signature; this.signatureSuccess = b.signatureSuccess; this.signatureUnknown = b.signatureUnknown; } @@ -54,7 +49,6 @@ public class OpenPgpSignatureResult implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeString(signatureUserId); - dest.writeByte((byte) (signature ? 1 : 0)); dest.writeByte((byte) (signatureSuccess ? 1 : 0)); dest.writeByte((byte) (signatureUnknown ? 1 : 0)); } @@ -63,7 +57,6 @@ public class OpenPgpSignatureResult implements Parcelable { public OpenPgpSignatureResult createFromParcel(final Parcel source) { OpenPgpSignatureResult vr = new OpenPgpSignatureResult(); vr.signatureUserId = source.readString(); - vr.signature = source.readByte() == 1; vr.signatureSuccess = source.readByte() == 1; vr.signatureUnknown = source.readByte() == 1; return vr; @@ -77,7 +70,7 @@ public class OpenPgpSignatureResult implements Parcelable { @Override public String toString() { String out = new String(); - out += "signature: " + signature; + out += "signatureUserId: " + signatureUserId; out += "\nsignatureSuccess: " + signatureSuccess; out += "\nsignatureUnknown: " + signatureUnknown; return out; diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/remote_api/OpenPgpService.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/remote_api/OpenPgpService.java index 0a640560a..7a44825bf 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/remote_api/OpenPgpService.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/remote_api/OpenPgpService.java @@ -472,8 +472,8 @@ public class OpenPgpService extends Service { OpenPgpSignatureResult sigResult = null; if (signature) { - sigResult = new OpenPgpSignatureResult(signatureUserId, signature, - signatureSuccess, signatureUnknown); + sigResult = new OpenPgpSignatureResult(signatureUserId, signatureSuccess, + signatureUnknown); } // return over handler on client side |