Search in sources :

Example 16 with ApplicationErrorReport

use of android.app.ApplicationErrorReport in project android_frameworks_base by ResurrectionRemix.

the class AppErrors method createAppErrorReportLocked.

private ApplicationErrorReport createAppErrorReportLocked(ProcessRecord r, long timeMillis, ApplicationErrorReport.CrashInfo crashInfo) {
    if (r.errorReportReceiver == null) {
        return null;
    }
    if (!r.crashing && !r.notResponding && !r.forceCrashReport) {
        return null;
    }
    ApplicationErrorReport report = new ApplicationErrorReport();
    report.packageName = r.info.packageName;
    report.installerPackageName = r.errorReportReceiver.getPackageName();
    report.processName = r.processName;
    report.time = timeMillis;
    report.systemApp = (r.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
    if (r.crashing || r.forceCrashReport) {
        report.type = ApplicationErrorReport.TYPE_CRASH;
        report.crashInfo = crashInfo;
    } else if (r.notResponding) {
        report.type = ApplicationErrorReport.TYPE_ANR;
        report.anrInfo = new ApplicationErrorReport.AnrInfo();
        report.anrInfo.activity = r.notRespondingReport.tag;
        report.anrInfo.cause = r.notRespondingReport.shortMsg;
        report.anrInfo.info = r.notRespondingReport.longMsg;
    }
    return report;
}
Also used : ApplicationErrorReport(android.app.ApplicationErrorReport)

Example 17 with ApplicationErrorReport

use of android.app.ApplicationErrorReport in project cornerstone by Onskreen.

the class ActivityManagerService method createAppErrorReportLocked.

private ApplicationErrorReport createAppErrorReportLocked(ProcessRecord r, long timeMillis, ApplicationErrorReport.CrashInfo crashInfo) {
    if (r.errorReportReceiver == null) {
        return null;
    }
    if (!r.crashing && !r.notResponding) {
        return null;
    }
    ApplicationErrorReport report = new ApplicationErrorReport();
    report.packageName = r.info.packageName;
    report.installerPackageName = r.errorReportReceiver.getPackageName();
    report.processName = r.processName;
    report.time = timeMillis;
    report.systemApp = (r.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
    if (r.crashing) {
        report.type = ApplicationErrorReport.TYPE_CRASH;
        report.crashInfo = crashInfo;
    } else if (r.notResponding) {
        report.type = ApplicationErrorReport.TYPE_ANR;
        report.anrInfo = new ApplicationErrorReport.AnrInfo();
        report.anrInfo.activity = r.notRespondingReport.tag;
        report.anrInfo.cause = r.notRespondingReport.shortMsg;
        report.anrInfo.info = r.notRespondingReport.longMsg;
    }
    return report;
}
Also used : ApplicationErrorReport(android.app.ApplicationErrorReport)

Aggregations

ApplicationErrorReport (android.app.ApplicationErrorReport)17 Intent (android.content.Intent)10 PendingIntent (android.app.PendingIntent)2 PrintWriter (java.io.PrintWriter)2 StringWriter (java.io.StringWriter)2 Bundle (android.os.Bundle)1