共用方式為


ApplicationExitInfo Class

Definition

Describes the information of an application process's death.

[Android.Runtime.Register("android/app/ApplicationExitInfo", ApiSince=30, DoNotGenerateAcw=true)]
public sealed class ApplicationExitInfo : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/ApplicationExitInfo", ApiSince=30, DoNotGenerateAcw=true)>]
type ApplicationExitInfo = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
ApplicationExitInfo
Attributes
Implements

Remarks

Describes the information of an application process's death.

Application process could die for many reasons, for example #REASON_LOW_MEMORY when it was killed by the system because it was running low on memory. Reason of the death can be retrieved via #getReason. Besides the reason, there are a few other auxiliary APIs like #getStatus and #getImportance to help the caller with additional diagnostic information.

Java documentation for android.app.ApplicationExitInfo.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

ReasonAnr
Obsolete.

Application process was killed due to being unresponsive (ANR).

ReasonCrash
Obsolete.

Application process died because of an unhandled exception in Java code.

ReasonCrashNative
Obsolete.

Application process died because of a native code crash.

ReasonDependencyDied
Obsolete.

Application process was killed because its dependency was going away, for example, a stable content provider connection's client will be killed if the provider is killed.

ReasonExcessiveResourceUsage
Obsolete.

Application process was killed by the system due to excessive resource usage.

ReasonExitSelf
Obsolete.

Application process exit normally by itself, for example, via java.lang.System#exit; #getStatus will specify the exit code.

ReasonFreezer
Obsolete.

Application process was killed by App Freezer, for example, because it receives sync binder transactions while being frozen.

ReasonInitializationFailure
Obsolete.

Application process was killed because of initialization failure, for example, it took too long to attach to the system during the start, or there was an error during initialization.

ReasonLowMemory
Obsolete.

Application process was killed by the system low memory killer, meaning the system was under memory pressure at the time of kill.

ReasonOther
Obsolete.

Application process was killed by the system for various other reasons which are not by problems in apps and not actionable by apps, for example, the system just finished updates; #getDescription will specify the cause given by the system.

ReasonPackageStateChange
Obsolete.

Application process was killed because the app was disabled, or any of its component states have changed without android.content.pm.PackageManager#DONT_KILL_APP

ReasonPackageUpdated
Obsolete.

Application process was killed because it was updated.

ReasonPermissionChange
Obsolete.

Application process was killed due to a runtime permission change.

ReasonSignaled
Obsolete.

Application process died due to the result of an OS signal; for example, android.system.OsConstants#SIGKILL; #getStatus will specify the signal number.

ReasonUnknown
Obsolete.

Application process died due to unknown reason.

ReasonUserRequested
Obsolete.

Application process was killed because of the user request, for example, user clicked the "Force stop" button of the application in the Settings, or removed the application away from Recents.

ReasonUserStopped
Obsolete.

Application process was killed, because the user it is running as on devices with mutlple users, was stopped.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator
DefiningUid

Return the defining kernel user identifier, maybe different from #getRealUid and #getPackageUid, if an external service has the android.R.styleable#AndroidManifestService_useAppZygote android:useAppZygote set to true and was bound with the flag android.content.Context#BIND_EXTERNAL_SERVICE - in this case, this field here will be the kernel user identifier of the external service provider.

Description

The human readable description of the process's death, given by the system; could be null.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
Importance

The importance of the process that it used to have before the death.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PackageUid

Similar to #getRealUid, it's the kernel user identifier that is assigned at the package installation time.

PeerReference (Inherited from Object)
Pid

The process id of the process that died.

ProcessName

The actual process name it was running with.

Pss

Last proportional set size of the memory that the process had used in kB.

RealUid

The kernel user identifier of the process, most of the time the system uses this to do access control checks.

Reason

The reason code of the process's death.

Rss

Last resident set size of the memory that the process had used in kB.

Status

The exit status argument of exit() if the application calls it, or the signal number if the application is signaled.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
Timestamp

The timestamp of the process's death, in milliseconds since the epoch, as returned by java.lang.System#currentTimeMillis() System.currentTimeMillis().

TraceInputStream

Return the InputStream to the traces that was taken by the system prior to the death of the process; typically it'll be available when the reason is #REASON_ANR, though if the process gets an ANR but recovers, and dies for another reason later, this trace will be included in the record of ApplicationExitInfo still.

UserHandle

Return the user id of the record on a multi-user system.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
DescribeContents()
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetProcessStateSummary()

Return the state data set by calling android.app.ActivityManager#setProcessStateSummary(byte[]) ActivityManager.setProcessStateSummary(byte[]) from the process before its death.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to