Added package name support required by the redmine exception handler

Change-Id: I3b94dc93f9bc8b7361f0bca7f4a834345e23185f
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
2012-02-22 13:16:55 -05:00
parent c9da00f0cb
commit 4e7c01d96e
3 changed files with 5 additions and 4 deletions

View File

@@ -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

View File

@@ -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){

View File

@@ -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<ReportItem>();
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;
}