summaryrefslogtreecommitdiff
path: root/src/de/blinkt
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-02-12 10:17:08 +0100
committerArne Schwabe <arne@rfc2549.org>2013-02-12 10:17:08 +0100
commite7e655c3a4832c14d5da66d1c05536be4e3622be (patch)
tree45f3ac46808e0613296c8020879055705752744a /src/de/blinkt
parentffa1c1dd034e1b2235761e4170280f9ab86f724c (diff)
Report version number on mini dumps
Diffstat (limited to 'src/de/blinkt')
-rw-r--r--src/de/blinkt/openvpn/SendDumpActivity.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/SendDumpActivity.java b/src/de/blinkt/openvpn/SendDumpActivity.java
index 8a09b535..74d1a2f8 100644
--- a/src/de/blinkt/openvpn/SendDumpActivity.java
+++ b/src/de/blinkt/openvpn/SendDumpActivity.java
@@ -6,6 +6,8 @@ import java.util.ArrayList;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
public class SendDumpActivity extends Activity {
@@ -23,7 +25,19 @@ public class SendDumpActivity extends Activity {
emailIntent.setType("*/*");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
new String[]{"Arne Schwabe <arne@rfc2549.org>"});
- emailIntent.putExtra(Intent.EXTRA_SUBJECT, "OpenVPN Minidump");
+
+ String version;
+ String name="ics-openvpn";
+ try {
+ PackageInfo packageinfo = getPackageManager().getPackageInfo(getPackageName(), 0);
+ version = packageinfo.versionName;
+ name = packageinfo.applicationInfo.name;
+ } catch (NameNotFoundException e) {
+ version = "error fetching version";
+ }
+
+
+ emailIntent.putExtra(Intent.EXTRA_SUBJECT, String.format("%s %s Minidump",name,version));
emailIntent.putExtra(Intent.EXTRA_TEXT, "Please describe the issue you have experienced");