From 8057980f6cfdcb567ea406adb2203b54058199aa Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Sat, 22 Jul 2017 06:37:06 +0200 Subject: [PATCH] Minor bugfixes --- app/build.gradle | 8 ++++---- .../java/ch/dissem/apps/abit/ComposeMessageFragment.java | 4 ++++ .../java/ch/dissem/apps/abit/listener/WifiReceiver.java | 2 +- .../ch/dissem/apps/abit/synchronization/SyncAdapter.java | 3 ++- app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + build.gradle | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f8bc2f0..0944045 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,7 +20,6 @@ android { targetSdkVersion 25 versionCode 13 versionName "1.0-beta13" - jackOptions.enabled = false multiDexEnabled true } compileOptions { @@ -38,7 +37,7 @@ android { } //ext.jabitVersion = '2.0.4' -ext.jabitVersion = 'development-SNAPSHOT' +ext.jabitVersion = 'feature-exports-SNAPSHOT' ext.supportVersion = '25.3.1' dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) @@ -54,6 +53,7 @@ dependencies { compile "ch.dissem.jabit:jabit-cryptography-spongy:$jabitVersion" compile "ch.dissem.jabit:jabit-extensions:$jabitVersion" compile "ch.dissem.jabit:jabit-wif:$jabitVersion" + compile "ch.dissem.jabit:jabit-exports:$jabitVersion" compile 'org.slf4j:slf4j-android:1.7.25' @@ -71,7 +71,7 @@ dependencies { compile 'com.journeyapps:zxing-android-embedded:3.5.0@aar' compile 'com.google.zxing:core:3.3.0' - compile 'io.github.yavski:fab-speed-dial:1.0.6' + compile 'io.github.yavski:fab-speed-dial:1.0.7' compile 'com.github.amlcurran.showcaseview:library:5.4.3' compile('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.10.4@aar') { transitive = true @@ -80,7 +80,7 @@ dependencies { compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' - testCompile 'org.mockito:mockito-core:2.7.22' + testCompile 'org.mockito:mockito-core:2.8.9' } idea.module { diff --git a/app/src/main/java/ch/dissem/apps/abit/ComposeMessageFragment.java b/app/src/main/java/ch/dissem/apps/abit/ComposeMessageFragment.java index 13833c8..aeea76c 100644 --- a/app/src/main/java/ch/dissem/apps/abit/ComposeMessageFragment.java +++ b/app/src/main/java/ch/dissem/apps/abit/ComposeMessageFragment.java @@ -219,6 +219,10 @@ public class ComposeMessageFragment extends Fragment { } } } + if (recipient == null){ + Toast.makeText(getContext(), R.string.error_msg_recipient_missing, Toast.LENGTH_LONG).show(); + return; + } builder = new Plaintext.Builder(MSG) .from(identity) .to(recipient); diff --git a/app/src/main/java/ch/dissem/apps/abit/listener/WifiReceiver.java b/app/src/main/java/ch/dissem/apps/abit/listener/WifiReceiver.java index 898be32..447079e 100644 --- a/app/src/main/java/ch/dissem/apps/abit/listener/WifiReceiver.java +++ b/app/src/main/java/ch/dissem/apps/abit/listener/WifiReceiver.java @@ -35,7 +35,7 @@ public class WifiReceiver extends BroadcastReceiver { if (Preferences.isWifiOnly(ctx) && isConnectedToMeteredNetwork(ctx) && bmc.isRunning()) { bmc.shutdown(); } - if (!bmc.isRunning() && !(Preferences.isWifiOnly(ctx) && isConnectedToMeteredNetwork(ctx))) { + if (Preferences.isFullNodeActive(ctx) && !bmc.isRunning() && !(Preferences.isWifiOnly(ctx) && isConnectedToMeteredNetwork(ctx))) { ctx.startService(new Intent(ctx, BitmessageService.class)); } } diff --git a/app/src/main/java/ch/dissem/apps/abit/synchronization/SyncAdapter.java b/app/src/main/java/ch/dissem/apps/abit/synchronization/SyncAdapter.java index c0a3655..ee42b51 100644 --- a/app/src/main/java/ch/dissem/apps/abit/synchronization/SyncAdapter.java +++ b/app/src/main/java/ch/dissem/apps/abit/synchronization/SyncAdapter.java @@ -100,7 +100,8 @@ public class SyncAdapter extends AbstractThreadedSyncAdapter { Preferences.getTrustedNode(getContext()), Preferences.getTrustedNodePort(getContext()), Preferences.getTimeoutInSeconds(getContext()), - true); + true + ); LOG.info("Synchronization finished"); } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 1fa2b69..2b3e45b 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -118,4 +118,5 @@ Als Alternative kann in den Einstellungen ein vertrauenswürdiger Knoten konfigu Aufräumarbeiten beendet Veraltete Inventareinträge werden entfernt Auf W-LAN warten + Bitte Empfänger angeben diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 85ae6b0..cf12e2b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -117,4 +117,5 @@ As an alternative you could configure a trusted node in the settings, but as of Cleanup started Cleanup finished Wait for Wi-Fi + Please set a recipient diff --git a/build.gradle b/build.gradle index b06c3d3..250f078 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' - classpath 'com.github.ben-manes:gradle-versions-plugin:0.14.0' + classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files