# ProfilingResult

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/os/ProfilingResult#constants)\|[Inherited Constants](https://developer.android.com/reference/android/os/ProfilingResult#inhconstants)\|[Fields](https://developer.android.com/reference/android/os/ProfilingResult#lfields)\|[Methods](https://developer.android.com/reference/android/os/ProfilingResult#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/os/ProfilingResult#inhmethods)  

# ProfilingResult

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/os/ProfilingResult "View this page in Kotlin")\|Java

`
public

final

class
ProfilingResult
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[Parcelable](https://developer.android.com/reference/android/os/Parcelable)`


`

|---|----------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.os.ProfilingResult |

<br />

*** ** * ** ***

Encapsulates results of a single profiling request operation.

## Summary

|                                                                                                      ### Constants                                                                                                       ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [ERROR_FAILED_EXECUTING](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_EXECUTING) The request was executed and failed for a reason not specified below.                         |
| `int` | [ERROR_FAILED_INVALID_REQUEST](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_INVALID_REQUEST) The request failed due to invalid ProfilingRequest.                               |
| `int` | [ERROR_FAILED_NO_DISK_SPACE](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_NO_DISK_SPACE) The request was executed and failed due to a lack of disk space.                      |
| `int` | [ERROR_FAILED_POST_PROCESSING](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_POST_PROCESSING) The request was executed but post processing failed and the result was discarded. |
| `int` | [ERROR_FAILED_PROFILING_IN_PROGRESS](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_PROFILING_IN_PROGRESS) The request was denied due to profiling already in progress.          |
| `int` | [ERROR_FAILED_RATE_LIMIT_PROCESS](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_RATE_LIMIT_PROCESS) The request was denied due to process level rate limiting.                  |
| `int` | [ERROR_FAILED_RATE_LIMIT_SYSTEM](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_RATE_LIMIT_SYSTEM) The request was denied due to system level rate limiting.                     |
| `int` | [ERROR_NONE](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_NONE) The request was executed and succeeded.                                                                               |
| `int` | [ERROR_UNKNOWN](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_UNKNOWN) The request was denied or failed for an unspecified reason.                                                     |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable) |-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) Descriptor bit used with[describeContents()](https://developer.android.com/reference/android/os/Parcelable#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor.                                                                                                                                            | | `int` | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE) Flag for use with[writeToParcel(Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)): the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

|                                                                                                                                            ### Fields                                                                                                                                            ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| ` public static final `[Creator](https://developer.android.com/reference/android/os/Parcelable.Creator)`<`[ProfilingResult](https://developer.android.com/reference/android/os/ProfilingResult)`>` | [CREATOR](https://developer.android.com/reference/android/os/ProfilingResult#CREATOR) <br /> |

|                                                                                                                                                                                         ### Public methods                                                                                                                                                                                          ||
|-----------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`                                                                | ` `[describeContents](https://developer.android.com/reference/android/os/ProfilingResult#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                                                                                    |
| ` int`                                                                | ` `[getErrorCode](https://developer.android.com/reference/android/os/ProfilingResult#getErrorCode())`() ` The result ErrorCode for the profiling request indicating the failure reason if applicable.                                                                                                                        |
| ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getErrorMessage](https://developer.android.com/reference/android/os/ProfilingResult#getErrorMessage())`() ` Additional details about failures that occurred, if applicable.                                                                                                                                              |
| ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getResultFilePath](https://developer.android.com/reference/android/os/ProfilingResult#getResultFilePath())`() ` The file path of the profiling result data.                                                                                                                                                              |
| ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getTag](https://developer.android.com/reference/android/os/ProfilingResult#getTag())`() ` The tag defined by the caller at request time.                                                                                                                                                                                 |
| ` int`                                                                | ` `[getTriggerType](https://developer.android.com/reference/android/os/ProfilingResult#getTriggerType())`() ` Trigger type that started this profiling, or[ProfilingTrigger.TRIGGER_TYPE_NONE](https://developer.android.com/reference/android/os/ProfilingTrigger#TRIGGER_TYPE_NONE)for profiling not started by a trigger. |
| ` void`                                                               | ` `[writeToParcel](https://developer.android.com/reference/android/os/ProfilingResult#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel.                                                                 |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||
| From interface` `[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable)` ` |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int`  | ` `[describeContents](https://developer.android.com/reference/android/os/Parcelable#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                    | | ` abstract void` | ` `[writeToParcel](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### ERROR_FAILED_EXECUTING

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_FAILED_EXECUTING
```

The request was executed and failed for a reason not specified below.

<br />

Constant Value: 4 (0x00000004)  

### ERROR_FAILED_INVALID_REQUEST

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_FAILED_INVALID_REQUEST
```

The request failed due to invalid ProfilingRequest.

<br />

Constant Value: 7 (0x00000007)  

### ERROR_FAILED_NO_DISK_SPACE

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_FAILED_NO_DISK_SPACE
```

The request was executed and failed due to a lack of disk space.

<br />

Constant Value: 6 (0x00000006)  

### ERROR_FAILED_POST_PROCESSING

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_FAILED_POST_PROCESSING
```

The request was executed but post processing failed and the result was discarded.

<br />

Constant Value: 5 (0x00000005)  

### ERROR_FAILED_PROFILING_IN_PROGRESS

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_FAILED_PROFILING_IN_PROGRESS
```

The request was denied due to profiling already in progress.

<br />

Constant Value: 3 (0x00000003)  

### ERROR_FAILED_RATE_LIMIT_PROCESS

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_FAILED_RATE_LIMIT_PROCESS
```

The request was denied due to process level rate limiting.

<br />

Constant Value: 2 (0x00000002)  

### ERROR_FAILED_RATE_LIMIT_SYSTEM

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_FAILED_RATE_LIMIT_SYSTEM
```

The request was denied due to system level rate limiting.

<br />

Constant Value: 1 (0x00000001)  

### ERROR_NONE

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_NONE
```

The request was executed and succeeded.

<br />

Constant Value: 0 (0x00000000)  

### ERROR_UNKNOWN

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final int ERROR_UNKNOWN
```

The request was denied or failed for an unspecified reason.

<br />

Constant Value: 8 (0x00000008)

## Fields

### CREATOR

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static final Creator<ProfilingResult> CREATOR
```

<br />

<br />

## Public methods

### describeContents

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of[writeToParcel(android.os.Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)), the return value of this method must include the[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR)bit.

<br />

|                                                                                                                         Returns                                                                                                                         ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either`0`or[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) <br /> |

### getErrorCode

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getErrorCode ()
```

The result ErrorCode for the profiling request indicating the failure reason if applicable.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Returns                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Value is[ERROR_NONE](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_NONE),[ERROR_FAILED_RATE_LIMIT_SYSTEM](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_RATE_LIMIT_SYSTEM),[ERROR_FAILED_RATE_LIMIT_PROCESS](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_RATE_LIMIT_PROCESS),[ERROR_FAILED_PROFILING_IN_PROGRESS](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_PROFILING_IN_PROGRESS),[ERROR_FAILED_EXECUTING](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_EXECUTING),[ERROR_FAILED_POST_PROCESSING](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_POST_PROCESSING),[ERROR_FAILED_NO_DISK_SPACE](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_FAILED_NO_DISK_SPACE), or[ERROR_UNKNOWN](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_UNKNOWN) <br /> |

### getErrorMessage

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getErrorMessage ()
```

Additional details about failures that occurred, if applicable.

<br />

|                                               Returns                                               ||
|--------------------------------------------------------------------|---------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | This value may be`null`. <br /> |

### getResultFilePath

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getResultFilePath ()
```

The file path of the profiling result data. Will be null if returns code other than .

<br />

|                                  Returns                                   ||
|--------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String) | <br /> |

**See also:**

- [getErrorCode()](https://developer.android.com/reference/android/os/ProfilingResult#getErrorCode())
- [ERROR_NONE](https://developer.android.com/reference/android/os/ProfilingResult#ERROR_NONE)  

### getTag

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getTag ()
```

The tag defined by the caller at request time.

<br />

|                                               Returns                                               ||
|--------------------------------------------------------------------|---------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | This value may be`null`. <br /> |

### getTriggerType

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int getTriggerType ()
```

Trigger type that started this profiling, or[ProfilingTrigger.TRIGGER_TYPE_NONE](https://developer.android.com/reference/android/os/ProfilingTrigger#TRIGGER_TYPE_NONE)for profiling not started by a trigger.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### writeToParcel

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

|                                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                                ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | `Parcel`: This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE). Value is either`0`or a combination of[Parcelable.PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE), and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES <br /> |