BackportedFixManager
class BackportedFixManager
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.
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") }
KnownIssues has the complete list of known issues, including sample code to guard against the issue.
Summary
Public constructors |
|---|
|
Creates a BackportedFixManager object using the default |
BackportedFixManager(resolver: StatusResolver) |
Public functions |
|
|---|---|
Status |
getStatus(ki: KnownIssue)The status of a known issue on this device. |
Boolean |
isFixed(ki: KnownIssue)Is the known issue fixed on this device. |
Public constructors
BackportedFixManager
BackportedFixManager()
Creates a BackportedFixManager object using the default StatusResolver.
BackportedFixManager
BackportedFixManager(resolver: StatusResolver)
| Parameters | |
|---|---|
resolver: StatusResolver |
a function that takes a |
Public functions
getStatus
fun getStatus(ki: KnownIssue): Status
The status of a known issue on this device.
| Parameters | |
|---|---|
ki: KnownIssue |
The known issue to check. |
isFixed
fun isFixed(ki: KnownIssue): Boolean
Is the known issue fixed on this device.
An issue is fixed if its status is Status.Fixed or Status.NotApplicable.
| Parameters | |
|---|---|
ki: KnownIssue |
The known issue to check. |