Prevent crash

This commit is contained in:
M66B 2019-12-06 12:47:06 +01:00
parent 4bd83818d3
commit fbc298f85a
1 changed files with 12 additions and 8 deletions

View File

@ -211,14 +211,18 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
Helper.authenticate(getActivity(), biometrics, new Runnable() {
@Override
public void run() {
boolean pro = ActivityBilling.isPro(getContext());
if (pro) {
prefs.edit().putBoolean("biometrics", !biometrics).apply();
btnBiometrics.setText(biometrics
? R.string.title_setup_biometrics_disable
: R.string.title_setup_biometrics_enable);
} else
startActivity(new Intent(getContext(), ActivityBilling.class));
try {
boolean pro = ActivityBilling.isPro(getContext());
if (pro) {
prefs.edit().putBoolean("biometrics", !biometrics).apply();
btnBiometrics.setText(biometrics
? R.string.title_setup_biometrics_disable
: R.string.title_setup_biometrics_enable);
} else
startActivity(new Intent(getContext(), ActivityBilling.class));
} catch (Throwable ex) {
Log.w(ex);
}
}
}, new Runnable() {
@Override