UpdateInfo
public final class UpdateInfo implements Parcelable
Represents information about an available update for a component.
Summary
Nested types |
|---|
public final class UpdateInfo.BuilderBuilder class for creating an instance of UpdateInfo. |
Public fields |
|
|---|---|
static final @NonNull Parcelable.Creator<@NonNull UpdateInfo> |
Public constructors |
|---|
UpdateInfo( |
Public methods |
|
|---|---|
int |
|
boolean |
Compares this UpdateInfo with another object for equality. |
final @NonNull String |
Component for which the update information is provided. |
final long |
The timestamp when this specific update was checked or discovered, in milliseconds since the epoch. |
final long |
Timestamp when the available update was published, in milliseconds since the epoch. |
final @NonNull SecurityPatchState.SecurityPatchLevel |
Security patch level of the available update ready to be applied by the reporting client. |
int |
hashCode()Provides a hash code for an UpdateInfo object. |
@NonNull String |
toString()Returns a string representation of the update information. |
void |
writeToParcel(@NonNull Parcel parcel, int flags) |
Public fields
Public constructors
UpdateInfo
public UpdateInfo(
@NonNull String component,
@NonNull SecurityPatchState.SecurityPatchLevel securityPatchLevel,
long publishedDateMillis,
long lastCheckTimeMillis
)
Public methods
equals
public boolean equals(Object other)
Compares this UpdateInfo with another object for equality.
| Parameters | |
|---|---|
Object other |
The object to compare with this instance. |
| Returns | |
|---|---|
boolean |
true if the other object is an instance of UpdateInfo and all properties match, false otherwise. |
getComponent
@SecurityPatchState.Component
public final @NonNull String getComponent()
Component for which the update information is provided.
The value should be one of the constants allowed by SecurityPatchState.Component, such as SecurityPatchState.COMPONENT_SYSTEM.
getLastCheckTimeMillis
public final long getLastCheckTimeMillis()
The timestamp when this specific update was checked or discovered, in milliseconds since the epoch.
This timestamp allows the system to track the freshness of individual update records, which is useful when different components are checked on different schedules.
getPublishedDateMillis
public final long getPublishedDateMillis()
Timestamp when the available update was published, in milliseconds since the epoch.
getSecurityPatchLevel
public final @NonNull SecurityPatchState.SecurityPatchLevel getSecurityPatchLevel()
Security patch level of the available update ready to be applied by the reporting client.
This is represented as a SecurityPatchState.SecurityPatchLevel object (e.g., SecurityPatchState.DateBasedSecurityPatchLevel or SecurityPatchState.VersionedSecurityPatchLevel) appropriate for the component.
hashCode
public int hashCode()
Provides a hash code for an UpdateInfo object.
| Returns | |
|---|---|
int |
A hash code produced by the properties of the update info. |