fix more unit tests (syntax)
This commit is contained in:
@@ -42,17 +42,14 @@ public class CertifyActionsParcel implements Parcelable {
|
||||
public CertifyLevel mLevel;
|
||||
|
||||
public ArrayList<CertifyAction> mCertifyActions = new ArrayList<>();
|
||||
public CryptoInputParcel mCryptoInput;
|
||||
|
||||
public CertifyActionsParcel(CryptoInputParcel cryptoInput, long masterKeyId) {
|
||||
public CertifyActionsParcel(long masterKeyId) {
|
||||
mMasterKeyId = masterKeyId;
|
||||
mCryptoInput = cryptoInput != null ? cryptoInput : new CryptoInputParcel(new Date());
|
||||
mLevel = CertifyLevel.DEFAULT;
|
||||
}
|
||||
|
||||
public CertifyActionsParcel(Parcel source) {
|
||||
mMasterKeyId = source.readLong();
|
||||
mCryptoInput = source.readParcelable(CertifyActionsParcel.class.getClassLoader());
|
||||
// just like parcelables, this is meant for ad-hoc IPC only and is NOT portable!
|
||||
mLevel = CertifyLevel.values()[source.readInt()];
|
||||
|
||||
@@ -66,16 +63,11 @@ public class CertifyActionsParcel implements Parcelable {
|
||||
@Override
|
||||
public void writeToParcel(Parcel destination, int flags) {
|
||||
destination.writeLong(mMasterKeyId);
|
||||
destination.writeParcelable(mCryptoInput, 0);
|
||||
destination.writeInt(mLevel.ordinal());
|
||||
|
||||
destination.writeSerializable(mCertifyActions);
|
||||
}
|
||||
|
||||
public Map<ByteBuffer, byte[]> getSignatureData() {
|
||||
return mCryptoInput.getCryptoData();
|
||||
}
|
||||
|
||||
public static final Creator<CertifyActionsParcel> CREATOR = new Creator<CertifyActionsParcel>() {
|
||||
public CertifyActionsParcel createFromParcel(final Parcel source) {
|
||||
return new CertifyActionsParcel(source);
|
||||
|
||||
@@ -254,11 +254,12 @@ public class KeychainIntentService extends IntentService implements Progressable
|
||||
|
||||
// Input
|
||||
CertifyActionsParcel parcel = data.getParcelable(CERTIFY_PARCEL);
|
||||
CryptoInputParcel cryptoInput = data.getParcelable(EXTRA_CRYPTO_INPUT);
|
||||
String keyServerUri = data.getString(UPLOAD_KEY_SERVER);
|
||||
|
||||
// Operation
|
||||
CertifyOperation op = new CertifyOperation(this, providerHelper, this, mActionCanceled);
|
||||
CertifyResult result = op.certify(parcel, keyServerUri);
|
||||
CertifyResult result = op.certify(parcel, cryptoInput, keyServerUri);
|
||||
|
||||
// Result
|
||||
sendMessageToHandler(MessageStatus.OKAY, result);
|
||||
|
||||
Reference in New Issue
Block a user