diff --git a/app/build.gradle b/app/build.gradle index 6ef2246..37862aa 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.m2049r.xmrwallet" minSdkVersion 21 targetSdkVersion 25 - versionCode 44 - versionName "1.2.3" + versionCode 45 + versionName "1.2.4" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { diff --git a/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java b/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java index 80b5ed0..657d704 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java +++ b/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java @@ -48,8 +48,8 @@ import android.widget.TextView; import android.widget.Toast; import com.m2049r.xmrwallet.dialog.AboutFragment; -import com.m2049r.xmrwallet.dialog.HelpFragment; import com.m2049r.xmrwallet.dialog.DonationFragment; +import com.m2049r.xmrwallet.dialog.HelpFragment; import com.m2049r.xmrwallet.dialog.PrivacyFragment; import com.m2049r.xmrwallet.layout.Toolbar; import com.m2049r.xmrwallet.model.Wallet; @@ -1145,7 +1145,11 @@ public class LoginActivity extends AppCompatActivity } } - private class AsyncOpenWallet extends AsyncTask { + private class AsyncOpenWallet extends AsyncTask { + final static int OK = 0; + final static int TIMEOUT = 1; + final static int INVALID = 2; + final static int IOEX = 3; WalletNode walletNode; @@ -1156,45 +1160,57 @@ public class LoginActivity extends AppCompatActivity } @Override - protected Boolean doInBackground(WalletNode... params) { - if (params.length != 1) return false; + protected Integer doInBackground(WalletNode... params) { + if (params.length != 1) return INVALID; this.walletNode = params[0]; - if (!walletNode.isValid()) return false; + if (!walletNode.isValid()) return INVALID; Log.d(TAG, "checking " + walletNode.getAddress()); - long timeDA = new Date().getTime(); - SocketAddress address = new InetSocketAddress(walletNode.host, walletNode.port); - long timeDB = new Date().getTime(); - Log.d(TAG, "Resolving " + walletNode.host + " took " + (timeDB - timeDA) + "ms."); - Socket socket = new Socket(); - long timeA = new Date().getTime(); try { + long timeDA = new Date().getTime(); + SocketAddress address = new InetSocketAddress(walletNode.host, walletNode.port); + long timeDB = new Date().getTime(); + Log.d(TAG, "Resolving " + walletNode.host + " took " + (timeDB - timeDA) + "ms."); + Socket socket = new Socket(); + long timeA = new Date().getTime(); socket.connect(address, LoginActivity.DAEMON_TIMEOUT); socket.close(); + long timeB = new Date().getTime(); + long time = timeB - timeA; + Log.d(TAG, "Daemon " + walletNode.host + " is " + time + "ms away."); + return (time < LoginActivity.DAEMON_TIMEOUT ? OK : TIMEOUT); } catch (IOException ex) { Log.d(TAG, "Cannot reach daemon " + walletNode.host + "/" + walletNode.port + " because " + ex.getMessage()); - return false; + return IOEX; + } catch (IllegalArgumentException ex) { + Log.d(TAG, "Cannot reach daemon " + walletNode.host + "/" + walletNode.port + " because " + ex.getMessage()); + return INVALID; } - long timeB = new Date().getTime(); - long time = timeB - timeA; - Log.d(TAG, "Daemon " + walletNode.host + " is " + time + "ms away."); - return time < LoginActivity.DAEMON_TIMEOUT; } @Override - protected void onPostExecute(Boolean result) { + protected void onPostExecute(Integer result) { super.onPostExecute(result); if (isDestroyed()) { return; } dismissProgressDialog(); - if (result) { - Log.d(TAG, "selected wallet is ." + walletNode.name + "."); - // now it's getting real, check if wallet exists - promptAndStart(walletNode); - } else { - Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_connect_timeout), Toast.LENGTH_LONG).show(); + switch (result) { + case OK: + Log.d(TAG, "selected wallet is ." + walletNode.name + "."); + // now it's getting real, check if wallet exists + promptAndStart(walletNode); + break; + case TIMEOUT: + Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_connect_timeout), Toast.LENGTH_LONG).show(); + break; + case INVALID: + Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_node_invalid), Toast.LENGTH_LONG).show(); + break; + case IOEX: + Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_connect_ioex), Toast.LENGTH_LONG).show(); + break; } } } diff --git a/app/src/main/java/com/m2049r/xmrwallet/layout/WalletInfoAdapter.java b/app/src/main/java/com/m2049r/xmrwallet/layout/WalletInfoAdapter.java index 1ac2c93..5c5b357 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/layout/WalletInfoAdapter.java +++ b/app/src/main/java/com/m2049r/xmrwallet/layout/WalletInfoAdapter.java @@ -103,6 +103,7 @@ public class WalletInfoAdapter extends RecyclerView.Adapter - - - - \ No newline at end of file diff --git a/app/src/main/res/values/about.xml b/app/src/main/res/values/about.xml index c0b8720..d174657 100644 --- a/app/src/main/res/values/about.xml +++ b/app/src/main/res/values/about.xml @@ -14,10 +14,10 @@ Credits
- m2049r, baltsar777, rehrar, anhdres, - keejef, TheMonera, EarlOfEgo + m2049r, baltsar777, anhdres, keejef, + rehrar, EarlOfEgo et al.

- www.xmrujo.com + monerujo.io ]]>
Changes to this Privacy Policy

We may update this privacy policy from time to time. We will notify you of any changes by posting the new privacy policy in the app and on the - website (www.xmrujo.com) + website (www.monerujo.io) You are advised to review this privacy policy periodically for any changes. -

This Privacy Policy was last updated: 2nd November, 2017. +

This Privacy Policy was last updated: 10th November, 2017.

Contact Us

If you have any questions about our privacy policy, or how your data is being collected and processed, - please e-mail privacy@xmrujo.com. + please e-mail privacy@monerujo.io.

]]>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 009969d..ee31422 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -14,7 +14,7 @@ #FFFF6105 #cc5100 - #e2e2e2 + #ffffff #000000 #FD9B9B9B diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c031e1b..9858e78 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -45,8 +45,11 @@ Wallet saved Wallet save failed! Connecting … - Daemon connection failed!\nCheck username/password - Daemon connection timed out!\nTry again or another! + Node connection failed!\nCheck username/password + Node connection timed out!\nTry again or another. + Node invalid!\nTry another. + Cannot reach node!\nTry again or another. + Working on it … Disconnected diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 52e4a8b..2ff4f66 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -179,7 +179,7 @@ @@ -194,16 +194,13 @@