ProfilingTrigger


class ProfilingTrigger
kotlin.Any
   ↳ android.os.ProfilingTrigger

Encapsulates a single profiling trigger.

Summary

Nested classes

Builder class to create a ProfilingTrigger object.

Constants
static Int

Trigger occurs after the app was killed due to an ANR

static Int

Trigger occurs after Activity#reportFullyDrawn is called for a cold start.

static Int

No trigger.

Public methods
Int

The requester set rate limiting period in hours.

Int

The trigger type indicates which event should trigger the requested profiling.

Constants

TRIGGER_TYPE_ANR

static val TRIGGER_TYPE_ANR: Int

Trigger occurs after the app was killed due to an ANR

Value: 2

TRIGGER_TYPE_APP_FULLY_DRAWN

static val TRIGGER_TYPE_APP_FULLY_DRAWN: Int

Trigger occurs after Activity#reportFullyDrawn is called for a cold start.

Value: 1

TRIGGER_TYPE_NONE

static val TRIGGER_TYPE_NONE: Int

No trigger. Used in ProfilingResult for non trigger caused results.

Value: 0

Public methods

getRateLimitingPeriodHours

fun getRateLimitingPeriodHours(): Int

The requester set rate limiting period in hours. The period is the minimum time the system should wait before providing another profiling result for the same trigger; actual time between events may be longer. If the rate limiting period is set to 0, no app-provided rate limiting will be used. This rate limiting is in addition to any system level rate limiting that may be applied.

getTriggerType

fun getTriggerType(): Int

The trigger type indicates which event should trigger the requested profiling.

Return
Int Value is android.os.ProfilingTrigger#TRIGGER_TYPE_NONE, android.os.ProfilingTrigger#TRIGGER_TYPE_APP_FULLY_DRAWN, or android.os.ProfilingTrigger#TRIGGER_TYPE_ANR