mirror of https://github.com/M66B/FairEmail.git
Fixed checking for biometric authentication
This commit is contained in:
parent
d1b4a09ba0
commit
77b2a8e792
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue