2
0

Refactor code.

This commit is contained in:
Maarten Billemont
2018-05-16 00:16:06 -04:00
parent 0aa7baf59e
commit 1b703515dd
15 changed files with 89 additions and 88 deletions

View File

@@ -306,8 +306,8 @@ public class EmergencyActivity extends Activity {
@Override
public void run() {
try {
sitePassword = masterKey.siteResult( siteName, version.getAlgorithm(), counter, MPKeyPurpose.Authentication, null, type, null
);
sitePassword = masterKey.siteResult( siteName, version.getAlgorithm(), counter,
MPKeyPurpose.Authentication, null, type, null );
runOnUiThread( new Runnable() {
@Override

View File

@@ -148,7 +148,8 @@ public final class Preferences {
@Nonnull
public MPResultType getDefaultResultType() {
return MPResultType.values()[prefs().getInt( PREF_RESULT_TYPE, getDefaultVersion().getAlgorithm().mpw_default_result_type().ordinal() )];
return MPResultType.values()[
prefs().getInt( PREF_RESULT_TYPE, getDefaultVersion().getAlgorithm().mpw_default_result_type().ordinal() )];
}
public boolean setDefaultVersion(final MPAlgorithm.Version value) {
@@ -161,6 +162,7 @@ public final class Preferences {
@Nonnull
public MPAlgorithm.Version getDefaultVersion() {
return MPAlgorithm.Version.values()[prefs().getInt( PREF_ALGORITHM_VERSION, MPAlgorithm.Version.CURRENT.ordinal() )];
return MPAlgorithm.Version.values()[
prefs().getInt( PREF_ALGORITHM_VERSION, MPAlgorithm.Version.CURRENT.ordinal() )];
}
}