From 4e7c01d96e6d14829ff038e73af094f30c2d516e Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Wed, 22 Feb 2012 13:16:55 -0500 Subject: [PATCH] Added package name support required by the redmine exception handler Change-Id: I3b94dc93f9bc8b7361f0bca7f4a834345e23185f Signed-off-by: Ricky Barrette --- ExceptionHandlerLib/exceptionhandler.properties | 4 ++-- .../com/TwentyCodes/android/exception/ExceptionHandler.java | 2 +- .../src/com/TwentyCodes/android/exception/Report.java | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ExceptionHandlerLib/exceptionhandler.properties b/ExceptionHandlerLib/exceptionhandler.properties index 21d1215..cc2dcde 100644 --- a/ExceptionHandlerLib/exceptionhandler.properties +++ b/ExceptionHandlerLib/exceptionhandler.properties @@ -13,8 +13,8 @@ # get is the path to your json retrieval script # app is the redmine project name # tracker is the redmine tracker -server = http://rickbarrette.dyndns.org:8080/ -file = redmine/exceptionhandler +server = http://192.168.0.103:8080/ +file = app = test tracker = Bug diff --git a/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/ExceptionHandler.java b/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/ExceptionHandler.java index 17739ea..9bef466 100644 --- a/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/ExceptionHandler.java +++ b/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/ExceptionHandler.java @@ -201,7 +201,7 @@ public class ExceptionHandler implements UncaughtExceptionHandler, Runnable { } //generate the report - this.mReport = new Report(mURL).generateReport(e.toString(), report.toString(), causereport.toString(), sdf.format(theDate), Build.FINGERPRINT, pi.versionName+"b"+pi.versionCode, mAppName != null ? mAppName : mContext.getPackageName(), this.mTracker); + this.mReport = new Report(mURL).generateReport(e.toString(), report.toString(), causereport.toString(), sdf.format(theDate), Build.FINGERPRINT, pi.versionName+"b"+pi.versionCode, mAppName != null ? mAppName : mContext.getPackageName(), this.mTracker, mContext.getPackageName()); //try to send file contents via email (need to do so via the UI thread) if(this.mApp != null){ diff --git a/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/Report.java b/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/Report.java index c1104c2..2afaef2 100644 --- a/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/Report.java +++ b/ExceptionHandlerLib/src/com/TwentyCodes/android/exception/Report.java @@ -127,7 +127,7 @@ public class Report implements Parcelable{ * @return this * @author ricky barrette */ - public Report generateReport(String msg, String stackTrace, String cause, String date, String device, String appVersion, String app, String tracker){ + public Report generateReport(String msg, String stackTrace, String cause, String date, String device, String appVersion, String app, String tracker, String packageName){ this.mReport = new ArrayList(); this.mReport.add(new ReportItem("app",app)); this.mReport.add(new ReportItem("version",appVersion)); @@ -137,6 +137,7 @@ public class Report implements Parcelable{ this.mReport.add(new ReportItem("cause",cause)); this.mReport.add(new ReportItem("device",device)); this.mReport.add(new ReportItem("tracker",tracker)); + this.mReport.add(new ReportItem("package",packageName)); return this; }