Stay organized with collections
Save and categorize content based on your preferences.
PendingJobReasonsInfo
class PendingJobReasonsInfo : Parcelable
A simple wrapper which includes a timestamp (in millis since epoch) and an array of android.app.job.JobScheduler.PendingJobReason at that timestamp for why a particular job may be pending.
Summary
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : 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) ". Some implementations may want to release resources at this point.
|
|
Public methods |
Int |
|
IntArray |
Returns a set of android.
|
Long |
Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.
|
Unit |
Flatten this object in to a Parcel.
|
Public constructors
PendingJobReasonsInfo
PendingJobReasonsInfo(
timestampMillis: Long,
reasons: IntArray)
Parameters |
reasons |
IntArray: This value cannot be null . Value is android.app.job.JobScheduler#PENDING_JOB_REASON_UNDEFINED , android.app.job.JobScheduler#PENDING_JOB_REASON_APP , android.app.job.JobScheduler#PENDING_JOB_REASON_APP_STANDBY , android.app.job.JobScheduler#PENDING_JOB_REASON_BACKGROUND_RESTRICTION , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_BATTERY_NOT_LOW , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CHARGING , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CONNECTIVITY , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CONTENT_TRIGGER , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_DEVICE_IDLE , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_MINIMUM_LATENCY , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_PREFETCH , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_STORAGE_NOT_LOW , android.app.job.JobScheduler#PENDING_JOB_REASON_DEVICE_STATE , android.app.job.JobScheduler#PENDING_JOB_REASON_EXECUTING , android.app.job.JobScheduler#PENDING_JOB_REASON_INVALID_JOB_ID , android.app.job.JobScheduler#PENDING_JOB_REASON_JOB_SCHEDULER_OPTIMIZATION , android.app.job.JobScheduler#PENDING_JOB_REASON_QUOTA , android.app.job.JobScheduler#PENDING_JOB_REASON_USER , or android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_DEADLINE |
Public methods
describeContents
fun describeContents(): Int
getPendingJobReasons
fun getPendingJobReasons(): IntArray
Returns a set of android.app.job.JobScheduler.PendingJobReason representing why the job may not have executed at the associated timestamp.
These reasons could either be explicitly set constraints on the job or implicit constraints imposed by the system due to various reasons.
Note: if the only android.app.job.JobScheduler.PendingJobReason present is android.app.job.JobScheduler.PendingJobReason#PENDING_JOB_REASON_UNDEFINED, it could mean that the job was ready to be executed at that time.
Return |
IntArray |
This value cannot be null . Value is android.app.job.JobScheduler#PENDING_JOB_REASON_UNDEFINED , android.app.job.JobScheduler#PENDING_JOB_REASON_APP , android.app.job.JobScheduler#PENDING_JOB_REASON_APP_STANDBY , android.app.job.JobScheduler#PENDING_JOB_REASON_BACKGROUND_RESTRICTION , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_BATTERY_NOT_LOW , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CHARGING , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CONNECTIVITY , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_CONTENT_TRIGGER , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_DEVICE_IDLE , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_MINIMUM_LATENCY , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_PREFETCH , android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_STORAGE_NOT_LOW , android.app.job.JobScheduler#PENDING_JOB_REASON_DEVICE_STATE , android.app.job.JobScheduler#PENDING_JOB_REASON_EXECUTING , android.app.job.JobScheduler#PENDING_JOB_REASON_INVALID_JOB_ID , android.app.job.JobScheduler#PENDING_JOB_REASON_JOB_SCHEDULER_OPTIMIZATION , android.app.job.JobScheduler#PENDING_JOB_REASON_QUOTA , android.app.job.JobScheduler#PENDING_JOB_REASON_USER , or android.app.job.JobScheduler#PENDING_JOB_REASON_CONSTRAINT_DEADLINE |
getTimestampMillis
fun getTimestampMillis(): Long
Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z.
Return |
Long |
the time (in millis since epoch) associated with the set of pending job reasons. Value is a non-negative timestamp measured as the number of milliseconds since 1970-01-01T00:00:00Z. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Properties
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-18 UTC.