summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/fragments/LogFragment.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-11-07 22:40:51 +0100
committerArne Schwabe <arne@rfc2549.org>2013-11-07 22:40:51 +0100
commit8ced9f378613425efb9949196e967dbe2f03a63a (patch)
tree37eb4395b3d04463f63916b1cdb7498bf6ebb828 /src/de/blinkt/openvpn/fragments/LogFragment.java
parente66b35409cff37433af11693673145406029356f (diff)
Fine tune log window.
--HG-- rename : res/layout-w720dp/log_fragment.xml => res/layout-sw600dp/log_fragment.xml rename : res/values-w600dp/dimens.xml => res/values-sw600dp/dimens.xml
Diffstat (limited to 'src/de/blinkt/openvpn/fragments/LogFragment.java')
-rw-r--r--src/de/blinkt/openvpn/fragments/LogFragment.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/de/blinkt/openvpn/fragments/LogFragment.java b/src/de/blinkt/openvpn/fragments/LogFragment.java
index 9508f158..750b5703 100644
--- a/src/de/blinkt/openvpn/fragments/LogFragment.java
+++ b/src/de/blinkt/openvpn/fragments/LogFragment.java
@@ -60,6 +60,7 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
}
};
+
private SeekBar mLogLevelSlider;
private LinearLayout mOptionsLayout;
private RadioGroup mTimeRadioGroup;
@@ -74,12 +75,10 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
-
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
-
}
@Override
@@ -225,10 +224,10 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
timeformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.getDefault());
else
timeformat = DateFormat.getTimeFormat(getActivity());
- time = timeformat.format(d);
+ time = timeformat.format(d) + " ";
}
- msg = time + " " + le.getVerbosityLevel() + " " + msg;
+ msg = time + msg;
int spanStart = time.length();
@@ -518,7 +517,9 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
super.onStop();
VpnStatus.removeStateListener(this);
VpnStatus.removeByteCountListener(this);
- getActivity().unbindService(mConnection);
+
+ if(mService!=null)
+ getActivity().unbindService(mConnection);
getActivity().getPreferences(0).edit().putInt(LOGTIMEFORMAT, ladapter.mTimeFormat)
.putInt(VERBOSITYLEVEL, ladapter.mLogLevel).apply();