mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Fixed coding style.
This commit is contained in:
parent
fc0c084a62
commit
e76fc97dd6
@ -161,8 +161,9 @@ public class CreateKeyDialogFragment extends DialogFragment {
|
|||||||
final AdapterView.OnItemSelectedListener weakRsaListener = new AdapterView.OnItemSelectedListener() {
|
final AdapterView.OnItemSelectedListener weakRsaListener = new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
if (mKeySizeSpinner == parent)
|
if (mKeySizeSpinner == parent) {
|
||||||
customKeySelectedLisener.onItemSelected(parent, view, position, id);
|
customKeySelectedLisener.onItemSelected(parent, view, position, id);
|
||||||
|
}
|
||||||
setOkButtonAvailability(alertDialog);
|
setOkButtonAvailability(alertDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,15 +234,17 @@ public class CreateKeyDialogFragment extends DialogFragment {
|
|||||||
break;
|
break;
|
||||||
case Id.choice.algorithm.elgamal:
|
case Id.choice.algorithm.elgamal:
|
||||||
int[] elGammalKeyDiff = new int[elGamalSupportedLengths.length];
|
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);
|
elGammalKeyDiff[i] = Math.abs(elGamalSupportedLengths[i] - currentKeyLength);
|
||||||
|
}
|
||||||
int minimalValue = Integer.MAX_VALUE;
|
int minimalValue = Integer.MAX_VALUE;
|
||||||
int minimalIndex = -1;
|
int minimalIndex = -1;
|
||||||
for (int i = 0; i < elGammalKeyDiff.length; i++)
|
for (int i = 0; i < elGammalKeyDiff.length; i++) {
|
||||||
if (elGammalKeyDiff[i] <= minimalValue) {
|
if (elGammalKeyDiff[i] <= minimalValue) {
|
||||||
minimalValue = elGammalKeyDiff[i];
|
minimalValue = elGammalKeyDiff[i];
|
||||||
minimalIndex = i;
|
minimalIndex = i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
properKeyLength = elGamalSupportedLengths[minimalIndex];
|
properKeyLength = elGamalSupportedLengths[minimalIndex];
|
||||||
break;
|
break;
|
||||||
case Id.choice.algorithm.dsa:
|
case Id.choice.algorithm.dsa:
|
||||||
|
Loading…
Reference in New Issue
Block a user