# UpdateCheckResult

Artifact: [androidx.security:security-state](https://developer.android.com/jetpack/androidx/releases/security) [View Source](https://cs.android.com/search?q=file:androidx/security/state/UpdateCheckResult.kt+class:androidx.security.state.UpdateCheckResult) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

*** ** * ** ***


```
public final class UpdateCheckResult implements Parcelable
```

<br />

*** ** * ** ***

Container for the result of a security update check from a specific provider.

This class encapsulates the list of available updates along with metadata about the source and freshness of the data. It is returned by the IUpdateInfoService.listAvailableUpdates method.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Parcelable.Creator.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/security/state/UpdateCheckResult>` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#CREATOR()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#UpdateCheckResult(kotlin.String,kotlin.collections.List,kotlin.Long)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html providerPackageName, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/security/state/UpdateInfo> updates, long lastCheckTimeMillis )` |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#describeContents()()` |
| `boolean` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final long` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#getLastCheckTimeMillis()()` The timestamp of the last successful synchronization with the backend, in milliseconds since the epoch. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#getProviderPackageName()()` The package name of the application that provided these update results. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/security/state/UpdateInfo>` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#getUpdates()()` The list of `https://developer.android.com/reference/androidx/security/state/UpdateInfo` objects representing available updates found during this check. |
| `int` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#toString()()` |
| `void` | `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#writeToParcel(android.os.Parcel,kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Parcel.html parcel, int flags)` |

## Public fields

### CREATOR

```
public static final @NonNull Parcelable.Creator<@NonNull UpdateCheckResult> CREATOR
```

## Public constructors

### UpdateCheckResult

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
public UpdateCheckResult(
    @NonNull String providerPackageName,
    @NonNull List<@NonNull UpdateInfo> updates,
    long lastCheckTimeMillis
)
```

## Public methods

### describeContents

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
public int describeContents()
```

### equals

```
public boolean equals(Object other)
```

### getLastCheckTimeMillis

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
public final long getLastCheckTimeMillis()
```

The timestamp of the last successful synchronization with the backend, in milliseconds since the epoch.

This field is critical for clients to understand the freshness of the result, especially when `https://developer.android.com/reference/androidx/security/state/UpdateCheckResult#(kotlin.String,kotlin.collections.List,kotlin.Long)` is empty. It allows the UI to display messages like "Last checked: 5 minutes ago" versus "Last checked: Yesterday".

### getProviderPackageName

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
public final @NonNull String getProviderPackageName()
```

The package name of the application that provided these update results.

This field identifies the authoritative source of the update data (e.g., "com.google.android.gms" for System Updates).

### getUpdates

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
public final @NonNull List<@NonNull UpdateInfo> getUpdates()
```

The list of `https://developer.android.com/reference/androidx/security/state/UpdateInfo` objects representing available updates found during this check.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```

### writeToParcel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
public void writeToParcel(@NonNull Parcel parcel, int flags)
```