Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/org/adblockplus/android/CrashHandler.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Left Patch Set: Fixed leftover first-batch review issues. Created April 16, 2014, 5:51 p.m.
Right Patch Set: Even more review issues fixed. Created April 28, 2014, 10:18 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 16 matching lines...) Expand all
27 import android.content.pm.PackageManager.NameNotFoundException; 27 import android.content.pm.PackageManager.NameNotFoundException;
28 import android.os.Build; 28 import android.os.Build;
29 import android.util.Log; 29 import android.util.Log;
30 30
31 /** 31 /**
32 * Writes crash data in file. 32 * Writes crash data in file.
33 */ 33 */
34 public class CrashHandler implements UncaughtExceptionHandler 34 public class CrashHandler implements UncaughtExceptionHandler
35 { 35 {
36 public static final String REPORT_FILE = "AdblockPlus_Crash_Report.txt"; 36 public static final String REPORT_FILE = "AdblockPlus_Crash_Report.txt";
37
38 private final UncaughtExceptionHandler defaultUEH; 37 private final UncaughtExceptionHandler defaultUEH;
38 private NotificationManager notificationManager;
39 private final Context context; 39 private final Context context;
40 40
41 private NotificationManager notificationManager;
42 private boolean generateReport; 41 private boolean generateReport;
43 private boolean restoreProxy; 42 private boolean restoreProxy;
44 private String host; 43 private String host;
45 private String port; 44 private String port;
46 private String excl; 45 private String excl;
47 46
48 public CrashHandler(final Context context) 47 public CrashHandler(final Context context)
49 { 48 {
50 defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); 49 defaultUEH = Thread.getDefaultUncaughtExceptionHandler();
51 this.context = context; 50 this.context = context;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 { 166 {
168 p = Integer.valueOf(port); 167 p = Integer.valueOf(port);
169 } 168 }
170 catch (final NumberFormatException e) 169 catch (final NumberFormatException e)
171 { 170 {
172 // ignore - no valid port, it will be correctly processed later 171 // ignore - no valid port, it will be correctly processed later
173 } 172 }
174 ProxySettings.setConnectionProxy(context, host, p, excl); 173 ProxySettings.setConnectionProxy(context, host, p, excl);
175 } 174 }
176 } 175 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld