From 67e825cb748c0e7db05c99ee7c6b3ed0fb32cd68 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 25 Sep 2012 21:44:41 +0200 Subject: make the context getting a bit more clean ,should not change anything but never know (NPE in market console) --- src/de/blinkt/openvpn/LogWindow.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/de/blinkt/openvpn/LogWindow.java b/src/de/blinkt/openvpn/LogWindow.java index ecadd85c..8d228cf1 100644 --- a/src/de/blinkt/openvpn/LogWindow.java +++ b/src/de/blinkt/openvpn/LogWindow.java @@ -36,7 +36,7 @@ public class LogWindow extends ListActivity implements StateListener { private String[] mBconfig=null; - class LogWindowListAdapter implements ListAdapter,LogListener, Callback { + class LogWindowListAdapter implements ListAdapter, LogListener, Callback { private static final int MESSAGE_NEWLOG = 0; @@ -64,7 +64,7 @@ public class LogWindow extends ListActivity implements StateListener { private void initLogBuffer() { myEntries.clear(); for (LogItem litem : OpenVPN.getlogbuffer()) { - myEntries.add(litem.getString(getBaseContext())); + myEntries.add(litem.getString(getContext())); } } @@ -241,6 +241,10 @@ public class LogWindow extends ListActivity implements StateListener { } + protected Context getContext() { + return this; + } + @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); -- cgit v1.2.3