Switched Roboguice/Guice out for Dagger 2

This commit is contained in:
Ernir Erlingsson
2016-03-03 10:24:40 +01:00
parent e5d7038195
commit 1be400eb84
89 changed files with 1640 additions and 802 deletions

View File

@@ -34,7 +34,7 @@ import static android.view.View.VISIBLE;
public class PasswordActivity extends BaseActivity {
@Inject @CryptoExecutor private Executor cryptoExecutor;
@Inject @CryptoExecutor protected Executor cryptoExecutor;
private Button signInButton;
private ProgressBar progress;
private TextInputLayout input;
@@ -43,8 +43,8 @@ public class PasswordActivity extends BaseActivity {
private byte[] encrypted;
// Fields that are accessed from background threads must be volatile
@Inject private volatile CryptoComponent crypto;
@Inject private volatile DatabaseConfig databaseConfig;
@Inject protected volatile CryptoComponent crypto;
@Inject protected volatile DatabaseConfig databaseConfig;
@Override
public void onCreate(Bundle state) {
@@ -74,7 +74,8 @@ public class PasswordActivity extends BaseActivity {
password.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {}
int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before,
@@ -83,10 +84,16 @@ public class PasswordActivity extends BaseActivity {
}
@Override
public void afterTextChanged(Editable s) {}
public void afterTextChanged(Editable s) {
}
});
}
@Override
public void injectActivity(AndroidComponent component) {
component.inject(this);
}
@Override
public void onBackPressed() {
// Show the home screen rather than another password prompt