# BackportedFixManager

Artifact: [androidx.core:core-backported-fixes](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/backported/fixes/BackportedFixManager.kt+class:androidx.core.backported.fixes.BackportedFixManager) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
public final class BackportedFixManager
```

<br />

*** ** * ** ***

Reports if a Known Issue is fixed on a device.

Use this class to guard code against a known issue when the issue is not fixed.

```kotlin
import androidx.core.backported.fixes.BackportedFixManager
import androidx.core.backported.fixes.KnownIssues

val bf = BackportedFixManager()
if (bf.isFixed(KnownIssues.KI_350037348)) {
    println("Hello world")
} else {
    // Since the known issue is not fixed
    println("Goodbye")
}
```

`https://developer.android.com/reference/androidx/core/backported/fixes/KnownIssues` has the complete list of known issues, including sample code to guard against the issue.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/backported/fixes/BackportedFixManager#BackportedFixManager()()` Creates a BackportedFixManager object using the default `https://developer.android.com/reference/androidx/core/backported/fixes/StatusResolver`. |
| `https://developer.android.com/reference/androidx/core/backported/fixes/BackportedFixManager#BackportedFixManager(androidx.core.backported.fixes.StatusResolver)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/backported/fixes/StatusResolver resolver)` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/backported/fixes/Status` | `https://developer.android.com/reference/androidx/core/backported/fixes/BackportedFixManager#getStatus(androidx.core.backported.fixes.KnownIssue)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/backported/fixes/KnownIssue ki)` The status of a known issue on this device. |
| `final boolean` | `https://developer.android.com/reference/androidx/core/backported/fixes/BackportedFixManager#isFixed(androidx.core.backported.fixes.KnownIssue)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/backported/fixes/KnownIssue ki)` Is the known issue fixed on this device. |

## Public constructors

### BackportedFixManager

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

```
public BackportedFixManager()
```

Creates a BackportedFixManager object using the default `https://developer.android.com/reference/androidx/core/backported/fixes/StatusResolver`.

### BackportedFixManager

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

```
public BackportedFixManager(@NonNull StatusResolver resolver)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/backported/fixes/StatusResolver resolver` | a function that takes a `https://developer.android.com/reference/androidx/core/backported/fixes/KnownIssue` and returns its `https://developer.android.com/reference/androidx/core/backported/fixes/Status` on this device. This parameter is only used for testing. In normal flows, the empty constructor should be used. |

## Public methods

### getStatus

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

```
public final @NonNull Status getStatus(@NonNull KnownIssue ki)
```

The status of a known issue on this device.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/backported/fixes/KnownIssue ki` | The known issue to check. |

### isFixed

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

```
public final boolean isFixed(@NonNull KnownIssue ki)
```

Is the known issue fixed on this device.

An issue is fixed if its status is `https://developer.android.com/reference/androidx/core/backported/fixes/Status#Fixed` or `https://developer.android.com/reference/androidx/core/backported/fixes/Status#NotApplicable`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/backported/fixes/KnownIssue ki` | The known issue to check. |