Projects >> apg >>34a7728cec5c17ef25f3d5cd56421e4f5258862d

Chunk
Conflicting content
                        mProviderHelper.getAllKeyIdsForApp(
            }

            String action = data.getAction();
<<<<<<< HEAD
            if (OpenPgpApi.ACTION_CLEARTEXT_SIGN.equals(action)) {
                return signImpl(data, input, output, accSettings, true);
            } else if (OpenPgpApi.ACTION_SIGN.equals(action)) {
                // DEPRECATED: same as ACTION_CLEARTEXT_SIGN
                return signImpl(data, input, output, accSettings, true);
            } else if (OpenPgpApi.ACTION_DETACHED_SIGN.equals(action)) {
                return signImpl(data, input, output, accSettings, false);
            } else if (OpenPgpApi.ACTION_ENCRYPT.equals(action)) {
                return encryptAndSignImpl(data, input, output, accSettings, false);
            } else if (OpenPgpApi.ACTION_SIGN_AND_ENCRYPT.equals(action)) {
                return encryptAndSignImpl(data, input, output, accSettings, true);
            } else if (OpenPgpApi.ACTION_DECRYPT_VERIFY.equals(action)) {
                String currentPkg = getCurrentCallingPackage();
                Set allowedKeyIds =
                                ApiAccounts.buildBaseUri(currentPkg));
                return decryptAndVerifyImpl(data, input, output, allowedKeyIds, false);
            } else if (OpenPgpApi.ACTION_DECRYPT_METADATA.equals(action)) {
                String currentPkg = getCurrentCallingPackage();
                Set allowedKeyIds =
                        mProviderHelper.getAllKeyIdsForApp(
                                ApiAccounts.buildBaseUri(currentPkg));
                return decryptAndVerifyImpl(data, input, output, allowedKeyIds, true);
            } else if (OpenPgpApi.ACTION_GET_KEY.equals(action)) {
                return getKeyImpl(data);
            } else if (OpenPgpApi.ACTION_GET_KEY_IDS.equals(action)) {
                return getKeyIdsImpl(data);
            } else {
                return null;
=======
            switch (action) {
                case OpenPgpApi.ACTION_SIGN:
                    return signImpl(data, input, output, accSettings);
                case OpenPgpApi.ACTION_ENCRYPT:
                    return encryptAndSignImpl(data, input, output, accSettings, false);
                case OpenPgpApi.ACTION_SIGN_AND_ENCRYPT:
                    return encryptAndSignImpl(data, input, output, accSettings, true);
                case OpenPgpApi.ACTION_DECRYPT_VERIFY: {
                    String currentPkg = getCurrentCallingPackage();
                    Set allowedKeyIds =
                            mProviderHelper.getAllKeyIdsForApp(
                                    ApiAccounts.buildBaseUri(currentPkg));
                    return decryptAndVerifyImpl(data, input, output, allowedKeyIds, false);
                }
                case OpenPgpApi.ACTION_DECRYPT_METADATA: {
                    String currentPkg = getCurrentCallingPackage();
                    Set allowedKeyIds =
                            mProviderHelper.getAllKeyIdsForApp(
                                    ApiAccounts.buildBaseUri(currentPkg));
                    return decryptAndVerifyImpl(data, input, output, allowedKeyIds, true);
                }
                case OpenPgpApi.ACTION_GET_KEY:
                    return getKeyImpl(data);
                case OpenPgpApi.ACTION_GET_KEY_IDS:
                    return getKeyIdsImpl(data);
                default:
                    return null;
>>>>>>> e049895b9f8f5f9996ac678acf6810768e859695
            }
        }
Solution content
            }

            String action = data.getAction();
            if (OpenPgpApi.ACTION_CLEARTEXT_SIGN.equals(action)) {
                return signImpl(data, input, output, accSettings, true);
            } else if (OpenPgpApi.ACTION_SIGN.equals(action)) {
                // DEPRECATED: same as ACTION_CLEARTEXT_SIGN
                return signImpl(data, input, output, accSettings, true);
            } else if (OpenPgpApi.ACTION_DETACHED_SIGN.equals(action)) {
                return signImpl(data, input, output, accSettings, false);
            } else if (OpenPgpApi.ACTION_ENCRYPT.equals(action)) {
                return encryptAndSignImpl(data, input, output, accSettings, false);
            } else if (OpenPgpApi.ACTION_SIGN_AND_ENCRYPT.equals(action)) {
                return encryptAndSignImpl(data, input, output, accSettings, true);
            } else if (OpenPgpApi.ACTION_DECRYPT_VERIFY.equals(action)) {
                String currentPkg = getCurrentCallingPackage();
                Set allowedKeyIds =
                        mProviderHelper.getAllKeyIdsForApp(
                                ApiAccounts.buildBaseUri(currentPkg));
                return decryptAndVerifyImpl(data, input, output, allowedKeyIds, false);
            } else if (OpenPgpApi.ACTION_DECRYPT_METADATA.equals(action)) {
                String currentPkg = getCurrentCallingPackage();
                Set allowedKeyIds =
                        mProviderHelper.getAllKeyIdsForApp(
                                ApiAccounts.buildBaseUri(currentPkg));
                return decryptAndVerifyImpl(data, input, output, allowedKeyIds, true);
            } else if (OpenPgpApi.ACTION_GET_KEY.equals(action)) {
                return getKeyImpl(data);
            } else if (OpenPgpApi.ACTION_GET_KEY_IDS.equals(action)) {
                return getKeyIdsImpl(data);
            } else {
                return null;
            }
        }
File
OpenPgpService.java
Developer's decision
Version 1
Kind of conflict
Case statement
Comment
If statement
Method invocation
Return statement
Switch statement
Variable
Chunk
Conflicting content
import org.sufficientlysecure.keychain.operations.results.DeleteResult;
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
import org.sufficientlysecure.keychain.operations.results.ExportResult;
<<<<<<< HEAD
=======
import org.sufficientlysecure.keychain.operations.results.PromoteKeyResult;
>>>>>>> e049895b9f8f5f9996ac678acf6810768e859695
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
import org.sufficientlysecure.keychain.operations.results.CertifyResult;
import org.sufficientlysecure.keychain.util.FileHelper;
Solution content
import org.sufficientlysecure.keychain.operations.results.DeleteResult;
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
import org.sufficientlysecure.keychain.operations.results.ExportResult;
import org.sufficientlysecure.keychain.operations.results.PromoteKeyResult;
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
import org.sufficientlysecure.keychain.operations.results.CertifyResult;
import org.sufficientlysecure.keychain.util.FileHelper;
File
KeychainIntentService.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
                    byte[] nfcHash = data.getByteArray(ENCRYPT_SIGNATURE_NFC_HASH);
                    Date nfcTimestamp = (Date) data.getSerializable(ENCRYPT_SIGNATURE_NFC_TIMESTAMP);

<<<<<<< HEAD
                    // this assumes that the bytes are cleartext (valid for current implementation!)
                    if (source == IO_BYTES) {
                        builder.setCleartextSignature(true);
                    }
=======
                    String symmetricPassphrase = data.getString(ENCRYPT_SYMMETRIC_PASSPHRASE);
>>>>>>> e049895b9f8f5f9996ac678acf6810768e859695

                    boolean useAsciiArmor = data.getBoolean(ENCRYPT_USE_ASCII_ARMOR);
                    long encryptionKeyIds[] = data.getLongArray(ENCRYPT_ENCRYPTION_KEYS_IDS);
Solution content
                    byte[] nfcHash = data.getByteArray(ENCRYPT_SIGNATURE_NFC_HASH);
                    Date nfcTimestamp = (Date) data.getSerializable(ENCRYPT_SIGNATURE_NFC_TIMESTAMP);

                    String symmetricPassphrase = data.getString(ENCRYPT_SYMMETRIC_PASSPHRASE);

                    boolean useAsciiArmor = data.getBoolean(ENCRYPT_USE_ASCII_ARMOR);
                    long encryptionKeyIds[] = data.getLongArray(ENCRYPT_ENCRYPTION_KEYS_IDS);
File
KeychainIntentService.java
Developer's decision
Version 2
Kind of conflict
Comment
If statement