Reformat to code style.
This commit is contained in:
		@@ -36,11 +36,11 @@ android {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    compile             project( ':masterpassword-algorithm' )
 | 
			
		||||
    compile             project( ':masterpassword-tests' )
 | 
			
		||||
    compile project( ':masterpassword-algorithm' )
 | 
			
		||||
    compile project( ':masterpassword-tests' )
 | 
			
		||||
 | 
			
		||||
    compile             group: 'org.slf4j', name: 'slf4j-android', version:'1.7.13-underscore'
 | 
			
		||||
    compile             group: 'com.jakewharton', name: 'butterknife', version:'8.5.1'
 | 
			
		||||
    annotationProcessor group: 'com.jakewharton', name: 'butterknife-compiler', version:'8.5.1'
 | 
			
		||||
    compile             files( 'libs/scrypt-1.4.0-native.jar' )
 | 
			
		||||
    compile group: 'org.slf4j', name: 'slf4j-android', version: '1.7.13-underscore'
 | 
			
		||||
    compile group: 'com.jakewharton', name: 'butterknife', version: '8.5.1'
 | 
			
		||||
    annotationProcessor group: 'com.jakewharton', name: 'butterknife-compiler', version: '8.5.1'
 | 
			
		||||
    compile files( 'libs/scrypt-1.4.0-native.jar' )
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 | 
			
		||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 | 
			
		||||
    <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
 | 
			
		||||
    <!-- PROJECT METADATA -->
 | 
			
		||||
@@ -86,8 +87,10 @@
 | 
			
		||||
                                    <keypass>${env.PASSWORD}</keypass>
 | 
			
		||||
                                    <alias>masterpassword-android</alias>
 | 
			
		||||
                                    <arguments>
 | 
			
		||||
                                      <argument>-sigalg</argument><argument>MD5withRSA</argument>
 | 
			
		||||
                                      <argument>-digestalg</argument><argument>SHA1</argument>
 | 
			
		||||
                                        <argument>-sigalg</argument>
 | 
			
		||||
                                        <argument>MD5withRSA</argument>
 | 
			
		||||
                                        <argument>-digestalg</argument>
 | 
			
		||||
                                        <argument>SHA1</argument>
 | 
			
		||||
                                    </arguments>
 | 
			
		||||
                                </configuration>
 | 
			
		||||
                            </execution>
 | 
			
		||||
 
 | 
			
		||||
@@ -49,11 +49,13 @@ public class EmergencyActivity extends Activity {
 | 
			
		||||
    private static final Logger   logger                = Logger.get( EmergencyActivity.class );
 | 
			
		||||
    private static final ClipData EMPTY_CLIP            = new ClipData( new ClipDescription( "", new String[0] ), new ClipData.Item( "" ) );
 | 
			
		||||
    private static final int      PASSWORD_NOTIFICATION = 0;
 | 
			
		||||
    public static final int CLIPBOARD_CLEAR_DELAY = 20 /* s */ * MPConstant.MS_PER_S;
 | 
			
		||||
    public static final  int      CLIPBOARD_CLEAR_DELAY = 20 /* s */ * MPConstant.MS_PER_S;
 | 
			
		||||
 | 
			
		||||
    private final Preferences                        preferences    = Preferences.get( this );
 | 
			
		||||
    private final ListeningExecutorService           executor       = MoreExecutors.listeningDecorator( Executors.newSingleThreadExecutor() );
 | 
			
		||||
    private final ImmutableList<MPResultType>        allResultTypes = ImmutableList.copyOf( MPResultType.forClass( MPResultTypeClass.Template ) );
 | 
			
		||||
    private final ListeningExecutorService           executor       = MoreExecutors.listeningDecorator(
 | 
			
		||||
            Executors.newSingleThreadExecutor() );
 | 
			
		||||
    private final ImmutableList<MPResultType>        allResultTypes = ImmutableList.copyOf(
 | 
			
		||||
            MPResultType.forClass( MPResultTypeClass.Template ) );
 | 
			
		||||
    private final ImmutableList<MPMasterKey.Version> allVersions    = ImmutableList.copyOf( MPMasterKey.Version.values() );
 | 
			
		||||
 | 
			
		||||
    private MPMasterKey masterKey;
 | 
			
		||||
@@ -211,7 +213,7 @@ public class EmergencyActivity extends Activity {
 | 
			
		||||
    protected void onResume() {
 | 
			
		||||
        super.onResume();
 | 
			
		||||
 | 
			
		||||
// FIXME:       MasterKey.setAllowNativeByDefault( preferences.isAllowNativeKDF() );
 | 
			
		||||
        // FIXME:       MasterKey.setAllowNativeByDefault( preferences.isAllowNativeKDF() );
 | 
			
		||||
 | 
			
		||||
        fullNameField.setText( preferences.getFullName() );
 | 
			
		||||
        rememberFullNameField.setChecked( preferences.isRememberFullName() );
 | 
			
		||||
@@ -254,7 +256,7 @@ public class EmergencyActivity extends Activity {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private synchronized void updateMasterKey() {
 | 
			
		||||
        final String fullName = fullNameField.getText().toString();
 | 
			
		||||
        final String fullName       = fullNameField.getText().toString();
 | 
			
		||||
        final char[] masterPassword = masterPasswordField.getText().toString().toCharArray();
 | 
			
		||||
        if ((id_userName == fullName.hashCode())
 | 
			
		||||
            && (id_masterPassword == Arrays.hashCode( masterPassword )))
 | 
			
		||||
@@ -336,10 +338,10 @@ public class EmergencyActivity extends Activity {
 | 
			
		||||
        if (TextUtils.isEmpty( currentSitePassword ))
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        final ClipboardManager clipboardManager = (ClipboardManager) getSystemService( CLIPBOARD_SERVICE );
 | 
			
		||||
        final ClipboardManager    clipboardManager    = (ClipboardManager) getSystemService( CLIPBOARD_SERVICE );
 | 
			
		||||
        final NotificationManager notificationManager = (NotificationManager) getSystemService( Context.NOTIFICATION_SERVICE );
 | 
			
		||||
 | 
			
		||||
        String title = strf( "Password for %s", siteNameField.getText() );
 | 
			
		||||
        String          title       = strf( "Password for %s", siteNameField.getText() );
 | 
			
		||||
        ClipDescription description = new ClipDescription( title, new String[]{ ClipDescription.MIMETYPE_TEXT_PLAIN } );
 | 
			
		||||
        clipboardManager.setPrimaryClip( new ClipData( description, new ClipData.Item( currentSitePassword ) ) );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -33,7 +33,7 @@ public class MainThreadExecutor extends AbstractExecutorService {
 | 
			
		||||
 | 
			
		||||
    private final Handler       mHandler = new Handler( Looper.getMainLooper() );
 | 
			
		||||
    private final Set<Runnable> commands = Sets.newLinkedHashSet();
 | 
			
		||||
    private boolean shutdown;
 | 
			
		||||
    private       boolean       shutdown;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void execute(final Runnable command) {
 | 
			
		||||
 
 | 
			
		||||
@@ -32,15 +32,15 @@ import javax.annotation.Nullable;
 | 
			
		||||
 */
 | 
			
		||||
public final class Preferences {
 | 
			
		||||
 | 
			
		||||
    private static final String PREF_TESTS_PASSED       = "integrityTestsPassed";
 | 
			
		||||
    private static final String PREF_NATIVE_KDF         = "nativeKDF";
 | 
			
		||||
    private static final String PREF_REMEMBER_FULL_NAME = "rememberFullName";
 | 
			
		||||
    private static final String PREF_FORGET_PASSWORD    = "forgetPassword";
 | 
			
		||||
    private static final String PREF_MASK_PASSWORD      = "maskPassword";
 | 
			
		||||
    private static final String PREF_FULL_NAME          = "fullName";
 | 
			
		||||
    private static final String PREF_RESULT_TYPE        = "resultType";
 | 
			
		||||
    private static final String PREF_ALGORITHM_VERSION  = "algorithmVersion";
 | 
			
		||||
    private static Preferences instance;
 | 
			
		||||
    private static final String      PREF_TESTS_PASSED       = "integrityTestsPassed";
 | 
			
		||||
    private static final String      PREF_NATIVE_KDF         = "nativeKDF";
 | 
			
		||||
    private static final String      PREF_REMEMBER_FULL_NAME = "rememberFullName";
 | 
			
		||||
    private static final String      PREF_FORGET_PASSWORD    = "forgetPassword";
 | 
			
		||||
    private static final String      PREF_MASK_PASSWORD      = "maskPassword";
 | 
			
		||||
    private static final String      PREF_FULL_NAME          = "fullName";
 | 
			
		||||
    private static final String      PREF_RESULT_TYPE        = "resultType";
 | 
			
		||||
    private static final String      PREF_ALGORITHM_VERSION  = "algorithmVersion";
 | 
			
		||||
    private static       Preferences instance;
 | 
			
		||||
 | 
			
		||||
    private Context           context;
 | 
			
		||||
    @Nullable
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user