force agree for fingerprint send (#682)

This commit is contained in:
m2049r 2020-09-21 14:36:17 +02:00 committed by GitHub
parent ff4f4a1c2c
commit fa0692ceab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import android.widget.LinearLayout;
import com.m2049r.xmrwallet.LoginActivity; import com.m2049r.xmrwallet.LoginActivity;
import com.m2049r.xmrwallet.R; import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.util.KeyStoreHelper;
public class OnBoardingActivity extends AppCompatActivity implements OnBoardingAdapter.Listener { public class OnBoardingActivity extends AppCompatActivity implements OnBoardingAdapter.Listener {
@ -75,6 +76,9 @@ public class OnBoardingActivity extends AppCompatActivity implements OnBoardingA
} }
}); });
// let old users who have fingerprint wallets already agree for fingerprint sending
OnBoardingScreen.FPSEND.setMustAgree(KeyStoreHelper.hasStoredPasswords(this));
for (int i = 0; i < OnBoardingScreen.values().length; i++) { for (int i = 0; i < OnBoardingScreen.values().length; i++) {
agreed[i] = !OnBoardingScreen.values()[i].isMustAgree(); agreed[i] = !OnBoardingScreen.values()[i].isMustAgree();
} }

View File

@ -28,7 +28,7 @@ enum OnBoardingScreen {
private final int title; private final int title;
private final int information; private final int information;
private final int drawable; private final int drawable;
private final boolean mustAgree; private boolean mustAgree;
OnBoardingScreen(final int title, final int information, final int drawable, final boolean mustAgree) { OnBoardingScreen(final int title, final int information, final int drawable, final boolean mustAgree) {
this.title = title; this.title = title;
@ -52,4 +52,8 @@ enum OnBoardingScreen {
public boolean isMustAgree() { public boolean isMustAgree() {
return mustAgree; return mustAgree;
} }
public boolean setMustAgree(boolean mustAgree) {
return this.mustAgree = mustAgree;
}
} }