public class ApplicationErrorReport
extends Object implements Parcelable
| java.lang.Object | |
| android.app.ApplicationErrorReport | |
描述应用程序错误。 报告有一个类型,这是一个类型
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. Nested classes |
|
|---|---|
class |
ApplicationErrorReport.AnrInfo 描述应用程序无响应错误。 |
class |
ApplicationErrorReport.BatteryInfo 介绍电池使用情况报告。 |
class |
ApplicationErrorReport.CrashInfo 描述应用程序崩溃。 |
class |
ApplicationErrorReport.RunningServiceInfo 介绍正在运行的服务报告。 |
常量(Constants) |
|
|---|---|
int |
TYPE_ANR 有关未响应的应用程序的错误报告。 |
int |
TYPE_BATTERY 关于消耗太多电量的应用程序的错误报告。 |
int |
TYPE_CRASH 关于应用程序崩溃的错误报告。 |
int |
TYPE_NONE 未初始化的错误报告。 |
int |
TYPE_RUNNING_SERVICE 从用户到开发人员关于用户认为应该运行的正在运行的服务的报告。 |
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<ApplicationErrorReport> |
CREATOR |
public ApplicationErrorReport.AnrInfo |
anrInfo 如果此报告类型为 |
public ApplicationErrorReport.BatteryInfo |
batteryInfo 如果此报告类型为 |
public ApplicationErrorReport.CrashInfo |
crashInfo 如果此报告类型为 |
public String |
installerPackageName 安装此报表所涉及的应用程序的应用程序的包名称。 |
public String |
packageName 应用程序的包名称。 |
public String |
processName 应用程序的进程名称。 |
public ApplicationErrorReport.RunningServiceInfo |
runningServiceInfo 如果此报告类型为 |
public boolean |
systemApp 如果应用程序在系统映像上,请设置。 |
public long |
time 发生错误的时间。 |
public int |
type 此报告的类型。 |
Public constructors |
|
|---|---|
ApplicationErrorReport() 创建一个未初始化的实例 |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
void |
dump(Printer pw, String prefix) 将报告转储到打印机。 |
static ComponentName |
getErrorReportReceiver(Context context, String packageName, int appFlags) |
void |
readFromParcel(Parcel in) |
void |
writeToParcel(Parcel dest, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
int TYPE_RUNNING_SERVICE
从用户到开发人员关于用户认为应该运行的正在运行的服务的报告。
常量值:5(0x00000005)
ApplicationErrorReport.AnrInfo anrInfo
如果此报告类型为TYPE_ANR ,则包含描述ANR的AnrInfo实例; 否则为空。
ApplicationErrorReport.BatteryInfo batteryInfo
如果此报告类型为TYPE_BATTERY ,则包含TYPE_BATTERY一个实例; 否则为空。
ApplicationErrorReport.CrashInfo crashInfo
如果此报告类型为TYPE_CRASH ,则包含描述崩溃的CrashInfo实例; 否则为空。
String installerPackageName
安装此报表所涉及的应用程序的应用程序的包名称。 这标识了应用程序来自哪个市场。
ApplicationErrorReport.RunningServiceInfo runningServiceInfo
如果此报告的类型为TYPE_RUNNING_SERVICE ,则包含TYPE_RUNNING_SERVICE的实例; 否则为空。
int type
此报告的类型。 可以是一个TYPE_NONE , TYPE_CRASH , TYPE_ANR , TYPE_BATTERY ,或TYPE_RUNNING_SERVICE 。
ApplicationErrorReport ()
创建一个未初始化的 ApplicationErrorReport实例。
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
void dump (Printer pw, String prefix)
将报告转储到打印机。
| 参数(Parameters) | |
|---|---|
pw |
Printer
|
prefix |
String
|
ComponentName getErrorReportReceiver (Context context, String packageName, int appFlags)
| 参数(Parameters) | |
|---|---|
context |
Context
|
packageName |
String
|
appFlags |
int
|
| 返回(Returns) | |
|---|---|
ComponentName |
|
void writeToParcel (Parcel dest, int flags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |