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() { Helper.authenticate(getActivity(), biometrics, new Runnable() {
@Override @Override
public void run() { public void run() {
boolean pro = ActivityBilling.isPro(getContext()); try {
if (pro) { boolean pro = ActivityBilling.isPro(getContext());
prefs.edit().putBoolean("biometrics", !biometrics).apply(); if (pro) {
btnBiometrics.setText(biometrics prefs.edit().putBoolean("biometrics", !biometrics).apply();
? R.string.title_setup_biometrics_disable btnBiometrics.setText(biometrics
: R.string.title_setup_biometrics_enable); ? R.string.title_setup_biometrics_disable
} else : R.string.title_setup_biometrics_enable);
startActivity(new Intent(getContext(), ActivityBilling.class)); } else
startActivity(new Intent(getContext(), ActivityBilling.class));
} catch (Throwable ex) {
Log.w(ex);
}
} }
}, new Runnable() { }, new Runnable() {
@Override @Override