public class ApplicationErrorReport extends Object implements Parcelable
TYPE_NONE
uninitialized instance of ApplicationErrorReport
.
TYPE_CRASH
application crash. Information about the crash
is stored in crashInfo
.
TYPE_ANR
application not responding. Information about the
ANR is stored in anrInfo
.
TYPE_BATTERY
user reported application is using too much
battery. Information about the battery use is stored in batteryInfo
.
TYPE_RUNNING_SERVICE
user reported application is leaving an
unneeded serive running. Information about the battery use is stored in
runningServiceInfo
.
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationErrorReport.AnrInfo
Describes an application not responding error.
|
static class |
ApplicationErrorReport.BatteryInfo
Describes a battery usage report.
|
static class |
ApplicationErrorReport.CrashInfo
Describes an application crash.
|
static class |
ApplicationErrorReport.RunningServiceInfo
Describes a running service report.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
ApplicationErrorReport.AnrInfo |
anrInfo
If this report is of type
TYPE_ANR , contains an instance
of AnrInfo describing the ANR; otherwise null. |
ApplicationErrorReport.BatteryInfo |
batteryInfo
If this report is of type
TYPE_BATTERY , contains an instance
of BatteryInfo; otherwise null. |
ApplicationErrorReport.CrashInfo |
crashInfo
If this report is of type
TYPE_CRASH , contains an instance
of CrashInfo describing the crash; otherwise null. |
static Parcelable.Creator<ApplicationErrorReport> |
CREATOR |
String |
installerPackageName
Package name of the application which installed the application this
report pertains to.
|
String |
packageName
Package name of the application.
|
String |
processName
Process name of the application.
|
ApplicationErrorReport.RunningServiceInfo |
runningServiceInfo
If this report is of type
TYPE_RUNNING_SERVICE , contains an instance
of RunningServiceInfo; otherwise null. |
boolean |
systemApp
Set if the app is on the system image.
|
long |
time
Time at which the error occurred.
|
int |
type
Type of this report.
|
static int |
TYPE_ANR
An error report about an application that's not responding.
|
static int |
TYPE_BATTERY
An error report about an application that's consuming too much battery.
|
static int |
TYPE_CRASH
An error report about an application crash.
|
static int |
TYPE_NONE
Uninitialized error report.
|
static int |
TYPE_RUNNING_SERVICE
A report from a user to a developer about a running service that the
user doesn't think should be running.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ApplicationErrorReport()
Create an uninitialized instance of
ApplicationErrorReport . |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
void |
dump(Printer pw,
String prefix)
Dump the report to a Printer.
|
static ComponentName |
getErrorReportReceiver(Context context,
String packageName,
int appFlags) |
void |
readFromParcel(Parcel in) |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final int TYPE_NONE
public static final int TYPE_CRASH
public static final int TYPE_ANR
public static final int TYPE_BATTERY
public static final int TYPE_RUNNING_SERVICE
public int type
TYPE_NONE
,
TYPE_CRASH
, TYPE_ANR
, TYPE_BATTERY
,
or TYPE_RUNNING_SERVICE
.public String packageName
public String installerPackageName
public String processName
public long time
public boolean systemApp
public ApplicationErrorReport.CrashInfo crashInfo
TYPE_CRASH
, contains an instance
of CrashInfo describing the crash; otherwise null.public ApplicationErrorReport.AnrInfo anrInfo
TYPE_ANR
, contains an instance
of AnrInfo describing the ANR; otherwise null.public ApplicationErrorReport.BatteryInfo batteryInfo
TYPE_BATTERY
, contains an instance
of BatteryInfo; otherwise null.public ApplicationErrorReport.RunningServiceInfo runningServiceInfo
TYPE_RUNNING_SERVICE
, contains an instance
of RunningServiceInfo; otherwise null.public static final Parcelable.Creator<ApplicationErrorReport> CREATOR
public ApplicationErrorReport()
ApplicationErrorReport
.public static ComponentName getErrorReportReceiver(Context context, String packageName, int appFlags)
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public void readFromParcel(Parcel in)
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR