mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 13:14:39 +00:00
Fixed checking for biometric authentication
This commit is contained in:
parent
d1b4a09ba0
commit
77b2a8e792
1 changed files with 13 additions and 7 deletions
|
@ -105,12 +105,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
|
|
||||||
prefs.registerOnSharedPreferenceChangeListener(this);
|
prefs.registerOnSharedPreferenceChangeListener(this);
|
||||||
|
|
||||||
if (!this.getClass().equals(ActivityMain.class) && Helper.shouldAuthenticate(this)) {
|
checkAuthentication();
|
||||||
finish();
|
|
||||||
startActivity(
|
|
||||||
new Intent(this, ActivityMain.class)
|
|
||||||
.putExtra("intent", intent));
|
|
||||||
}
|
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
@ -141,7 +136,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
Log.i("Contacts permission=" + contacts);
|
Log.i("Contacts permission=" + contacts);
|
||||||
finish();
|
finish();
|
||||||
startActivity(getIntent());
|
startActivity(getIntent());
|
||||||
}
|
} else
|
||||||
|
checkAuthentication();
|
||||||
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
@ -208,6 +204,16 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
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
|
@Override
|
||||||
public void startActivity(Intent intent) {
|
public void startActivity(Intent intent) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue