1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-30 19:56:10 +00:00

Fixed checking for biometric authentication

This commit is contained in:
M66B 2019-10-15 15:11:56 +02:00
parent d1b4a09ba0
commit 77b2a8e792

View file

@ -105,12 +105,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
prefs.registerOnSharedPreferenceChangeListener(this);
if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this)) {
finish();
startActivity(
new Intent(this, ActivityMain.class)
.putExtra("intent", intent));
}
checkAuthentication();
super.onCreate(savedInstanceState);
}
@ -141,7 +136,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
Log.i("Contacts permission=" + contacts);
finish();
startActivity(getIntent());
}
} else
checkAuthentication();
super.onResume();
}
@ -208,6 +204,16 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
super.onActivityResult(requestCode, resultCode, data);
}
private void checkAuthentication() {
if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this)) {
Intent intent = getIntent();
finish();
startActivity(
new Intent(this, ActivityMain.class)
.putExtra("intent", intent));
}
}
@Override
public void startActivity(Intent intent) {
try {