summaryrefslogtreecommitdiff
path: root/src/de
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-11-19 00:22:56 +0100
committerArne Schwabe <arne@rfc2549.org>2013-11-19 00:22:56 +0100
commit42f552b5eeb209ba32282c87f61414bcaf85cf23 (patch)
tree1b16b59c3177e4b287e0a4bdc2e93847b0d02323 /src/de
parent8ced9f378613425efb9949196e967dbe2f03a63a (diff)
small bug fixes
Diffstat (limited to 'src/de')
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java2
-rw-r--r--src/de/blinkt/openvpn/fragments/LogFragment.java18
2 files changed, 11 insertions, 9 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index 7b5faae3..79c94779 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -647,7 +647,7 @@ public class VpnProfile implements Serializable {
} catch (AssertionError e) {
if (tries ==0)
return null;
- Toast.makeText(context, String.format("Failure getting Keystore Keys (%s), retrying",e.getLocalizedMessage()),Toast.LENGTH_LONG).show();
+ VpnStatus.logError(String.format("Failure getting Keystore Keys (%s), retrying",e.getLocalizedMessage()));
try {
Thread.sleep(3000);
} catch (InterruptedException e1) {
diff --git a/src/de/blinkt/openvpn/fragments/LogFragment.java b/src/de/blinkt/openvpn/fragments/LogFragment.java
index 750b5703..721f0707 100644
--- a/src/de/blinkt/openvpn/fragments/LogFragment.java
+++ b/src/de/blinkt/openvpn/fragments/LogFragment.java
@@ -103,14 +103,16 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
final String down = String.format("%2$s/s %1$s", humanReadableByteCount(in, false), humanReadableByteCount(diffIn / OpenVPNManagement.mBytecountInterval, true));
final String up = String.format("%2$s/s %1$s", humanReadableByteCount(out, false), humanReadableByteCount(diffOut / OpenVPNManagement.mBytecountInterval, true));
- if(mUpStatus!=null && mDownStatus!=null) {
- getActivity().runOnUiThread(new Runnable() {
- @Override
- public void run() {
- mUpStatus.setText(up);
- mDownStatus.setText(down);
- }
- });
+ if (mUpStatus != null && mDownStatus != null) {
+ if (getActivity() != null) {
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mUpStatus.setText(up);
+ mDownStatus.setText(down);
+ }
+ });
+ }
}
}