From c8322f5a8300019dc16d34c5408bbb2264ee21eb Mon Sep 17 00:00:00 2001 From: m2049r Date: Tue, 20 Nov 2018 19:55:15 +0100 Subject: [PATCH] fingerprint return from streetmode --- app/build.gradle | 4 +- .../com/m2049r/xmrwallet/WalletActivity.java | 38 +++++-------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a7c8d384..597434fe 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.m2049r.xmrwallet" minSdkVersion 21 targetSdkVersion 28 - versionCode 153 - versionName "1.10.3 'Node-O-matiC'" + versionCode 154 + versionName "1.10.4 'Node-O-matiC'" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { diff --git a/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java b/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java index 72bb05aa..cfb48161 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java +++ b/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java @@ -290,36 +290,18 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste } private void onDisableStreetMode() { - DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() { + Helper.promptPassword(WalletActivity.this, getWallet().getName(), false, new Helper.PasswordAction() { @Override - public void onClick(DialogInterface dialog, int which) { - switch (which) { - case DialogInterface.BUTTON_POSITIVE: - Helper.promptPassword(WalletActivity.this, getWallet().getName(), true, new Helper.PasswordAction() { - @Override - public void action(String walletName, String password, boolean fingerprintUsed) { - runOnUiThread(new Runnable() { - @Override - public void run() { - enableStreetMode(false); - updateStreetMode(); - } - }); - } - }); - break; - case DialogInterface.BUTTON_NEGATIVE: - // do nothing - break; - } + public void action(String walletName, String password, boolean fingerprintUsed) { + runOnUiThread(new Runnable() { + @Override + public void run() { + enableStreetMode(false); + updateStreetMode(); + } + }); } - }; - - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setMessage(getString(R.string.details_alert_message)) - .setPositiveButton(getString(R.string.details_alert_yes), dialogClickListener) - .setNegativeButton(getString(R.string.details_alert_no), dialogClickListener) - .show(); + }); }