项目:chromium-for-android-56-debug-video
文件:ChromeStrictMode.java
/**
* Always process the violation on the UI thread. This ensures other crash reports are not
* corrupted. Since each individual user has a very small chance of uploading each violation,* and we have a hard cap of 3 per session,this will not affect performance too much.
*
* @param violationInfo The violation info from the StrictMode violation in question.
*/
@UiThread
private static void reportStrictModeViolation(Object violationInfo) {
try {
Field crashInfoField = violationInfo.getClass().getField("crashInfo");
ApplicationErrorReport.CrashInfo crashInfo =
(ApplicationErrorReport.CrashInfo) crashInfoField.get(violationInfo);
String stackTrace = crashInfo.stackTrace;
if (stackTrace == null) {
Log.d(TAG,"StrictMode violation stack trace was null.");
} else {
Log.d(TAG,"Upload stack trace: " + stackTrace);
JavaExceptionReporter.reportStackTrace(stackTrace);
}
} catch (Exception e) {
// Ignore all exceptions.
Log.d(TAG,"Could not handle observed StrictMode violation.",e);
}
}
项目:AndroidChromium
文件:ChromeStrictMode.java
/**
* Always process the violation on the UI thread. This ensures other crash reports are not
* corrupted. Since each individual user has a very small chance of uploading each violation,e);
}
}
/**
* Always process the violation on the UI thread. This ensures other crash reports are not
* corrupted. Since each individual user has a very small chance of uploading each violation,e);
}
}
项目:android-crash-reporting
文件:ReportHandler.java
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public static void showDefaultReportActivity(Context context,Throwable th)
{
String packageName = context.getPackageName();
PackageManager pm = context.getPackageManager();
// Not perfect.. but it'll have to do.
ApplicationErrorReport report = new ApplicationErrorReport();
report.installerPackageName = pm.getInstallerPackageName(packageName);
report.packageName = packageName;
report.processName = packageName;
report.time = System.currentTimeMillis();
report.systemApp = false;
report.type = ApplicationErrorReport.TYPE_CRASH;
report.crashInfo = new ApplicationErrorReport.CrashInfo(th);
sAppContext.startActivity(new Intent(Intent.ACTION_APP_ERROR)
.setPackage("com.google.android.Feedback")
.putExtra(Intent.EXTRA_BUG_REPORT,report)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
项目:MKAPP
文件:Util.java
public static void sendCrashReport(Throwable ex,final Context context) {
if (!isPlayStoreInstall(context) || Util.isDebuggable(context))
return;
try {
ApplicationErrorReport report = new ApplicationErrorReport();
report.packageName = report.processName = context.getPackageName();
report.time = System.currentTimeMillis();
report.type = ApplicationErrorReport.TYPE_CRASH;
report.systemApp = false;
ApplicationErrorReport.CrashInfo crash = new ApplicationErrorReport.CrashInfo();
crash.exceptionClassName = ex.getClass().getSimpleName();
crash.exceptionMessage = ex.getMessage();
StringWriter writer = new StringWriter();
PrintWriter printer = new PrintWriter(writer);
ex.printstacktrace(printer);
crash.stackTrace = writer.toString();
StackTraceElement stack = ex.getStackTrace()[0];
crash.throwClassName = stack.getClassName();
crash.throwFileName = stack.getFileName();
crash.throwLineNumber = stack.getLineNumber();
crash.throwMethodName = stack.getmethodName();
report.crashInfo = crash;
final Intent bug = new Intent(Intent.ACTION_APP_ERROR);
bug.putExtra(Intent.EXTRA_BUG_REPORT,report);
bug.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (bug.resolveActivity(context.getPackageManager()) != null)
context.startActivity(bug);
} catch (Throwable exex) {
Log.e(TAG,exex.toString() + "\n" + Log.getStackTraceString(exex));
}
}
项目:android_packages_apps_tv
文件:DeveloperOptionFragment.java
@Override
protected List<Item> getItemList() {
List<Item> items = new ArrayList<>();
if (BuildConfig.ENG) {
items.add(new ActionItem(getString(R.string.dev_item_watch_history)) {
@Override
protected void onSelected() {
getMainActivity().getoverlayManager().showRecentlyWatchedDialog();
}
});
}
items.add(new ActionItem(getString(R.string.dev_item_send_Feedback)) {
@Override
protected void onSelected() {
Intent intent = new Intent(Intent.ACTION_APP_ERROR);
ApplicationErrorReport report = new ApplicationErrorReport();
report.packageName = report.processName = getContext().getPackageName();
report.time = System.currentTimeMillis();
report.type = ApplicationErrorReport.TYPE_NONE;
intent.putExtra(Intent.EXTRA_BUG_REPORT,report);
startActivityForResult(intent,0);
}
});
items.add(new SwitchItem(getString(R.string.dev_item_store_ts_on),getString(R.string.dev_item_store_ts_off),getString(R.string.dev_item_store_ts_description)) {
@Override
protected void onUpdate() {
super.onUpdate();
setChecked(TunerPreferences.getStoreTsstream(getContext()));
}
@Override
protected void onSelected() {
super.onSelected();
TunerPreferences.setStoreTsstream(getContext(),isChecked());
}
});
return items;
}
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex));
}
}
项目:gito-github-client
文件:Utils.java
public static void openFeedback(Activity activity) {
try {
throw new IOException();
} catch (IOException e) {
ApplicationErrorReport report = new ApplicationErrorReport();
report.packageName = report.processName = activity.getApplication()
.getPackageName();
report.time = System.currentTimeMillis();
report.type = ApplicationErrorReport.TYPE_CRASH;
report.systemApp = false;
ApplicationErrorReport.CrashInfo crash = new ApplicationErrorReport.CrashInfo();
crash.exceptionClassName = e.getClass().getSimpleName();
crash.exceptionMessage = e.getMessage();
StringWriter writer = new StringWriter();
PrintWriter printer = new PrintWriter(writer);
e.printstacktrace(printer);
crash.stackTrace = writer.toString();
StackTraceElement stack = e.getStackTrace()[0];
crash.throwClassName = stack.getClassName();
crash.throwFileName = stack.getFileName();
crash.throwLineNumber = stack.getLineNumber();
crash.throwMethodName = stack.getmethodName();
report.crashInfo = crash;
Intent intent = new Intent(Intent.ACTION_APP_ERROR);
intent.putExtra(Intent.EXTRA_BUG_REPORT,report);
activity.startActivity(intent);
}
}
项目:kcanotify
文件:Util.java
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex));
}
}
项目:android-protwall
文件:Util.java
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex));
}
}
FeedbackOptions(int paramInt,String paramString1,Bundle paramBundle,String paramString2,ApplicationErrorReport paramApplicationErrorReport,String paramString3,BitmapTeleporter paramBitmapTeleporter,String paramString4,ArrayList<FileTeleporter> paramArrayList,boolean paramBoolean,ThemeSettings paramThemeSettings,logoptions paramlogoptions)
{
this.mVersionCode = paramInt;
this.mAccountInUse = paramString1;
this.mPsdBundle = paramBundle;
this.mDescription = paramString2;
this.mApplicationErrorReport = paramApplicationErrorReport;
this.mCategoryTag = paramString3;
this.mBitmapTeleporter = paramBitmapTeleporter;
this.mPackageName = paramString4;
this.mFileTeleporters = paramArrayList;
this.mExcludePii = paramBoolean;
this.mThemeSettings = paramThemeSettings;
this.mlogoptions = paramlogoptions;
}
public final ApplicationErrorReport.CrashInfo getCrashInfo()
{
if (this.mApplicationErrorReport == null) {
return null;
}
return this.mApplicationErrorReport.crashInfo;
}
public FeedbackOptions(int paramInt,logoptions paramlogoptions)
{
this.a = paramInt;
this.b = paramString1;
this.c = paramBundle;
this.d = paramString2;
this.e = paramApplicationErrorReport;
this.f = paramString3;
this.g = paramBitmapTeleporter;
this.h = paramString4;
this.i = paramArrayList;
this.j = paramBoolean;
this.k = paramThemeSettings;
this.l = paramlogoptions;
}
public final ApplicationErrorReport.CrashInfo a()
{
if (this.e == null) {
return null;
}
return this.e.crashInfo;
}
项目:NetGuard
文件:Util.java
public static void sendCrashReport(Throwable ex,exex.toString() + "\n" + Log.getStackTraceString(exex));
}
}
项目:intellij-ce-playground
文件:Basic.java
private ApplicationErrorReport getReport() {
return null;
}
private FeedbackOptions()
{
this(3,null,new ApplicationErrorReport(),true,null);
}
项目:FMTech
文件:ErrorReport.java
ErrorReport(int paramInt1,int paramInt2,String paramString5,String paramString6,String paramString7,String paramString8,int paramInt3,String paramString9,String paramString10,String paramString11,String paramString12,String paramString13,String[] paramarrayofstring1,String[] paramarrayofstring2,String[] paramarrayofstring3,String paramString14,String paramString15,byte[] paramArrayOfByte,int paramInt4,int paramInt5,int paramInt6,int paramInt7,String paramString16,String paramString17,String paramString18,Bundle paramBundle1,boolean paramBoolean1,int paramInt8,int paramInt9,boolean paramBoolean2,String paramString19,String paramString20,int paramInt10,String paramString21,String paramString22,String paramString23,String paramString24,String paramString25,String paramString26,String paramString27,String paramString28,FileTeleporter[] paramArrayOfFileTeleporter,String[] paramarrayofstring4,boolean paramBoolean3,String paramString29,logoptions paramlogoptions,String paramString30,boolean paramBoolean4,Bundle paramBundle2,List<RectF> paramList)
{
this.versionCode = paramInt1;
this.applicationErrorReport = paramApplicationErrorReport;
this.description = paramString1;
this.packageVersion = paramInt2;
this.packageVersionName = paramString2;
this.device = paramString3;
this.buildId = paramString4;
this.buildType = paramString5;
this.model = paramString6;
this.product = paramString7;
this.buildFingerprint = paramString8;
this.sdk_int = paramInt3;
this.release = paramString9;
this.incremental = paramString10;
this.codename = paramString11;
this.board = paramString12;
this.brand = paramString13;
this.runningApplications = paramarrayofstring1;
this.systemLog = paramarrayofstring2;
this.eventLog = paramarrayofstring3;
this.anrStackTraces = paramString14;
this.screenshot = paramString15;
this.screenshotBytes = paramArrayOfByte;
this.screenshotHeight = paramInt4;
this.screenshotWidth = paramInt5;
this.phoneType = paramInt6;
this.networkType = paramInt7;
this.networkName = paramString16;
this.account = paramString17;
this.localeString = paramString18;
this.psdBundle = paramBundle1;
this.isSilentSend = paramBoolean1;
this.networkMcc = paramInt8;
this.networkMnc = paramInt9;
this.isCtlAllowed = paramBoolean2;
this.exceptionClassName = paramString19;
this.throwFileName = paramString20;
this.throwLineNumber = paramInt10;
this.throwClassName = paramString21;
this.throwMethodName = paramString22;
this.stackTrace = paramString23;
this.exceptionMessage = paramString24;
this.categoryTag = paramString25;
this.color = paramString26;
this.submittingPackageName = paramString27;
this.bitmapTeleporter = paramBitmapTeleporter;
this.screenshotPath = paramString28;
this.fileTeleporterList = paramArrayOfFileTeleporter;
this.psdFilePaths = paramarrayofstring4;
this.excludePii = paramBoolean3;
this.launcher = paramString29;
this.themeSettings = paramThemeSettings;
this.logoptions = paramlogoptions;
this.suggestionSessionId = paramString30;
this.suggestionShown = paramBoolean4;
this.classificationSignals = paramBundle2;
this.highlightBounds = paramList;
}
public FeedbackOptions()
{
this(3,null);
}
项目:FMTech
文件:ErrorReport.java
public ErrorReport(int paramInt1,Bundle paramBundle2)
{
this.a = paramInt1;
this.b = paramApplicationErrorReport;
this.c = paramString1;
this.d = paramInt2;
this.e = paramString2;
this.f = paramString3;
this.g = paramString4;
this.h = paramString5;
this.i = paramString6;
this.j = paramString7;
this.k = paramString8;
this.l = paramInt3;
this.m = paramString9;
this.n = paramString10;
this.o = paramString11;
this.p = paramString12;
this.q = paramString13;
this.r = paramarrayofstring1;
this.s = paramarrayofstring2;
this.t = paramarrayofstring3;
this.u = paramString14;
this.v = paramString15;
this.w = paramArrayOfByte;
this.x = paramInt4;
this.y = paramInt5;
this.z = paramInt6;
this.A = paramInt7;
this.B = paramString16;
this.C = paramString17;
this.D = paramString18;
this.E = paramBundle1;
this.F = paramBoolean1;
this.G = paramInt8;
this.H = paramInt9;
this.I = paramBoolean2;
this.J = paramString19;
this.K = paramString20;
this.L = paramInt10;
this.M = paramString21;
this.N = paramString22;
this.O = paramString23;
this.P = paramString24;
this.Q = paramString25;
this.R = paramString26;
this.S = paramString27;
this.T = paramBitmapTeleporter;
this.U = paramString28;
this.V = paramArrayOfFileTeleporter;
this.W = paramarrayofstring4;
this.X = paramBoolean3;
this.Y = paramString29;
this.Z = paramThemeSettings;
this.aa = paramlogoptions;
this.ab = paramString30;
this.ac = paramBoolean4;
this.ad = paramBundle2;
}
项目:FMTech
文件:evk.java
public evk()
{
this.h.crashInfo = new ApplicationErrorReport.CrashInfo();
this.h.crashInfo.throwLineNumber = -1;
}
项目:AndroidWearCrashReport
文件:CrashReport.java
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public void reportToPlayStore(Context c) {
if (currentCrashInfo == null || currentException == null) {
return;
}
ApplicationErrorReport applicationErrorReport = new ApplicationErrorReport();
applicationErrorReport.packageName = this.context.getPackageName();
applicationErrorReport.processName = this.context.getPackageName();
applicationErrorReport.time = System.currentTimeMillis();
applicationErrorReport.systemApp = false;
///////////
// CRASH //
///////////
applicationErrorReport.type = ApplicationErrorReport.TYPE_CRASH;
ApplicationErrorReport.CrashInfo crashInfo = new ApplicationErrorReport.CrashInfo();
crashInfo.exceptionClassName = currentException.getClass().getSimpleName();
crashInfo.exceptionMessage = currentException.getMessage();
crashInfo.stackTrace = currentCrashInfo.toString() + " - " +Utils.getStackTrace(currentException);
StackTraceElement stackTraceElement = currentException.getStackTrace()[0];
crashInfo.throwClassName = stackTraceElement.getClassName();
crashInfo.throwFileName = stackTraceElement.getFileName();
crashInfo.throwMethodName = stackTraceElement.getmethodName();
crashInfo.throwLineNumber = stackTraceElement.getLineNumber();
applicationErrorReport.crashInfo = crashInfo;
Intent i = new Intent(Intent.ACTION_APP_ERROR);
i.putExtra(Intent.EXTRA_BUG_REPORT,applicationErrorReport);
if (!(c instanceof Activity)) {
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
// Force "Send Feedback choice",but still needs user ackNowledgement
i.setClassName("com.google.android.Feedback","com.google.android.Feedback.FeedbackActivity");
c.startActivity(i);
currentCrashInfo = null;
currentException = null;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。