From 87c962c47189cac2f9954c94a55e36770accfb70 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 8 May 2012 16:34:47 +0200 Subject: Add FAQ Dialog, will be filled with more Items later --- src/de/blinkt/openvpn/AboutPreference.java | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/de/blinkt/openvpn/AboutPreference.java (limited to 'src/de/blinkt/openvpn') diff --git a/src/de/blinkt/openvpn/AboutPreference.java b/src/de/blinkt/openvpn/AboutPreference.java deleted file mode 100644 index ff6c611d..00000000 --- a/src/de/blinkt/openvpn/AboutPreference.java +++ /dev/null @@ -1,14 +0,0 @@ -package de.blinkt.openvpn; - -import android.content.Context; -import android.preference.Preference; -import android.util.AttributeSet; - -public class AboutPreference extends Preference { - - public AboutPreference(Context context, AttributeSet attrs) { - super(context, attrs); - setWidgetLayoutResource(R.layout.about); - } - -} -- cgit v1.2.3 From c08b39906f2a54e1211fedb8bcc3f1469b42d6f0 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 8 May 2012 17:55:54 +0200 Subject: more about --- src/de/blinkt/openvpn/AboutFragment.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/de/blinkt/openvpn') diff --git a/src/de/blinkt/openvpn/AboutFragment.java b/src/de/blinkt/openvpn/AboutFragment.java index 065e53bc..77132299 100644 --- a/src/de/blinkt/openvpn/AboutFragment.java +++ b/src/de/blinkt/openvpn/AboutFragment.java @@ -1,6 +1,7 @@ package de.blinkt.openvpn; import android.app.Fragment; +import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.view.LayoutInflater; @@ -23,14 +24,17 @@ public class AboutFragment extends Fragment { TextView ver = (TextView) v.findViewById(R.id.version); String version; + String name="Openvpn"; try { - version = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0).versionName; + PackageInfo packageinfo = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0); + version = packageinfo.versionName; + name = getString(R.string.app); } catch (NameNotFoundException e) { version = "error fetching version"; } - ver.setText(getString(R.string.version_info,version)); + ver.setText(getString(R.string.version_info,name,version)); return v; } -- cgit v1.2.3 From ccd71cda1d09c0b934a645d8f93fa7f5514147d5 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 8 May 2012 19:13:04 +0200 Subject: If we make a toast, also show it. --- src/de/blinkt/openvpn/LaunchVPN.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/de/blinkt/openvpn') diff --git a/src/de/blinkt/openvpn/LaunchVPN.java b/src/de/blinkt/openvpn/LaunchVPN.java index 28abaf3d..88c14da3 100644 --- a/src/de/blinkt/openvpn/LaunchVPN.java +++ b/src/de/blinkt/openvpn/LaunchVPN.java @@ -291,7 +291,7 @@ public class LaunchVPN extends ListActivity implements OnItemClickListener { try { startActivityForResult(intent, START_VPN_PROFILE); } catch (ActivityNotFoundException ane){ - Toast.makeText(this, "Your image does not support the VPNService API,sorry :(", Toast.LENGTH_LONG); + Toast.makeText(this, "Your image does not support the VPNService API,sorry :(", Toast.LENGTH_LONG).show(); } } else { onActivityResult(START_VPN_PROFILE, Activity.RESULT_OK, null); -- cgit v1.2.3