diff options
author | gogowitczak <gogowitczak@gmail.com> | 2014-04-08 00:59:59 +0200 |
---|---|---|
committer | gogowitczak <gogowitczak@gmail.com> | 2014-04-08 00:59:59 +0200 |
commit | e76fc97dd6b137b50f2df9615f857abe378a3965 (patch) | |
tree | 97a3ba4de869f2202f73457ea398083cc03473a7 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java | |
parent | fc0c084a621eb67e07cc4c4d65ecc9f841b78cc9 (diff) | |
download | open-keychain-e76fc97dd6b137b50f2df9615f857abe378a3965.tar.gz open-keychain-e76fc97dd6b137b50f2df9615f857abe378a3965.tar.bz2 open-keychain-e76fc97dd6b137b50f2df9615f857abe378a3965.zip |
Fixed coding style.
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java index 2b8e19f86..78223379b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CreateKeyDialogFragment.java @@ -161,8 +161,9 @@ public class CreateKeyDialogFragment extends DialogFragment { final AdapterView.OnItemSelectedListener weakRsaListener = new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { - if (mKeySizeSpinner == parent) + if (mKeySizeSpinner == parent) { customKeySelectedLisener.onItemSelected(parent, view, position, id); + } setOkButtonAvailability(alertDialog); } @@ -233,15 +234,17 @@ public class CreateKeyDialogFragment extends DialogFragment { break; case Id.choice.algorithm.elgamal: int[] elGammalKeyDiff = new int[elGamalSupportedLengths.length]; - for (int i = 0; i < elGamalSupportedLengths.length; i++) + for (int i = 0; i < elGamalSupportedLengths.length; i++) { elGammalKeyDiff[i] = Math.abs(elGamalSupportedLengths[i] - currentKeyLength); + } int minimalValue = Integer.MAX_VALUE; int minimalIndex = -1; - for (int i = 0; i < elGammalKeyDiff.length; i++) + for (int i = 0; i < elGammalKeyDiff.length; i++) { if (elGammalKeyDiff[i] <= minimalValue) { minimalValue = elGammalKeyDiff[i]; minimalIndex = i; } + } properKeyLength = elGamalSupportedLengths[minimalIndex]; break; case Id.choice.algorithm.dsa: |